Skip to content

Commit 3af7707

Browse files
authored
Define a_clz_32 for musl so that it doesn't use a software version. (#171)
1 parent af92c5f commit 3af7707

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libc-top-half/musl/arch/wasm32/atomic_arch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
#define a_barrier() (__sync_synchronize())
66
#define a_cas(p, t, s) (__sync_val_compare_and_swap((p), (t), (s)))
77
#define a_crash() (__builtin_trap())
8+
#define a_clz_32 __builtin_clz
9+
#define a_clz_64 __builtin_clzll
10+
#define a_ctz_32 __builtin_ctz
11+
#define a_ctz_64 __builtin_ctzll

0 commit comments

Comments
 (0)