Skip to content

Commit ce5381e

Browse files
committed
build: Rename --enable-experimental-asm to --enable-asm and enable by default
Now that 0.15 is branched off, enable assembler SHA256 optimizations by default.
1 parent df91e11 commit ce5381e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

configure.ac

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ AC_ARG_ENABLE([glibc-back-compat],
177177
[use_glibc_compat=$enableval],
178178
[use_glibc_compat=no])
179179

180-
AC_ARG_ENABLE([experimental-asm],
181-
[AS_HELP_STRING([--enable-experimental-asm],
182-
[Enable experimental assembly routines (default is no)])],
183-
[experimental_asm=$enableval],
184-
[experimental_asm=no])
185-
186-
if test "x$experimental_asm" = xyes; then
187-
AC_DEFINE(EXPERIMENTAL_ASM, 1, [Define this symbol to build in experimental assembly routines])
180+
AC_ARG_ENABLE([asm],
181+
[AS_HELP_STRING([--enable-asm],
182+
[Enable assembly routines (default is yes)])],
183+
[use_asm=$enableval],
184+
[use_asm=yes])
185+
186+
if test "x$use_asm" = xyes; then
187+
AC_DEFINE(USE_ASM, 1, [Define this symbol to build in assembly routines])
188188
fi
189189

190190
AC_ARG_WITH([system-univalue],
@@ -1179,7 +1179,7 @@ AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
11791179
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
11801180
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
11811181
AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
1182-
AM_CONDITIONAL([EXPERIMENTAL_ASM],[test x$experimental_asm = xyes])
1182+
AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes])
11831183

11841184
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
11851185
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ crypto_libbitcoin_crypto_a_SOURCES = \
271271
crypto/sha512.cpp \
272272
crypto/sha512.h
273273

274-
if EXPERIMENTAL_ASM
274+
if USE_ASM
275275
crypto_libbitcoin_crypto_a_SOURCES += crypto/sha256_sse4.cpp
276276
endif
277277

src/crypto/sha256.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <atomic>
1111

1212
#if defined(__x86_64__) || defined(__amd64__)
13-
#if defined(EXPERIMENTAL_ASM)
13+
#if defined(USE_ASM)
1414
#include <cpuid.h>
1515
namespace sha256_sse4
1616
{
@@ -178,7 +178,7 @@ TransformType Transform = sha256::Transform;
178178

179179
std::string SHA256AutoDetect()
180180
{
181-
#if defined(EXPERIMENTAL_ASM) && (defined(__x86_64__) || defined(__amd64__))
181+
#if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__))
182182
uint32_t eax, ebx, ecx, edx;
183183
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx >> 19) & 1) {
184184
Transform = sha256_sse4::Transform;

0 commit comments

Comments
 (0)