* 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
* 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.
* miscellaneous cleanup:
* cleanup some #ifdefs which were slightly hacky when RP2350 was added; use HAS_ flags in preference to PICO_RP2040/RP2350
* make some dependencies more explicit - i.e. compile if the user doesn't want to include certain libraries
* cleanup some directory A -> directory B relative path names in CMakeLists.txt to be SDK root -> directory B
* on RP2350 _dcp variant now enables -msoft-float, since if you're using this at all it is likely because you don't want to use the VFP unit at all (to save stack space)
* implement all float_ and double_ conversion functions in all pico_float_pico_ variants and pico_double_pico on RP2040 and RP2350 (many were missing in some combinations)
* provide better granularity of what functions are wrapped in each case
also marked custom_xxx_funcs_test.c as not in bazel build yet
* Fix Bazel build breakages
* Adds support for new PICO_DEFAULT_UART_BAUD_RATE option.
* Fixes issues related to Picotool and boot_picoboot_headers.
* Adds pico_float RISC-V pieces to the Bazel build (not yet fully
tested).
* Adds the missing adafruit board header to the Bazel build.
* Exclude hazard3 float test in Bazel validation script
* Restore missing dependency in hardware_boot_lock
* Add fast single-precision add/sub/mul for Hazard3
* Make test output less noisy. Map -nan to -inf in vector gen. Move random vectors to separate files.
* Re-disable USB stdout for pico_float_test by default...
* Disable pico/float.h exports on RISC-V as these functions aren't implemented
* Add hazard3 instructions to asm_helper. Split hazard3.h to support this.
You can still include hazard3.h to get everything. This just allows you
to pull in less.
* Add host Bazel build
Updates target_compatible_with across the repo to ensure that wildcard
builds for both host and rp2040 succeed.
* Get unit tests building
* Add Python script to identify build system differences
Uses the build system tags to make it easier to identify differences
between the CMake and Bazel builds.
* Temporarily disable pico divider test
* Support PICO_BARE_METAL in Bazel
* Support PICO_NO_GC_SECTIONS in Bazel
* Support boot2 configuration in Bazel
Adds support for PICO_DEFAULT_BOOT_STAGE2 and
PICO_DEFAULT_BOOT_STAGE2_FILE in the Bazel build.
* Allowlist some CMake-only options
* Support CXX configuration options in Bazel
* Move multiple_choice_flag.bzl
* Support all pico boards
* Support linking multiple stdio implementations
Changes the Bazel build so stdio implementations are no longer mutually
exclusive.
* Add PICO_BOOT_STAGE2_LINK_IMAGE
* Support PICO_CMSIS_PATH in Bazel
* Support PICO_USE_DEFAULT_MAX_PAGE_SIZE in Bazel
* Silence PICO_CMSIS_VENDOR and PICO_CMSIS_DEVICE differences
* Support PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS in Bazel
* Properly support version defines
* Support embedding binary info in Bazel
* Embed build type in binary
* Support different linker scripts in Bazel build
* Finish out missing PICO_BUILD_DEFINE in Bazel build
* Support PICO_NO_TARGET_NAME
* Reorganize initial configuration options in Bazel
Cleans up and reorganizes some of the initial configuration options
added to the Bazel build so everything is consistent.
* Add builds for pioasm and elf2uf2
* Use Python rules from rules_python
* Actually link in output formats in pioasm tool
* Make tools have public visibility
* Add UF2 Bazel aspect
* Add TODOs for pioasm/uf2 helpers
* Fix compile flag typo
* Update Bazel SDK configuration strings to match recent CMake changes
* Fix pico_divider test
* Clean up straggling TODOs
* Clarify pico_stdio_test compatibility
* Initial Bazel Pico W support
* Add new files from develop
* Clean up compatibility expressions in Bazel build
* Clean up rp2 constraint handling in Bazel
* More Bazel docs cleanup
* Format Bazel build files
* Consolidate transitions in the Pico SDK
* Make every _allowlist_function_transition explicit
* More docs cleanup
* Add a few missing defines
* Improve PICO_CONFIG_HEADER correctness in Bazel
* Minor docs clarifications
* 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