* fix issues with and improve tests for dcp conversions of INFINITES to fixed point values
* improve comments
* fix outstanding todo in __aeabi_dmul via DCP which improves speed/size
* fix missing DCP state saves for float2int, float2uint and float2fix
* slightly improve implementation of saturation of INFINITES
* should not include sf_table.h in double.h
* point out that float/double->fixed/int saturate in the docs
* move some doxygen into RP2350 specific and change include guards ro be RP2350 specific
* more doc tweaks
* fixup check names to be more consistent
* Enable hard-float ABI support for pico_float and pico_double on m33
Resolves#2783
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
* Add (non google) LLVM support, and replace calling convention check with #if defined(__ARM_PCS_VFP)
* switch float.h to use static inline method for int2float() etc in VFP mode rather than #define
* float/double test cleanup - particularly:
- splitting out executable for each test type for pico_float/double_test
- removing undefined behavior from custom_float_funcs_test.c, to de-confuse clang
- add test of denormal->int
Note some tests still fail on llvm libc (at least version 19)
* fix some issues with newer llvm_libc/compiler as used by bazel build
* keep check_configs happy
* another bazel issue
* introduce pico_double_pico_dcp for consistency
* fixup debug output based on previous commit
* remove unnecessary build guard from double_conv_m33.S
* allow -1 for neg_denormal->int rounding towards minus infinity
* Update test/pico_float_test/CMakeLists.txt
Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
* Update test/pico_float_test/CMakeLists.txt
Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
* - add fma/_fast functions to pico_float_test/pico_double_test
- fix guard for TEST_SATURATION in pico_double_test - GCC doesn't clamp either
* - double functions were only wrapped in pico_double_pico not pico_double_pico_dcp explicitly (i.e. explicitly setting double impl to pico_dcp was not selecting our versions)
* avoid extra stack alignment push (per review comment)
* fix fma return code in VFP mode (register transfer was the wrong way around)
* separate PCS=VFP and non-PCS-VFP versions of fma_fast
* remove saving_func_return (which is just bx lr) and fold the separate pop of lr, into a pop of pc
* better fix for wrapping right libraries
* rename some labels from _entry (which is an internal entry point) to _softfp to be clear that these are the function entry points which work with softfp calling conventions
* Make bazel pico_float build not wrap SCI functions on RISC-V to match CMake build
* Split out FMAF as a selectable wrapped item since we don't want to wrap it for VFP
* fix typos
* fix test
---------
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
Co-authored-by: Andy Lin <andylinpersonal@gmail.com>
Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
* switch all .S files to unified asm, and use a new macro `pico_default_asm_setup` to setup compiler to help porting to other compilers. Also some minor tweaks:
* switch some code to use more recent helper methods (e.g. busy_wait_at_least_n_cycles)
* add documentation to host divider header (I had this ages ago and never promoted)
* fixup erroneous docs about 32p32 values in all divider headers
* fix some compiler warnings
* rename recently added `unified_asm` macro to `pico_default_asm`
* Fix various non-GCC warnings (no effect on GCC)
* Reduce use of typeof since non GCC compilers may not support it
* Introduce PICO_C_COMPILER_IS_GNU, PICO_C_COMPILER_IS_CLANG, PICO_C_COMPILER_IS_IAR to CMake as if (CMAKE_C_COMPILER_ID STREQUAL "xxx") is a bit verbose
* Use "unified_asm" macro for all inline asm (it is "volatile __asm" on GNU with a .syntex unified)
* Use NOLOAD instead of COPY in linker scripts (arguably more correct anyway)
* Use the same style for setting _etext in all 4 linker scripts (to the beginning of .data). Clang aligns .data on a 16 byte boundary. Note ideally we'd
add a new symbol __data_source, however that would break backwards compatibility with existing user linker scripts
* Use "a" for .stack, .heap sections because clang complains otherwise, and they are explicitly NOLOAD anyway
* Avoid duplicating __sev, __wfe, __wfi which Clang sometimes seems to provide as built-ins
* Add missing kitchen_sink_blocked_ram binary
* Allow build with LLVM Embedded Toolchain Form ARM v 14.0.0 (unsupported atm)
- 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