arch-arm: Fix Unknown Instruction disassemble
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 13 Apr 2018 11:05:34 +0000 (12:05 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 19 Apr 2018 11:59:16 +0000 (11:59 +0000)
Do not print the entire ExtMachInst when disassembling an Unknown
Instruction.

Change-Id: Icd5908ec0fa430090165b2426372bdeb43c2a155
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10062
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/insts/misc.cc
src/arch/arm/insts/misc64.cc

index d4a2ba2d2f03055c088245409adf46b75d88fe0a..ef78c236eb84b83264e1ab529ca7a9d994c0d335 100644 (file)
@@ -324,5 +324,5 @@ RegImmRegShiftOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
 std::string
 UnknownOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
 {
-    return csprintf("%-10s (inst %#08x)", "unknown", machInst);
+    return csprintf("%-10s (inst %#08x)", "unknown", machInst & mask(32));
 }
index edc916dbbe832eb56fbfc6802c5a37887da4e774..5bdf6cb9499aa8f14d040963a2e2fdae4ee3f18b 100644 (file)
@@ -78,7 +78,7 @@ RegRegRegImmOp64::generateDisassembly(
 std::string
 UnknownOp64::generateDisassembly(Addr pc, const SymbolTable *symtab) const
 {
-    return csprintf("%-10s (inst %#08x)", "unknown", machInst);
+    return csprintf("%-10s (inst %#08x)", "unknown", machInst & mask(32));
 }
 
 std::string