574fdee37b
- The divider state needs to be saved for __aeabi_ddiv, __aeabi_fdiv, __aeabi_dtan and __aeabi_ftan or they won't work in interrupts *(probably not used much youd hope), or on an RTOS context switch - Refactored code out for the integer and floating point cases - Improved the floating point 'tests' in passing to check more return values against GCC implementations - Added floating point usage to the IRQ nesting test case
42 lines
1.4 KiB
CMake
42 lines
1.4 KiB
CMake
PROJECT(pico_float_test)
|
|
|
|
add_executable(pico_float_test
|
|
pico_float_test.c
|
|
llvm/call_apsr.S
|
|
)
|
|
|
|
add_executable(pico_double_test
|
|
pico_double_test.c
|
|
llvm/call_apsr.S
|
|
)
|
|
|
|
|
|
#todo split out variants with different flags
|
|
target_compile_definitions(pico_float_test PRIVATE
|
|
PICO_USE_CRT_PRINTF=1 # want full precision output
|
|
# PICO_FLOAT_PROPAGATE_NANS=1
|
|
# PICO_DIVIDER_DISABLE_INTERRUPTS=1
|
|
)
|
|
|
|
#todo split out variants with different flags
|
|
target_compile_definitions(pico_double_test PRIVATE
|
|
PICO_USE_CRT_PRINTF=1 # want full precision output
|
|
PICO_FLOAT_PROPAGATE_NANS=1
|
|
#PICO_DOUBLE_PROPAGATE_NANS=1
|
|
#PICO_DIVIDER_DISABLE_INTERRUPTS=1
|
|
)
|
|
|
|
# handy for testing we aren't pulling in extra stuff
|
|
#target_link_options(pico_float_test PRIVATE -nodefaultlibs)
|
|
|
|
target_include_directories(pico_float_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/llvm)
|
|
target_link_libraries(pico_float_test pico_float pico_stdlib)
|
|
pico_add_extra_outputs(pico_float_test)
|
|
#pico_set_float_implementation(pico_float_test compiler)
|
|
#pico_set_double_implementation(pico_float_test compiler)
|
|
|
|
target_include_directories(pico_double_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/llvm)
|
|
target_link_libraries(pico_double_test pico_double pico_stdlib)
|
|
pico_add_extra_outputs(pico_double_test)
|
|
#pico_set_float_implementation(pico_double_test compiler)
|
|
#pico_set_double_implementation(pico_double_test compiler) |