OSDN Git Service

add a_clz_64 helper function
[android-x86/external-musl-libc.git] / arch / arm / atomic_arch.h
index d6af84d..a121010 100644 (file)
@@ -81,3 +81,10 @@ static inline void a_crash()
 #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;
+}