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: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Michael Holzheu 2017-07-14 15:41:12 +02:00 committed by Pavel Emelyanov
parent 254094d66f
commit a04dc883cb

View file

@ -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);
}
}