diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2020-04-06 23:10:03 +0200 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2020-09-09 10:37:55 +0200 |
commit | b477e9102a10813fe629633a48c877c9af46cd32 (patch) | |
tree | 4cbe638aedc330dcc1cb768511be16c392da81e1 /exec.c | |
parent | Update to version 2.21 (diff) | |
download | sis-b477e9102a10813fe629633a48c877c9af46cd32.tar.bz2 |
Map RISC-V FPU CSR on host cpu using fenv.h
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -24,6 +24,7 @@ #include <stdlib.h> #include <stdio.h> #include <ctype.h> +#include <fenv.h> int ext_irl[NCPU]; @@ -114,6 +115,13 @@ div64 (uint32 n1_hi, uint32 n1_low, uint32 n2, uint32 * result, int msigned) *result = (uint32) (n1 & 0xffffffff); } +/* How to clear the accrued FPU exceptions */ +void +clear_accex () +{ + feclearexcept (FE_ALL_EXCEPT); +} + void init_regs (sregs) struct pstate *sregs; @@ -147,7 +155,6 @@ init_regs (sregs) sregs[i].fsi = (int32 *) sregs[i].fd; sregs[i].fsr = 0; sregs[i].fpu_pres = !nfp; - set_fsr (sregs[i].fsr); sregs[i].ildreg = 0; sregs[i].ildtime = 0; |