From 8c737f63197b6233d16679b8e93de53fd8931f91 Mon Sep 17 00:00:00 2001 From: Haojin Tang Date: Tue, 22 Oct 2024 18:13:25 +0800 Subject: [PATCH 1/2] fix(vf): vfclass should not set xstatus.FS to dirty --- src/isa/riscv64/instr/rvv/vcompute_impl.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/isa/riscv64/instr/rvv/vcompute_impl.c b/src/isa/riscv64/instr/rvv/vcompute_impl.c index 3db21201b..11a97045d 100644 --- a/src/isa/riscv64/instr/rvv/vcompute_impl.c +++ b/src/isa/riscv64/instr/rvv/vcompute_impl.c @@ -1090,8 +1090,10 @@ void floating_arthimetic_instr(int opcode, int is_signed, int widening, int dest } check_vstart_exception(s); if(check_vstart_ignore(s)) { - fp_set_dirty(); - vp_set_dirty(); + if (opcode != FCLASS) { + fp_set_dirty(); + vp_set_dirty(); + } return; } for(word_t idx = vstart->val; idx < vl->val; idx ++) { @@ -1259,8 +1261,10 @@ void floating_arthimetic_instr(int opcode, int is_signed, int widening, int dest rtl_li(s, s0, 0); vcsr_write(IDXVSTART, s0); - fp_set_dirty(); - vp_set_dirty(); + if (opcode != FCLASS) { + fp_set_dirty(); + vp_set_dirty(); + } } void mask_instr(int opcode, Decode *s) { From 8854e4cadc009bcc15f69eebd67194efe4f335a3 Mon Sep 17 00:00:00 2001 From: Haojin Tang Date: Tue, 22 Oct 2024 18:16:14 +0800 Subject: [PATCH 2/2] gg --- src/isa/riscv64/instr/rvv/vcompute_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/isa/riscv64/instr/rvv/vcompute_impl.c b/src/isa/riscv64/instr/rvv/vcompute_impl.c index 11a97045d..6b0cef9be 100644 --- a/src/isa/riscv64/instr/rvv/vcompute_impl.c +++ b/src/isa/riscv64/instr/rvv/vcompute_impl.c @@ -1092,8 +1092,8 @@ void floating_arthimetic_instr(int opcode, int is_signed, int widening, int dest if(check_vstart_ignore(s)) { if (opcode != FCLASS) { fp_set_dirty(); - vp_set_dirty(); } + vp_set_dirty(); return; } for(word_t idx = vstart->val; idx < vl->val; idx ++) { @@ -1263,8 +1263,8 @@ void floating_arthimetic_instr(int opcode, int is_signed, int widening, int dest vcsr_write(IDXVSTART, s0); if (opcode != FCLASS) { fp_set_dirty(); - vp_set_dirty(); } + vp_set_dirty(); } void mask_instr(int opcode, Decode *s) {