Skip to content

Commit f07cead

Browse files
build: Don't call assembly an optimization
because we don't know whether it's an optimization.
1 parent 2f0762f commit f07cead

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

CMakeLists.txt

+5-5
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}")

configure.ac

+7-7
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)