From: Bruno Haible Date: Tue, 17 Dec 2024 17:26:22 +0000 (+0100) Subject: crc-x86_64: Tweaks. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9b64540d327cc455cd1049a37b55016cbef61988;p=gnulib.git crc-x86_64: Tweaks. * modules/crc-x86_64 (Include): Fix the file name. * m4/crc-x86_64.m4 (gl_CRC_X86_64_PCLMUL): Improve indentation. --- diff --git a/ChangeLog b/ChangeLog index 0cf269fdb4..74d1ded7d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-12-17 Bruno Haible + + crc-x86_64: Tweaks. + * modules/crc-x86_64 (Include): Fix the file name. + * m4/crc-x86_64.m4 (gl_CRC_X86_64_PCLMUL): Improve indentation. + 2024-12-17 Bruno Haible xstdopen: Improve error message. diff --git a/m4/crc-x86_64.m4 b/m4/crc-x86_64.m4 index ac1c57f9ee..fa649a5b82 100644 --- a/m4/crc-x86_64.m4 +++ b/m4/crc-x86_64.m4 @@ -1,5 +1,5 @@ # crc-x86_64.m4 -# serial 1 +# serial 2 dnl Copyright (C) 2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,30 +10,32 @@ AC_DEFUN([gl_CRC_X86_64_PCLMUL], [ ac_save_CFLAGS=$CFLAGS CFLAGS="-mavx -mpclmul $CFLAGS" - AC_CACHE_CHECK([if pclmul intrinsic exists], [gl_cv_crc_pclmul],[ - AC_LINK_IFELSE( - [AC_LANG_SOURCE([[ - #include + AC_CACHE_CHECK([if pclmul intrinsic exists], [gl_cv_crc_pclmul], [ + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [[ + #include - int - main (void) - { - __m128i a, b; - a = _mm_clmulepi64_si128 (a, b, 0x00); - a = _mm_shuffle_epi8 (a, b); - return __builtin_cpu_supports ("pclmul"); - } - ]]) - ],[ - gl_cv_crc_pclmul=yes - ],[ - gl_cv_crc_pclmul=no - ])]) + int + main (void) + { + __m128i a, b; + a = _mm_clmulepi64_si128 (a, b, 0x00); + a = _mm_shuffle_epi8 (a, b); + return __builtin_cpu_supports ("pclmul"); + } + ]]) + ], [ + gl_cv_crc_pclmul=yes + ], [ + gl_cv_crc_pclmul=no + ]) + ]) if test $gl_cv_crc_pclmul = yes; then AC_DEFINE([GL_CRC_X86_64_PCLMUL], [1], [CRC32 calculation by pclmul hardware instruction enabled]) fi AM_CONDITIONAL([GL_CRC_X86_64_PCLMUL], - [test $gl_cv_crc_pclmul = yes]) + [test $gl_cv_crc_pclmul = yes]) CFLAGS=$ac_save_CFLAGS ]) diff --git a/modules/crc-x86_64 b/modules/crc-x86_64 index 0080656819..4796de054f 100644 --- a/modules/crc-x86_64 +++ b/modules/crc-x86_64 @@ -19,7 +19,7 @@ if GL_CRC_X86_64_PCLMUL endif Include: -"crc.h" +"crc-x86_64.h" License: LGPL