summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathanael Premillieu <nathanael.premillieu@arm.com>2016-03-16 16:08:24 +0000
committerNathanael Premillieu <nathanael.premillieu@arm.com>2016-03-16 16:08:24 +0000
commitf9cae4ae583fb68e92f52df9f5ab8d02271dfea9 (patch)
tree48eaf222e9599c455da6d646a916825ff276c2c4 /src
parentb8c1e370faca4513c102e17e57f2e00791189644 (diff)
downloadgem5-f9cae4ae583fb68e92f52df9f5ab8d02271dfea9.tar.xz
arm: Fix disasm printing
Fix the printDataInst function to properly print the immediate value.
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/insts/static_inst.cc4
-rw-r--r--src/arch/arm/insts/static_inst.hh2
2 files changed, 3 insertions, 3 deletions
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