Fix x86 compile error

This commit is contained in:
Nick Peng
2018-11-03 21:50:37 +08:00
parent 307ebe234f
commit db4fad058e

View File

@@ -183,16 +183,17 @@ static art_node** find_child(art_node *n, unsigned char c) {
p.p2 = (art_node16*)n;
// support non-86 architectures
#ifdef __i386__
// Compare the key to all 16 stored keys
__m128i cmp;
cmp = _mm_cmpeq_epi8(_mm_set1_epi8(c),
_mm_loadu_si128((__m128i*)p.p2->keys));
// #ifdef __i386__
// // Compare the key to all 16 stored keys
// __m128i cmp;
// cmp = _mm_cmpeq_epi8(_mm_set1_epi8(c),
// _mm_loadu_si128((__m128i*)p.p2->keys));
// Use a mask to ignore children that don't exist
mask = (1 << n->num_children) - 1;
bitfield = _mm_movemask_epi8(cmp) & mask;
#else
// // Use a mask to ignore children that don't exist
// mask = (1 << n->num_children) - 1;
// bitfield = _mm_movemask_epi8(cmp) & mask;
// #else
#ifdef __amd64__
// Compare the key to all 16 stored keys
__m128i cmp;
@@ -214,7 +215,7 @@ static art_node** find_child(art_node *n, unsigned char c) {
mask = (1 << n->num_children) - 1;
bitfield &= mask;
#endif
#endif
// #endif
/*
* If we have a match (any bit set) then we can