From 9cd61d000a33a91f679d4c47f45b89c4b68592d4 Mon Sep 17 00:00:00 2001 From: Roger Chang Date: Fri, 23 Dec 2022 10:05:46 +0800 Subject: [PATCH] arch-riscv: Correct the IllegalInstFault messege of instruction c.addi4spn In Riscv Manual Volumn I: Unpriviledged ISA section 18.5, c.addi4spn will not working if imm == 0, not machInst == 0. It is changed in the https://gem5-review.git.corp.google.com/c/public/gem5/+/66732, and here is the additional patch to the CL. Change-Id: I2a3c9660dc43f1399f68e03c4f59207f869807a0 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66931 Reviewed-by: Yu-hsin Wang Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/arch/riscv/isa/decoder.isa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/riscv/isa/decoder.isa b/src/arch/riscv/isa/decoder.isa index c0703927b4..53d4a4d558 100644 --- a/src/arch/riscv/isa/decoder.isa +++ b/src/arch/riscv/isa/decoder.isa @@ -48,7 +48,7 @@ decode QUADRANT default Unknown::unknown() { CIMM8<5:2> << 6; }}, {{ if (imm == 0) - return std::make_shared("zero instruction", + return std::make_shared("immediate = 0", machInst); Rp2 = rvSext(sp + imm); }}, uint64_t);