Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate artifacts with SSE4.1 correction. #1502

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -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( $<$<COMPILE_LANGUAGE:CXX>:-msse4.1> )
set( CMAKE_REQUIRED_FLAGS_PREV "${CMAKE_REQUIRED_FLAGS}" )
set( CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.1" )
Expand All @@ -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()

Expand Down
22 changes: 11 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion libbitcoin-system.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#------------------------------------------------------------------------------
Expand Down
Loading