From: Intel Date: Wed, 19 Dec 2012 23:00:00 +0000 (+0100) Subject: hash: use intrinsic X-Git-Tag: spdx-start~11392 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a132a9cf2bcd440a974b9d3f5c44ba30b2c895a1;p=dpdk.git hash: use intrinsic Signed-off-by: Intel --- 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); } /**