Commit 2ce6c05
riscv: allow single-precision float ABI (lp64f / ilp32f) (#349)
* riscv: allow single-precision float ABI (lp64f / ilp32f)
The header rejected __riscv_float_abi_single with an #error, but
the F and D extensions share the same FCSR. The hard-float inline
implementations below the guard use only csrr/csrw/csrc on fcsr
and fflags, both of which are present whenever F is present. So
lp64f / ilp32f can use the same code path as the double ABI.
Closes #262.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* add CI coverage for the RISC-V single-float ABI (#262)
The lp64f / ilp32f ABI used to be rejected by openlibm_fenv_riscv.h with
an #error. Add a compile-only cross job that rebuilds the static library
with -mabi=lp64f so the removed #error stays removed. A full lp64f
shared-lib link or qemu run is impossible because Ubuntu's
gcc-riscv64-linux-gnu ships only the lp64d sysroot; the static archive
needs no libc link, so it still compiles riscv64/fenv.c (and every other
source) under the single-float ABI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9dc4c05 commit 2ce6c05
2 files changed
Lines changed: 34 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
| 78 | + | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
| |||
0 commit comments