]> Savannah Git Hosting - gnulib.git/commitdiff
crc-x86_64: port to old GCC compilers
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Jan 2025 18:39:38 +0000 (10:39 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Jan 2025 18:40:03 +0000 (10:40 -0800)
* m4/crc-x86_64.m4 (gl_CRC_X86_64_PCLMUL):
Check that the compiler supports __m128i_u, too,
since we’re using the type now.  Issue reported in
the same message from Lasse Collin.

ChangeLog
m4/crc-x86_64.m4

index 3164c1c5870feda958d714ea139c8c411e16a90a..5796c80ae06c61b507fd04112e9d003a4da587da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-01-17  Paul Eggert  <eggert@cs.ucla.edu>
 
+       crc-x86_64: port to old GCC compilers
+       * m4/crc-x86_64.m4 (gl_CRC_X86_64_PCLMUL):
+       Check that the compiler supports __m128i_u, too,
+       since we’re using the type now.  Issue reported in
+       the same message from Lasse Collin.
+
        crc-x86_64: better fix for unaligned access
        Avoid undefined behavior in a way that doesn’t require
        the input buffer to be aligned.
index 41b7b0fe05dc7e74b67cfa02f9d0b42530abe99f..b705d8c80c1cb592804cccd113ceb20492068bb6 100644 (file)
@@ -23,6 +23,8 @@ AC_DEFUN([gl_CRC_X86_64_PCLMUL],
             __m128i a, b;
             a = _mm_clmulepi64_si128 (a, b, 0x00);
             a = _mm_shuffle_epi8 (a, b);
+            static __m128i_u u;
+            b = _mm_loadu_si128 (&u);
             return __builtin_cpu_supports ("pclmul");
           }
         ]])