Commit a04dc883 authored by Michael Holzheu's avatar Michael Holzheu Committed by Pavel Emelyanov

s390: Replace flogr instruction with __builtin_clzl()

The flogr instruction not supported by debian jessie (z900).
So replace it by the gcc built-in.
Signed-off-by: 's avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 254094d6
......@@ -107,13 +107,7 @@ static inline unsigned char __flogr(unsigned long word)
}
return bit;
} else {
register unsigned long bit asm("4") = word;
register unsigned long out asm("5");
asm volatile(
" flogr %[bit],%[bit]\n"
: [bit] "+d" (bit), [out] "=d" (out) : : "cc");
return bit;
return __builtin_clzl(word);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment