Roger Chang has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/67677?usp=email )
(
4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: arch-riscv: Fix incorrect trap value of instruction fault
......................................................................
arch-riscv: Fix incorrect trap value of instruction fault
As we add rv_type bit in machInst at 62, It will get the machine
code with rv_type specification if we just return machInst. We
only need return machine code for handling instruction fault.
Change-Id: I9dd7a25047d4a13df5b47dc9e422345ba44b7b09
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67677
Reviewed-by: Yu-hsin Wang <yuhsi...@google.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/riscv/faults.hh
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Yu-hsin Wang: Looks good to me, approved
kokoro: Regressions pass
Jason Lowe-Power: Looks good to me, approved
diff --git a/src/arch/riscv/faults.hh b/src/arch/riscv/faults.hh
index e664767..f687fd6 100644
--- a/src/arch/riscv/faults.hh
+++ b/src/arch/riscv/faults.hh
@@ -173,7 +173,7 @@
: RiscvFault(n, FaultType::OTHERS, INST_ILLEGAL), _inst(inst)
{}
- RegVal trap_value() const override { return _inst; }
+ RegVal trap_value() const override { return bits(_inst, 31, 0); }
};
class UnknownInstFault : public InstFault
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/67677?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9dd7a25047d4a13df5b47dc9e422345ba44b7b09
Gerrit-Change-Number: 67677
Gerrit-PatchSet: 6
Gerrit-Owner: Roger Chang <rogerycch...@google.com>
Gerrit-Reviewer: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Roger Chang <rogerycch...@google.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Earl Ou <shunhsin...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org