rationalize pico_float/pico_double libraries #2208

Merged
kilograham merged 8 commits from pico_float_double_cleanup into develop 2025-02-04 16:19:17 -06:00
kilograham commented 2025-01-23 16:45:46 -06:00 (Migrated from github.com)
  • 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
* 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
kilograham commented 2025-01-23 16:46:07 -06:00 (Migrated from github.com)

fixes #2160

fixes #2160
kilograham commented 2025-01-23 16:49:46 -06:00 (Migrated from github.com)

cc @armandomontanez - i fixed up the main bazel build, but did not attempt to add the new tests

cc @armandomontanez - i fixed up the main bazel build, but did not attempt to add the new tests
lurch (Migrated from github.com) reviewed 2025-01-24 05:32:25 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 05:32:25 -06:00

Some kind of copy-paste typo? "compiler built-ins when and math library functions"

Some kind of copy-paste typo? "compiler built-ins when and math library functions"
lurch (Migrated from github.com) reviewed 2025-01-24 05:36:00 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 05:36:00 -06:00

"methods versions" doesn't sound right?

"methods versions" doesn't sound right?
lurch (Migrated from github.com) reviewed 2025-01-24 05:38:54 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 05:38:54 -06:00

Was the fma_flast here supposed to say fma_fast ?

Was the `fma_flast` here supposed to say `fma_fast` ?
lurch (Migrated from github.com) reviewed 2025-01-24 05:47:27 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:47:27 -06:00

nit: capital N on no here?

nit: capital N on `no` here?
lurch (Migrated from github.com) reviewed 2025-01-24 05:48:38 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:48:38 -06:00

"however allows" -> "however it allows" ?

"however allows" -> "however it allows" ?
lurch (Migrated from github.com) reviewed 2025-01-24 05:49:06 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:49:06 -06:00

"ot" -> "to"

"ot" -> "to"
lurch (Migrated from github.com) reviewed 2025-01-24 05:49:36 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:49:36 -06:00

Also flot -> float ? 😉

Also `flot` -> `float` ? :wink:
lurch (Migrated from github.com) reviewed 2025-01-24 05:51:35 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:51:35 -06:00

Same "when and" typo as earlier.

Same "when and" typo as earlier.
lurch (Migrated from github.com) reviewed 2025-01-24 05:53:43 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:53:43 -06:00

"methods versions" again

"methods versions" again
lurch (Migrated from github.com) reviewed 2025-01-24 05:56:13 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 05:56:13 -06:00

Was this supposed to be LIB_PICO_FLOAT_PICO_VFP ?

Was this supposed to be `LIB_PICO_FLOAT_PICO_VFP` ?
lurch (Migrated from github.com) reviewed 2025-01-24 05:59:12 -06:00
@ -79,4 +79,31 @@ else ()
target_link_libraries(m33 pico_double pico_stdlib)
lurch (Migrated from github.com) commented 2025-01-24 05:59:11 -06:00

Why the commented-out if() here? Would it make sense to remove it?

Why the commented-out `if()` here? Would it make sense to remove it?
lurch (Migrated from github.com) reviewed 2025-01-24 06:02:43 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
lurch (Migrated from github.com) commented 2025-01-24 06:02:43 -06:00

Are the mentions of pico_float_vfp here (and elsewhere) supposed to be pico_float_pico_vfp ? 🤷

Are the mentions of `pico_float_vfp` here (and elsewhere) supposed to be `pico_float_pico_vfp` ? :shrug:
lurch (Migrated from github.com) reviewed 2025-01-24 06:05:41 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 06:05:41 -06:00

"curretly" -> "currently"
(and also on lines 123 and 130)

"curretly" -> "currently" (and also on lines 123 and 130)
lurch (Migrated from github.com) reviewed 2025-01-24 06:08:49 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 06:08:49 -06:00

This is the only mention of pico_double_pico_vfp in this PR, and pico_double_vfp also appears 5 times. I've no idea which version is correct! (Perhaps they both are?)

This is the _only_ mention of `pico_double_pico_vfp` in this PR, and `pico_double_vfp` also appears 5 times. I've no idea which version is correct! (Perhaps they both are?)
lurch (Migrated from github.com) reviewed 2025-01-24 06:10:01 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-24 06:10:01 -06:00

nit: Should probably be a colon at the end of this line? (and same in float.h)

nit: Should probably be a colon at the end of this line? (and same in `float.h`)
armandomontanez commented 2025-01-24 11:29:19 -06:00 (Migrated from github.com)

cc @armandomontanez - i fixed up the main bazel build, but did not attempt to add the new tests

Thanks for the heads up. If Bazel starts to get in the way, just temporarily disable the checks and I'll do a pass to make it happy again.

> cc @armandomontanez - i fixed up the main bazel build, but did not attempt to add the new tests Thanks for the heads up. If Bazel starts to get in the way, just temporarily disable the checks and I'll do a pass to make it happy again.
kilograham (Migrated from github.com) reviewed 2025-01-24 17:08:16 -06:00
@ -21,68 +21,296 @@ extern "C" {
*
kilograham (Migrated from github.com) commented 2025-01-24 17:08:16 -06:00

yup; i copied and pasted ;-)

yup; i copied and pasted ;-)
lurch (Migrated from github.com) reviewed 2025-01-25 06:57:22 -06:00
@ -16,50 +16,153 @@ extern "C" {
#endif
lurch (Migrated from github.com) commented 2025-01-25 06:57:21 -06:00

There's still several mentions of pico_double_vfp, which (unlike pico_float_pico_vfp) isn't listed earlier as one of the available pico_double "flavours"?

There's still several mentions of `pico_double_vfp`, which (unlike `pico_float_pico_vfp`) isn't listed earlier as one of the available pico_double "flavours"?
lurch (Migrated from github.com) reviewed 2025-01-25 07:06:41 -06:00
@ -0,0 +238,4 @@
test_checki(double2fix_z(3.25, 2), 13, "double2fix_z7");
test_checki(double2fix_z(-3.24999, 2), -12, "double2fix_z8");
test_checki(double2fix_z(-3.25, 2), -13, "double2fix_z9");
test_checki(double2fix_z(-0.75, 1), -1, "double2fix_z10");
lurch (Migrated from github.com) commented 2025-01-25 07:06:41 -06:00

You've now used "double2int6" twice, but every other test_check label is unique.

You've now used "double2int6" twice, but every other test_check label is unique.
kilograham commented 2025-02-04 16:18:39 -06:00 (Migrated from github.com)

merging fixes post review with mark

merging fixes post review with mark
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2208
No description provided.