diff options
Diffstat (limited to 'databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc')
| -rw-r--r-- | databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc b/databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc index 0e42c96a1843..19a2bb2cc1ad 100644 --- a/databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc +++ b/databases/mysql80-server/files/patch-storage_innobase_ut_crc32.cc @@ -1,16 +1,6 @@ ---- storage/innobase/ut/crc32.cc.orig 2021-12-17 17:07:27 UTC +--- storage/innobase/ut/crc32.cc.orig 2024-07-12 19:15:25 UTC +++ storage/innobase/ut/crc32.cc -@@ -111,7 +111,9 @@ external tools. */ - #endif /* CRC32_ARM64 */ - - #ifdef CRC32_ARM64_DEFAULT -+#ifndef __FreeBSD__ - #include <asm/hwcap.h> -+#endif - #include <sys/auxv.h> - #endif /* CRC32_ARM64_DEFAULT */ - -@@ -360,8 +362,25 @@ bool can_use_poly_mul() { return true; } +@@ -333,8 +333,25 @@ bool can_use_poly_mul() { return true; } #endif /* CRC32_ARM64_APPLE */ #ifdef CRC32_ARM64_DEFAULT @@ -27,7 +17,7 @@ + + if (elf_aux_info(AT_HWCAP, &capabilities, sizeof(unsigned long))) + return false; -+ return capabilities & HWCAP_CRC32; ++ return capabilities & HWCAP_PMULL; +} +#else bool can_use_crc32() { return getauxval(AT_HWCAP) & HWCAP_CRC32; } @@ -36,7 +26,7 @@ #endif /* CRC32_ARM64_DEFAULT */ /** A helper template to statically unroll a loop with a fixed number of -@@ -470,25 +489,39 @@ uint64_t crc32_impl::update(uint64_t crc, uint64_t dat +@@ -443,25 +460,39 @@ uint64_t crc32_impl::update(uint64_t crc, uint64_t dat #ifdef CRC32_ARM64 #ifdef CRC32_ARM64_DEFAULT @@ -76,7 +66,7 @@ #endif /* CRC32_ARM64_DEFAULT */ uint64_t crc32_impl::update(uint64_t crc, uint64_t data) { return (uint64_t)__crc32cd((uint32_t)crc, data); -@@ -534,7 +567,11 @@ static inline uint64_t less_significant_half_of_poly12 +@@ -507,7 +538,11 @@ template <uint32_t w> } template <uint32_t w> #ifdef CRC32_ARM64_DEFAULT @@ -88,7 +78,7 @@ #endif /* CRC32_ARM64_DEFAULT */ uint64_t use_pclmul::polynomial_mul_rev(uint32_t rev_u) { constexpr uint64_t flipped_w = flip_at_32(w); -@@ -777,7 +814,11 @@ MY_ATTRIBUTE((target("sse4.2,pclmul"), flatten)) +@@ -750,7 +785,11 @@ MY_ATTRIBUTE((flatten)) MY_ATTRIBUTE((flatten)) #endif /* CRC32_ARM64_APPLE */ #ifdef CRC32_ARM64_DEFAULT @@ -100,7 +90,7 @@ #endif /* CRC32_ARM64_DEFAULT */ uint32_t crc32_using_pclmul(const byte *data, size_t len) { return crc32<use_pclmul>(0, data, len); -@@ -797,7 +838,11 @@ MY_ATTRIBUTE((target("sse4.2"), flatten)) +@@ -770,7 +809,11 @@ MY_ATTRIBUTE((flatten)) MY_ATTRIBUTE((flatten)) #endif /* CRC32_ARM64_APPLE */ #ifdef CRC32_ARM64_DEFAULT |
