Skip to content

Commit

Permalink
Fix RVTEST_FP_ENABLE macro
Browse files Browse the repository at this point in the history
Reset fcsr before every testset.
Fixes #223
  • Loading branch information
marcfedorow committed Nov 25, 2021
1 parent c0d882b commit 6597bec
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions riscv-test-suite/env/arch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,10 @@

#define RVTEST_CASE(_PNAME,_DSTR,...)

#define RVTEST_FP_ENABLE()\
LI x2, MSTATUS_FS;\
csrrs x3, mstatus,x0;\
or x2, x3, x2;\
csrrw x0,mstatus,x2;
#define RVTEST_FP_ENABLE() \
li a0, MSTATUS_FS & (MSTATUS_FS >> 1); \
csrs mstatus, a0; \
csrwi fcsr, 0

#define RVTEST_SIGBASE(_R,_TAG) \
LA(_R,_TAG);\
Expand Down

0 comments on commit 6597bec

Please sign in to comment.