Skip to content

Commit 10e6d29

Browse files
committed
Merge #1446: field: Remove x86_64 asm
f07cead build: Don't call assembly an optimization (Tim Ruffing) 2f0762f field: Remove x86_64 asm (Tim Ruffing) Pull request description: ACKs for top commit: sipa: utACK f07cead theStack: ACK f07cead jonasnick: ACK f07cead Tree-SHA512: df7f895ab8ab924c5f8f01c35d0cd2f65d5c947c5ab5325787d169c5b202834ab8aa5d85dedb25839fff3f518097fe8cf8e837d3c1918e5f039ddd6ddf4187da
2 parents 07687e8 + f07cead commit 10e6d29

File tree

6 files changed

+13
-522
lines changed

6 files changed

+13
-522
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ if(SECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY)
107107
endif()
108108
mark_as_advanced(FORCE SECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY)
109109

110-
set(SECP256K1_ASM "AUTO" CACHE STRING "Assembly optimizations to use: \"AUTO\", \"OFF\", \"x86_64\" or \"arm32\" (experimental). [default=AUTO]")
110+
set(SECP256K1_ASM "AUTO" CACHE STRING "Assembly to use: \"AUTO\", \"OFF\", \"x86_64\" or \"arm32\" (experimental). [default=AUTO]")
111111
set_property(CACHE SECP256K1_ASM PROPERTY STRINGS "AUTO" "OFF" "x86_64" "arm32")
112112
check_string_option_value(SECP256K1_ASM)
113113
if(SECP256K1_ASM STREQUAL "arm32")
@@ -117,7 +117,7 @@ if(SECP256K1_ASM STREQUAL "arm32")
117117
if(HAVE_ARM32_ASM)
118118
add_compile_definitions(USE_EXTERNAL_ASM=1)
119119
else()
120-
message(FATAL_ERROR "ARM32 assembly optimization requested but not available.")
120+
message(FATAL_ERROR "ARM32 assembly requested but not available.")
121121
endif()
122122
elseif(SECP256K1_ASM)
123123
include(CheckX86_64Assembly)
@@ -128,14 +128,14 @@ elseif(SECP256K1_ASM)
128128
elseif(SECP256K1_ASM STREQUAL "AUTO")
129129
set(SECP256K1_ASM "OFF")
130130
else()
131-
message(FATAL_ERROR "x86_64 assembly optimization requested but not available.")
131+
message(FATAL_ERROR "x86_64 assembly requested but not available.")
132132
endif()
133133
endif()
134134

135135
option(SECP256K1_EXPERIMENTAL "Allow experimental configuration options." OFF)
136136
if(NOT SECP256K1_EXPERIMENTAL)
137137
if(SECP256K1_ASM STREQUAL "arm32")
138-
message(FATAL_ERROR "ARM32 assembly optimization is experimental. Use -DSECP256K1_EXPERIMENTAL=ON to allow.")
138+
message(FATAL_ERROR "ARM32 assembly is experimental. Use -DSECP256K1_EXPERIMENTAL=ON to allow.")
139139
endif()
140140
endif()
141141

@@ -280,7 +280,7 @@ message("Parameters:")
280280
message(" ecmult window size .................. ${SECP256K1_ECMULT_WINDOW_SIZE}")
281281
message(" ecmult gen precision bits ........... ${SECP256K1_ECMULT_GEN_PREC_BITS}")
282282
message("Optional features:")
283-
message(" assembly optimization ............... ${SECP256K1_ASM}")
283+
message(" assembly ............................ ${SECP256K1_ASM}")
284284
message(" external callbacks .................. ${SECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS}")
285285
if(SECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY)
286286
message(" wide multiplication (test-only) ..... ${SECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY}")

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ noinst_HEADERS += src/field_10x26_impl.h
3737
noinst_HEADERS += src/field_5x52.h
3838
noinst_HEADERS += src/field_5x52_impl.h
3939
noinst_HEADERS += src/field_5x52_int128_impl.h
40-
noinst_HEADERS += src/field_5x52_asm_impl.h
4140
noinst_HEADERS += src/modinv32.h
4241
noinst_HEADERS += src/modinv32_impl.h
4342
noinst_HEADERS += src/modinv64.h

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Implementation details
3333
* Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.")
3434
* Field operations
3535
* Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
36-
* Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys).
36+
* Using 5 52-bit limbs
3737
* Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan).
3838
* This is an experimental feature that has not received enough scrutiny to satisfy the standard of quality of this library but is made available for testing and review by the community.
3939
* Scalar operations

configure.ac

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ AC_ARG_ENABLE(external_default_callbacks,
201201
AC_ARG_WITH([test-override-wide-multiply], [] ,[set_widemul=$withval], [set_widemul=auto])
202202

203203
AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm32|no|auto],
204-
[assembly optimizations to use (experimental: arm32) [default=auto]])],[req_asm=$withval], [req_asm=auto])
204+
[assembly to use (experimental: arm32) [default=auto]])],[req_asm=$withval], [req_asm=auto])
205205

206206
AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE|auto],
207207
[window size for ecmult precomputation for verification, specified as integer in range [2..24].]
@@ -279,24 +279,24 @@ else
279279
x86_64)
280280
SECP_X86_64_ASM_CHECK
281281
if test x"$has_x86_64_asm" != x"yes"; then
282-
AC_MSG_ERROR([x86_64 assembly optimization requested but not available])
282+
AC_MSG_ERROR([x86_64 assembly requested but not available])
283283
fi
284284
;;
285285
arm32)
286286
SECP_ARM32_ASM_CHECK
287287
if test x"$has_arm32_asm" != x"yes"; then
288-
AC_MSG_ERROR([ARM32 assembly optimization requested but not available])
288+
AC_MSG_ERROR([ARM32 assembly requested but not available])
289289
fi
290290
;;
291291
no)
292292
;;
293293
*)
294-
AC_MSG_ERROR([invalid assembly optimization selection])
294+
AC_MSG_ERROR([invalid assembly selection])
295295
;;
296296
esac
297297
fi
298298

299-
# Select assembly optimization
299+
# Select assembly
300300
enable_external_asm=no
301301

302302
case $set_asm in
@@ -309,7 +309,7 @@ arm32)
309309
no)
310310
;;
311311
*)
312-
AC_MSG_ERROR([invalid assembly optimizations])
312+
AC_MSG_ERROR([invalid assembly selection])
313313
;;
314314
esac
315315

@@ -425,7 +425,7 @@ if test x"$enable_experimental" = x"yes"; then
425425
AC_MSG_NOTICE([******])
426426
else
427427
if test x"$set_asm" = x"arm32"; then
428-
AC_MSG_ERROR([ARM32 assembly optimization is experimental. Use --enable-experimental to allow.])
428+
AC_MSG_ERROR([ARM32 assembly is experimental. Use --enable-experimental to allow.])
429429
fi
430430
fi
431431

0 commit comments

Comments
 (0)