From: Nathanael Premillieu Date: Wed, 16 Mar 2016 16:08:24 +0000 (+0000) Subject: arm: Fix disasm printing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9cae4ae583fb68e92f52df9f5ab8d02271dfea9;p=gem5.git arm: Fix disasm printing Fix the printDataInst function to properly print the immediate value. --- diff --git a/src/arch/arm/insts/static_inst.cc b/src/arch/arm/insts/static_inst.cc index 9f878ac4d..6fdd07ff6 100644 --- a/src/arch/arm/insts/static_inst.cc +++ b/src/arch/arm/insts/static_inst.cc @@ -559,7 +559,7 @@ void ArmStaticInst::printDataInst(std::ostream &os, bool withImm, bool immShift, bool s, IntRegIndex rd, IntRegIndex rn, IntRegIndex rm, IntRegIndex rs, uint32_t shiftAmt, - ArmShiftType type, uint32_t imm) const + ArmShiftType type, uint64_t imm) const { printMnemonic(os, s ? "s" : ""); bool firstOp = true; @@ -581,7 +581,7 @@ ArmStaticInst::printDataInst(std::ostream &os, bool withImm, if (!firstOp) os << ", "; if (withImm) { - ccprintf(os, "#%d", imm); + ccprintf(os, "#%ld", imm); } else { printShiftOperand(os, rm, immShift, shiftAmt, rs, type); } diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh index 4a01bcc5d..d4684c78f 100644 --- a/src/arch/arm/insts/static_inst.hh +++ b/src/arch/arm/insts/static_inst.hh @@ -180,7 +180,7 @@ class ArmStaticInst : public StaticInst void printDataInst(std::ostream &os, bool withImm, bool immShift, bool s, IntRegIndex rd, IntRegIndex rn, IntRegIndex rm, IntRegIndex rs, uint32_t shiftAmt, ArmShiftType type, - uint32_t imm) const; + uint64_t imm) const; void advancePC(PCState &pcState) const