summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2018-05-02 18:18:09 +0000
committerJason Carey <jcarey@argv.me>2018-05-04 12:23:56 -0400
commitb989fe4b0cfba4062c5bb7fb68337f188070c1c8 (patch)
tree37ddb7fc706c2ca76eb94f82aba94942cb996f37 /src/mongo/db/fts
parent236bf5f077eb16f7bf8f0f7c5f103240bd061f12 (diff)
downloadmongo-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.h3
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);
}
/**