diff options
author | Jason Carey <jcarey@argv.me> | 2018-05-02 18:18:09 +0000 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2018-05-04 12:23:56 -0400 |
commit | b989fe4b0cfba4062c5bb7fb68337f188070c1c8 (patch) | |
tree | 37ddb7fc706c2ca76eb94f82aba94942cb996f37 /src/mongo/db/fts | |
parent | 236bf5f077eb16f7bf8f0f7c5f103240bd061f12 (diff) | |
download | mongo-b989fe4b0cfba4062c5bb7fb68337f188070c1c8.tar.gz |
SERVER-33395 Add configure check for vec_vbpermq output
GCC changed the output of vec_vbpermq between 5.4.0 and later. This
seems likely to be a bug, probably in earlier versions of gcc. Rather
than attempt to enumerate how the compiler versions work, this adds a
runtime configure check which will select the lane that works.
Diffstat (limited to 'src/mongo/db/fts')
-rw-r--r-- | src/mongo/db/fts/unicode/byte_vector_altivec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/fts/unicode/byte_vector_altivec.h b/src/mongo/db/fts/unicode/byte_vector_altivec.h index f7a07ac0743..0797443f72f 100644 --- a/src/mongo/db/fts/unicode/byte_vector_altivec.h +++ b/src/mongo/db/fts/unicode/byte_vector_altivec.h @@ -34,6 +34,7 @@ #include <cstdint> +#include "mongo/config.h" #include "mongo/platform/bits.h" namespace mongo { @@ -98,7 +99,7 @@ public: // big endian by comparison. const Native bits = {120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0}; - return vec_extract(vec_vbpermq(_data, bits), 0); + return vec_extract(vec_vbpermq(_data, bits), MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX); } /** |