mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
arm: Support gcc older than 10 for find_zero_all
__builtin_arm_uqsub8 is only available on gcc newer or equal than 10. Checked on arm-linux-gnueabihf built with gcc 9. Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
3f98a5c027
commit
97830304bb
@ -33,7 +33,13 @@ find_zero_all (op_t x)
|
|||||||
/* Use unsigned saturated subtraction from 1 in each byte.
|
/* Use unsigned saturated subtraction from 1 in each byte.
|
||||||
That leaves 1 for every byte that was zero. */
|
That leaves 1 for every byte that was zero. */
|
||||||
op_t ones = repeat_bytes (0x01);
|
op_t ones = repeat_bytes (0x01);
|
||||||
|
#if __GNUC_PREREQ (10, 0)
|
||||||
return __builtin_arm_uqsub8 (ones, x);
|
return __builtin_arm_uqsub8 (ones, x);
|
||||||
|
#else
|
||||||
|
op_t ret;
|
||||||
|
asm ("uqsub8 %0,%1,%2" : "=r"(ret) : "r"(ones), "r"(x));
|
||||||
|
return ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identify bytes that are equal between X1 and X2. */
|
/* Identify bytes that are equal between X1 and X2. */
|
||||||
|
Loading…
Reference in New Issue
Block a user