Hello Andreas Sandberg,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/10061
to review the following change.
Change subject: arch-arm: Change disassemble when MSR to UNKNOWN register
......................................................................
arch-arm: Change disassemble when MSR to UNKNOWN register
This patch changes the fault being thrown when MSR/MRS to an unknown
Misc register in AArch64. While previously the instruction was decoded
as an Unknown instruction (hence not printing any information), it is
now decoded as a FailUnimplemented and the unrecognized System register
numbers (CRn, op0...) are printed.
Change-Id: I205ff7adcde5934231c77e8d2250db69a34581fc
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
---
M src/arch/arm/isa/formats/aarch64.isa
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/arch/arm/isa/formats/aarch64.isa
b/src/arch/arm/isa/formats/aarch64.isa
index 7752ba0..00bd077 100644
--- a/src/arch/arm/isa/formats/aarch64.isa
+++ b/src/arch/arm/isa/formats/aarch64.isa
@@ -369,7 +369,14 @@
}
// Check for invalid registers
if (miscReg == MISCREG_UNKNOWN) {
- return new Unknown64(machInst);
+ auto full_mnemonic =
+ csprintf("%s op0:%d op1:%d crn:%d crm:%d
op2:%d",
+ read ? "mrs" : "msr",
+ op0, op1, crn, crm, op2);
+
+ return new FailUnimplemented(read ? "mrs" : "msr",
+ machInst, full_mnemonic);
+
} else if (miscRegInfo[miscReg][MISCREG_IMPLEMENTED]) {
if (miscReg == MISCREG_NZCV) {
if (read)
--
To view, visit https://gem5-review.googlesource.com/10061
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I205ff7adcde5934231c77e8d2250db69a34581fc
Gerrit-Change-Number: 10061
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev