From a132a9cf2bcd440a974b9d3f5c44ba30b2c895a1 Mon Sep 17 00:00:00 2001 From: Intel Date: Thu, 20 Dec 2012 00:00:00 +0100 Subject: [PATCH] hash: use intrinsic Signed-off-by: Intel --- lib/librte_hash/rte_hash_crc.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index e2c788fb65..cf5dbd3b9d 100644 --- a/lib/librte_hash/rte_hash_crc.h +++ b/lib/librte_hash/rte_hash_crc.h @@ -46,6 +46,7 @@ extern "C" { #endif #include +#include /** * Use single crc32 instruction to perform a hash on a 4 byte value. @@ -60,10 +61,7 @@ extern "C" { static inline uint32_t rte_hash_crc_4byte(uint32_t data, uint32_t init_val) { - asm volatile("crc32 %[data], %[init_val]" - : [init_val]"=r" (init_val) - : [data]"r" (data), "[init_val]" (init_val)); - return init_val; + return _mm_crc32_u32(data, init_val); } /** -- 2.20.1