Closed liushuyu closed 2 years ago
From your changes and test result, I think for this issue, we'd better catch up with RVI upstream for fenv related files. Please correct as per my comments and keep in line with the RVI upstream. Then I will merge this PR. Any question please let me know.
Addressed comments.
This pull request fixes several issues with
fenv
handling and should close https://github.com/aosp-riscv/working-group/issues/39.Issues with
fesetenv
There was a typo in
fesetenv
that prevented thefcsr
to be set correctly. The typo has been corrected.Issues with
fesetexcept
fesetexcept
should return-1
when the architecture does not support masking FPU exception vectors.Issues with
tests/fenv_test.cpp
Since RISC-V is a RISC architecture, it should be tested like other RISC architecture:
fesetexcept
should return-1
(indicates the platforms does not support it), andfegetexcept
should always return0
.