From e6836f8a8a4a676ca5462ad7ae6ad2ace545cbdb Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Thu, 18 Jul 2024 13:27:14 -0700 Subject: [PATCH] Regenerate artifacts with SSE4.1 correction. --- builds/cmake/CMakeLists.txt | 22 +++++++++++----------- configure.ac | 22 +++++++++++----------- libbitcoin-system.pc.in | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 5011bbff9f..ce2aadbbdf 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -166,9 +166,9 @@ set( enable-avx2 "no" CACHE BOOL "Compile with avx2 intrinsics (specifically -ma #------------------------------------------------------------------------------ set( enable-avx512 "no" CACHE BOOL "Compile with avx512 intrinsics (specifically -mavx512bw -mavx512f)." ) -# Implement -Denable-sse4. +# Implement -Denable-sse41. #------------------------------------------------------------------------------ -set( enable-sse4 "no" CACHE BOOL "Compile with sse4 intrinsics (specifically -msse4.1)." ) +set( enable-sse41 "no" CACHE BOOL "Compile with sse4.1 intrinsics (specifically -msse4.1)." ) # Implement -Denable-shani. #------------------------------------------------------------------------------ @@ -280,10 +280,10 @@ if (enable-shani) endif() endif() -if (enable-sse4) - check_cxx_compiler_flag("-msse4.1" HAS_FLAGS_SSE4) +if (enable-sse41) + check_cxx_compiler_flag("-msse4.1" HAS_FLAGS_SSE41) - if (HAS_FLAGS_SSE4) + if (HAS_FLAGS_SSE41) add_compile_options( $<$:-msse4.1> ) set( CMAKE_REQUIRED_FLAGS_PREV "${CMAKE_REQUIRED_FLAGS}" ) set( CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.1" ) @@ -296,17 +296,17 @@ if (enable-sse4) __m128i a = _mm_set1_epi32(0); __m128i b = _mm_set1_epi32(15); return _mm_extract_epi32(_mm_add_epi64(a, b), 2); - }" WITH_SSE4) + }" WITH_SSE41) - if (HAS_FLAGS_SSE4) + if (HAS_FLAGS_SSE41) set( CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_PREV}" ) endif() - if ( WITH_SSE4 ) - add_compile_definitions( WITH_SSE4 ) - set( sse4 "-DWITH_SSE4" ) + if ( WITH_SSE41 ) + add_compile_definitions( WITH_SSE41 ) + set( sse41 "-DWITH_SSE41" ) else() - message( FATAL_ERROR "Failed to enable WITH_SSE4" ) + message( FATAL_ERROR "Failed to enable WITH_SSE41" ) endif() endif() diff --git a/configure.ac b/configure.ac index f7051eae90..a18cb106d9 100644 --- a/configure.ac +++ b/configure.ac @@ -141,15 +141,15 @@ AC_ARG_ENABLE([avx512], [enable_avx512=no]) AC_MSG_RESULT([$enable_avx512]) -# Implement --enable-sse4. +# Implement --enable-sse41. #------------------------------------------------------------------------------ -AC_MSG_CHECKING([--enable-sse4 option]) -AC_ARG_ENABLE([sse4], - AS_HELP_STRING([--enable-sse4], - [Compile with sse4 intrinsics (specifically -msse4.1). @<:@default=no@:>@]), - [enable_sse4=$enableval], - [enable_sse4=no]) -AC_MSG_RESULT([$enable_sse4]) +AC_MSG_CHECKING([--enable-sse41 option]) +AC_ARG_ENABLE([sse41], + AS_HELP_STRING([--enable-sse41], + [Compile with sse4.1 intrinsics (specifically -msse4.1). @<:@default=no@:>@]), + [enable_sse41=$enableval], + [enable_sse41=no]) +AC_MSG_RESULT([$enable_sse41]) # Implement --enable-shani. #------------------------------------------------------------------------------ @@ -347,11 +347,11 @@ AS_IF([test x${enable_shani} != "xno"], return _mm_extract_epi32(_mm_sha256msg2_epu32(_mm_sha256msg1_epu32(_mm_sha256rnds2_epu32(a, b, k), b), a), 2); ]])])]) -AS_IF([test x${enable_sse4} != "xno"], +AS_IF([test x${enable_sse41} != "xno"], [AX_CHECK_COMPILE_FLAG([-msse4.1], - [AC_DEFINE([WITH_SSE4]) + [AC_DEFINE([WITH_SSE41]) CXXFLAGS="$CXXFLAGS -msse4.1"; - AC_SUBST([sse4], [-DWITH_SSE4])], + AC_SUBST([sse41], [-DWITH_SSE41])], [AC_MSG_ERROR([-msse4.1 not supported.])], [], [AC_LANG_PROGRAM( diff --git a/libbitcoin-system.pc.in b/libbitcoin-system.pc.in index 458f5a7baa..5a84353afa 100644 --- a/libbitcoin-system.pc.in +++ b/libbitcoin-system.pc.in @@ -29,7 +29,7 @@ Requires: @icu_i18n_PKG@ libsecp256k1 >= 0.1.0.20 # Include directory and any other required compiler flags. #------------------------------------------------------------------------------ -Cflags: -I${includedir} @icu@ @avx2@ @avx512@ @shani@ @sse4@ @boost_CPPFLAGS@ @pthread_CPPFLAGS@ +Cflags: -I${includedir} @icu@ @avx2@ @avx512@ @shani@ @sse41@ @boost_CPPFLAGS@ @pthread_CPPFLAGS@ # Lib directory, lib and any required that do not publish pkg-config. #------------------------------------------------------------------------------