From c21a2a54ca366c2e699571b1dddd083a77601831 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 13 Apr 2018 12:05:34 +0100 Subject: [PATCH] arch-arm: Fix Unknown Instruction disassemble Do not print the entire ExtMachInst when disassembling an Unknown Instruction. Change-Id: Icd5908ec0fa430090165b2426372bdeb43c2a155 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/10062 Maintainer: Andreas Sandberg --- src/arch/arm/insts/misc.cc | 2 +- src/arch/arm/insts/misc64.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/insts/misc.cc b/src/arch/arm/insts/misc.cc index d4a2ba2d2..ef78c236e 100644 --- a/src/arch/arm/insts/misc.cc +++ b/src/arch/arm/insts/misc.cc @@ -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)); } diff --git a/src/arch/arm/insts/misc64.cc b/src/arch/arm/insts/misc64.cc index edc916dbb..5bdf6cb94 100644 --- a/src/arch/arm/insts/misc64.cc +++ b/src/arch/arm/insts/misc64.cc @@ -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 -- 2.30.2