* ensure that fix<>float methods (not inline versions) are called too in VFP tests
* remove sf_table.h include from float.h as it is not part of the public API
* fix float->fixed/int infinite conversions via VFP
* 2 instructions -> 1
* add missing call_ tests for float2fix_z and float2ufix_z
* fix test descriptions
Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
---------
Co-authored-by: Andrew Scheller <andrew.scheller@raspberrypi.com>
* 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
Breaking change for Bazel builds using different binary types, instead of setting PICO_DEFAULT_LINKER_SCRIPT to eg `//src/rp2_common/pico_crt0:no_flash_linker_script` it is now `//src/rp2_common/pico_standard_link:no_flash_linker_script`
* Fix some errors from -fanalyzer.
Includes a genuine bug in multicore_doorbell_claim() which seemed to use the wrong bit for the second core.
* Return NULL instead of panicking on secondary allocation fail in pico_time
Note: the correct solution would be to flush stdout in the short-circuited functions, but this rather destroys the point of making them fast.
This takes care of the common case. For complete/best support use PICO_STDIO_SHORT_CIRCUIT_CLIB_FUNCS=0 when using compiler printf
* 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>
This is an automated change with the following commands:
$ find . -name "BUILD.bazel" -o -name "*.bzl" \
-exec buildifier -lint=fix {} \;
* Add missing `load()` statements for things provided by @rules_cc. This
is required for Bazel >9.
* Sort attributes on build targets.
* Add missing trailing commas where applicable.
``__check_nan<f|d><1|2>`` is hard-coded into ``.text`` instead
of being wrapped with ``<double|float>_section`` like other
``__aeabi*`` functions. When those functions are moved to SRAM,
this leaves ``__check_nan*`` in flash, causing GCC to emit a veneer
call that clobbers ip and corrupts the saved ``lr`` in
``wrapper_func_<d|f><1|2>``.
Fixes#2771
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
These are not statements and shouldn't be terminated by semicolons; in
newer versions of Clang separating these by semicolons results in a
build error.
We can also further simplify `remove_volatile_cast` by using the comma
operator and avoiding the reliance on non-standard GNU extensions.
This is to match upstream declaration and avoid conflicting declaration
error. This declaration will be removed after the next Clang update
since LLVM libc now implements localtime_r but we keep the declaration
for now to allow soft transition for SDK users.