__asm__ __volatile__( "" : : : "memory" );
}
-#define a_pause a_pause
+#define a_spin a_spin
static inline void a_spin()
{
__asm__ __volatile__( "pause" : : : "memory" );
__asm__( "bsf %1,%0" : "=r"(x) : "r"(x) );
return x;
}
+
+#define a_clz_64 a_clz_64
+static inline int a_clz_64(uint64_t x)
+{
+ __asm__( "bsr %1,%0 ; xor $63,%0" : "=r"(x) : "r"(x) );
+ return x;
+}