From 6597bec74ffdff6671ab444e08d9fbac424567b7 Mon Sep 17 00:00:00 2001 From: marcfedorow Date: Thu, 25 Nov 2021 15:38:02 +0300 Subject: [PATCH 1/2] Fix RVTEST_FP_ENABLE macro Reset fcsr before every testset. Fixes #223 --- riscv-test-suite/env/arch_test.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/riscv-test-suite/env/arch_test.h b/riscv-test-suite/env/arch_test.h index 26f918716..ab255fca1 100644 --- a/riscv-test-suite/env/arch_test.h +++ b/riscv-test-suite/env/arch_test.h @@ -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);\ From 748d6c394d452a6852991524ce1cfe8226e3b07b Mon Sep 17 00:00:00 2001 From: marcfedorow Date: Mon, 6 Dec 2021 13:26:31 +0300 Subject: [PATCH 2/2] fixup! Fix RVTEST_FP_ENABLE macro Added changelog entery --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e0280883..14da62be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## [2.6.1] - 2021-11-25 + - Fixed RVTEST_FP_ENABLE macro for the issue #223 + ## [2.6.0] - 2021-10-21 - Added rv64d tests, references, coverage files and data propagation reports - removed unwated re-assignment of macros for RV64F combination in `arch_test.h`