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 <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Roger Chang <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Earl Ou <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]