git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18d5e8d
)
hash: use intrinsic
author
Intel
<intel.com>
Wed, 19 Dec 2012 23:00:00 +0000
(
00:00
+0100)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 13:23:27 +0000
(15:23 +0200)
Signed-off-by: Intel
lib/librte_hash/rte_hash_crc.h
patch
|
blob
|
history
diff --git
a/lib/librte_hash/rte_hash_crc.h
b/lib/librte_hash/rte_hash_crc.h
index
e2c788f
..
cf5dbd3
100644
(file)
--- a/
lib/librte_hash/rte_hash_crc.h
+++ b/
lib/librte_hash/rte_hash_crc.h
@@
-46,6
+46,7
@@
extern "C" {
#endif
#include <stdint.h>
+#include <nmmintrin.h>
/**
* 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);
}
/**