eal: use intrinsic function
authorIntel <intel.com>
Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Sep 2013 12:16:09 +0000 (14:16 +0200)
Signed-off-by: Intel
lib/librte_eal/common/include/rte_common.h

index 764d1cf..0ad06ec 100644 (file)
@@ -274,10 +274,7 @@ rte_pause (void)
 static inline uint32_t
 rte_bsf32(uint32_t v)
 {
-       asm("bsf %1,%0"
-               : "=r" (v)
-               : "rm" (v));
-       return (v);
+       return (__builtin_ctz(v));
 }
 
 #ifndef offsetof