projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a_clz_64 helper function
[musl]
/
arch
/
arm
/
atomic_arch.h
diff --git
a/arch/arm/atomic_arch.h
b/arch/arm/atomic_arch.h
index
d6af84d
..
a121010
100644
(file)
--- a/
arch/arm/atomic_arch.h
+++ b/
arch/arm/atomic_arch.h
@@
-81,3
+81,10
@@
static inline void a_crash()
#endif
: : : "memory");
}
#endif
: : : "memory");
}
+
+#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;
+}