Skip to content

Clang Picolibc FP test failures on RISC-V #838

@stephanosio

Description

@stephanosio

Some Picolibc floating-point tests fail on RV32 and RV64 architectures with hardware FPU (F and D extensions)

For instance, on rv32imafc_zicsr_zifencei:

122/196 picolibc / rounding-mode                           FAIL             1.42s   exit status 4
127/196 picolibc / math_errhandling                        FAIL             1.53s   (exit status 241 or signal 113 SIGinvalid)
194/196 picolibc / test-fma                                FAIL             1.63s   exit status 1
127/196 picolibc / math_errhandling                        FAIL             1.53s   (exit status 241 or signal 113 SIGinvalid)
...
Double tests:
Exceptions claim to be supported, but 0/0 doesn't raise FE_INVALID
Exceptions claim to be supported, but 1/0 doesn't raise FE_DIVBYZERO
Exceptions claim to be supported, but 5e-324*5e-324 doesn't raise FE_UNDERFLOW
Exceptions claim to be supported, but 1.7e+308*1.7e+308 doesn't raise FE_OVERFLOW
122/196 picolibc / rounding-mode                           FAIL             1.42s   exit status 4
...
testing up/down
ERROR up/down: 0 is not > 0
testing up/toward
ERROR up/toward: 0 is not > 0
testing -up/-down
ERROR -up/-down: 0 is not > 0
testing -toward/-down
ERROR -toward/-down: 0 is not > 0
194/196 picolibc / test-fma                                FAIL             1.63s   exit status 1
...
float
double
27: round FE_UPWARD -0x1.0000000000001p-1 * 0x0.0000000000001p-1022 + 0x0p+0 -> got -0x0.0000000000001p-1022 want 0x0p+0
34: round FE_UPWARD 0x0.0000000000001p-1022 * 0x0.0000000000001p-1022 + 0x0p+0 -> got 0x0p+0 want 0x0.0000000000001p-1022
35: round FE_UPWARD 0x0.8p-1022 * 0x0.0000000000001p-1022 + 0x0p+0 -> got 0x0p+0 want 0x0.0000000000001p-1022
36: round FE_UPWARD 0x1.0000000000001p-1022 * 0x0.0000000000001p-1022 + 0x0p+0 -> got 0x0p+0 want 0x0.0000000000001p-1022
37: round FE_UPWARD 0x1.0000000000001p-1021 * 0x0.0000000000001p-1022 + 0x0p+0 -> got 0x0p+0 want 0x0.0000000000001p-1022
...

Full test log: https://gist.githubusercontent.com/stephanosio/1934c4156f0e231651690e118ccf6207/raw/4b4463912991676e1d7e9ae2d6c71405b32a3b89/testlog.txt

$ qemu-system-riscv32 --version
QEMU emulator version 9.1.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions