mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix build regression on ARM for ISA levels less than v5
commit 06fbefd100
(first included in
release 1.1.17) introduced this regression.
patch by Adrian Bunk. it fixes the regression in all cases, but
spuriously prevents use of the clz instruction on very old compiler
versions that don't define __ARM_ARCH. this may be fixed in a more
general way at some point in the future. it also omits thumb1 logic
since building as thumb1 code is currently not supported.
This commit is contained in:
parent
ec04d122f1
commit
1b9406b03c
1 changed files with 4 additions and 0 deletions
|
@ -82,9 +82,13 @@ static inline void a_crash()
|
|||
: : : "memory");
|
||||
}
|
||||
|
||||
#if __ARM_ARCH >= 5
|
||||
|
||||
#define a_clz_32 a_clz_32
|
||||
static inline int a_clz_32(uint32_t x)
|
||||
{
|
||||
__asm__ ("clz %0, %1" : "=r"(x) : "r"(x));
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue