From 17035c1e642430e69dcabe462710bafd4cf008c5 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Thu, 5 May 2022 21:10:37 +0200 Subject: [PATCH 2/2] Disable BMI2 --- snappy.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/snappy.cc b/snappy.cc index 79dc0e8..f3153ea 100644 --- a/snappy.cc +++ b/snappy.cc @@ -965,14 +965,10 @@ static inline void Report(const char *algorithm, size_t compressed_size, static inline uint32_t ExtractLowBytes(uint32_t v, int n) { assert(n >= 0); assert(n <= 4); -#if SNAPPY_HAVE_BMI2 - return _bzhi_u32(v, 8 * n); -#else // This needs to be wider than uint32_t otherwise `mask << 32` will be // undefined. uint64_t mask = 0xffffffff; return v & ~(mask << (8 * n)); -#endif } static inline bool LeftShiftOverflows(uint8_t value, uint32_t shift) { -- 2.32.0 (Apple Git-132)