File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,13 @@ set_property(CACHE SECP256K1_ASM PROPERTY STRINGS "AUTO" "OFF" "x86_64" "arm32")
107107check_string_option_value(SECP256K1_ASM)
108108if (SECP256K1_ASM STREQUAL "arm32" )
109109 enable_language (ASM)
110- add_compile_definitions (USE_EXTERNAL_ASM=1)
110+ include (CheckArm32Assembly)
111+ check_arm32_assembly()
112+ if (HAVE_ARM32_ASM)
113+ add_compile_definitions (USE_EXTERNAL_ASM=1)
114+ else ()
115+ message (FATAL_ERROR "ARM32 assembly optimization requested but not available." )
116+ endif ()
111117elseif (SECP256K1_ASM)
112118 include (Check64bitAssembly)
113119 check_64bit_assembly()
Original file line number Diff line number Diff line change 1+ function (check_arm32_assembly)
2+ try_compile (HAVE_ARM32_ASM
3+ ${CMAKE_BINARY_DIR} /check_arm32_assembly
4+ SOURCES ${CMAKE_SOURCE_DIR} /cmake/source_arm32.s
5+ )
6+ endfunction ()
Original file line number Diff line number Diff line change 1+ .syntax unified
2+ .eabi_attribute 24 , 1
3+ .eabi_attribute 25 , 1
4+ .text
5+ . global main
6+ main:
7+ ldr r0 , = 0x002A
8+ mov r7 , # 1
9+ swi 0
You can’t perform that action at this time.
0 commit comments