mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #11176: build: Rename --enable-experimental-asm to --enable-asm and enable by default
538cc0ca8
build: Mention use of asm in summary (Wladimir J. van der Laan)ce5381e7f
build: Rename --enable-experimental-asm to --enable-asm and enable by default (Wladimir J. van der Laan) Pull request description: Now that 0.15 is branched off, enable assembler SHA256 optimizations by default, but still allow disabling them, for example if something goes wrong with auto-detection on a platform. Also add mention of the use of asm in the configure summary. Tree-SHA512: cd20c497f65edd6b1e8b2cc3dfe82be11fcf4777543c830ccdec6c10f25eab4576b0f2953f3957736d7e04deaa4efca777aa84b12bb1cecb40c258e86c120ec8
This commit is contained in:
parent
b4aefb513d
commit
ad55048a68
17
configure.ac
17
configure.ac
@ -178,14 +178,14 @@ AC_ARG_ENABLE([glibc-back-compat],
|
|||||||
[use_glibc_compat=$enableval],
|
[use_glibc_compat=$enableval],
|
||||||
[use_glibc_compat=no])
|
[use_glibc_compat=no])
|
||||||
|
|
||||||
AC_ARG_ENABLE([experimental-asm],
|
AC_ARG_ENABLE([asm],
|
||||||
[AS_HELP_STRING([--enable-experimental-asm],
|
[AS_HELP_STRING([--enable-asm],
|
||||||
[Enable experimental assembly routines (default is no)])],
|
[Enable assembly routines (default is yes)])],
|
||||||
[experimental_asm=$enableval],
|
[use_asm=$enableval],
|
||||||
[experimental_asm=no])
|
[use_asm=yes])
|
||||||
|
|
||||||
if test "x$experimental_asm" = xyes; then
|
if test "x$use_asm" = xyes; then
|
||||||
AC_DEFINE(EXPERIMENTAL_ASM, 1, [Define this symbol to build in experimental assembly routines])
|
AC_DEFINE(USE_ASM, 1, [Define this symbol to build in assembly routines])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH([system-univalue],
|
AC_ARG_WITH([system-univalue],
|
||||||
@ -1242,7 +1242,7 @@ AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
|
|||||||
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
|
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
|
||||||
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
|
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
|
||||||
AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
|
AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes])
|
||||||
AM_CONDITIONAL([EXPERIMENTAL_ASM],[test x$experimental_asm = xyes])
|
AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes])
|
||||||
|
|
||||||
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
||||||
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
||||||
@ -1362,6 +1362,7 @@ echo " with zmq = $use_zmq"
|
|||||||
echo " with test = $use_tests"
|
echo " with test = $use_tests"
|
||||||
echo " with bench = $use_bench"
|
echo " with bench = $use_bench"
|
||||||
echo " with upnp = $use_upnp"
|
echo " with upnp = $use_upnp"
|
||||||
|
echo " use asm = $use_asm"
|
||||||
echo " debug enabled = $enable_debug"
|
echo " debug enabled = $enable_debug"
|
||||||
echo " crash hooks enabled = $enable_crashhooks"
|
echo " crash hooks enabled = $enable_crashhooks"
|
||||||
echo " miner enabled = $enable_miner"
|
echo " miner enabled = $enable_miner"
|
||||||
|
@ -391,7 +391,7 @@ crypto_libdash_crypto_a_SOURCES = \
|
|||||||
crypto/sha512.cpp \
|
crypto/sha512.cpp \
|
||||||
crypto/sha512.h
|
crypto/sha512.h
|
||||||
|
|
||||||
if EXPERIMENTAL_ASM
|
if USE_ASM
|
||||||
crypto_libdash_crypto_a_SOURCES += crypto/sha256_sse4.cpp
|
crypto_libdash_crypto_a_SOURCES += crypto/sha256_sse4.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__amd64__)
|
#if defined(__x86_64__) || defined(__amd64__)
|
||||||
#if defined(EXPERIMENTAL_ASM)
|
#if defined(USE_ASM)
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
namespace sha256_sse4
|
namespace sha256_sse4
|
||||||
{
|
{
|
||||||
@ -178,7 +178,7 @@ TransformType Transform = sha256::Transform;
|
|||||||
|
|
||||||
std::string SHA256AutoDetect()
|
std::string SHA256AutoDetect()
|
||||||
{
|
{
|
||||||
#if defined(EXPERIMENTAL_ASM) && (defined(__x86_64__) || defined(__amd64__))
|
#if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__))
|
||||||
uint32_t eax, ebx, ecx, edx;
|
uint32_t eax, ebx, ecx, edx;
|
||||||
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx >> 19) & 1) {
|
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx >> 19) & 1) {
|
||||||
Transform = sha256_sse4::Transform;
|
Transform = sha256_sse4::Transform;
|
||||||
|
Loading…
Reference in New Issue
Block a user