diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2018-04-18 17:40:59 -0700 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-04-19 12:23:17 -0400 |
commit | 0c6abb58820398ac995305d88f3e6a9f0a692eb7 (patch) | |
tree | 155fdd605e934e3c1a787c8a48300028c6d90356 /arch | |
parent | 3f6dc30470d5751b83645df180a60cad3e7907ef (diff) | |
download | musl-0c6abb58820398ac995305d88f3e6a9f0a692eb7.tar.gz musl-0c6abb58820398ac995305d88f3e6a9f0a692eb7.tar.bz2 musl-0c6abb58820398ac995305d88f3e6a9f0a692eb7.tar.xz musl-0c6abb58820398ac995305d88f3e6a9f0a692eb7.zip |
remove a_ctz_l from arch specific atomic_arch.h
Update atomic.h to provide a_ctz_l in all cases (atomic_arch.h should
now only provide a_ctz_32 and/or a_ctz_64).
The generic version of a_ctz_32 now takes advantage of a_clz_32 if
available and the generic a_ctz_64 now makes use of a_ctz_32.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/atomic_arch.h | 6 | ||||
-rw-r--r-- | arch/x32/atomic_arch.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/i386/atomic_arch.h b/arch/i386/atomic_arch.h index 7d2a48a5..047fb68d 100644 --- a/arch/i386/atomic_arch.h +++ b/arch/i386/atomic_arch.h @@ -92,10 +92,10 @@ static inline int a_ctz_64(uint64_t x) return r; } -#define a_ctz_l a_ctz_l -static inline int a_ctz_l(unsigned long x) +#define a_ctz_32 a_ctz_32 +static inline int a_ctz_32(uint32_t x) { - long r; + int r; __asm__( "bsf %1,%0" : "=r"(r) : "r"(x) ); return r; } diff --git a/arch/x32/atomic_arch.h b/arch/x32/atomic_arch.h index a744c299..918c2d4e 100644 --- a/arch/x32/atomic_arch.h +++ b/arch/x32/atomic_arch.h @@ -106,8 +106,8 @@ static inline int a_ctz_64(uint64_t x) return x; } -#define a_ctz_l a_ctz_l -static inline int a_ctz_l(unsigned long x) +#define a_ctz_32 a_ctz_32 +static inline int a_ctz_32(uint32_t x) { __asm__( "bsf %1,%0" : "=r"(x) : "r"(x) ); return x; |