diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2017-07-14 16:41:12 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2017-08-09 18:51:41 +0300 |
commit | a04dc883cb22376f3c87c18a9e5073cec3442080 (patch) | |
tree | 17fbf2a53fe374b2f7db38c9830c53aa33db8144 /include/common | |
parent | 254094d66fea22ec36733e8a7d7b4c7d97bfded7 (diff) |
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>
Diffstat (limited to 'include/common')
-rw-r--r-- | include/common/arch/s390/asm/bitops.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/common/arch/s390/asm/bitops.h b/include/common/arch/s390/asm/bitops.h index 13d832380..648d898d1 100644 --- a/include/common/arch/s390/asm/bitops.h +++ b/include/common/arch/s390/asm/bitops.h @@ -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); } } |