RISC-V: Handle rouding mode correctly on zfinx
Zfinx has provide fcsr like F, so rouding mode should use fcsr instead of `soft` fenv. libgcc/ChangeLog: * config/riscv/sfp-machine.h (FP_INIT_ROUNDMODE): Check zfinx. (FP_HANDLE_EXCEPTIONS): Ditto.
This commit is contained in:
parent
e1c23189ab
commit
0d40aeb9b8
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
|
|||
|
||||
#define _FP_TININESS_AFTER_ROUNDING 1
|
||||
|
||||
#ifdef __riscv_flen
|
||||
#if defined(__riscv_flen) || defined(__riscv_zfinx)
|
||||
#define FP_INIT_ROUNDMODE \
|
||||
do { \
|
||||
__asm__ volatile ("frrm %0" : "=r" (_frm)); \
|
||||
|
|
Loading…
Add table
Reference in a new issue