arm: Fix disasm printing
authorNathanael Premillieu <nathanael.premillieu@arm.com>
Wed, 16 Mar 2016 16:08:24 +0000 (16:08 +0000)
committerNathanael Premillieu <nathanael.premillieu@arm.com>
Wed, 16 Mar 2016 16:08:24 +0000 (16:08 +0000)
Fix the printDataInst function to properly print the immediate value.

src/arch/arm/insts/static_inst.cc
src/arch/arm/insts/static_inst.hh

index 9f878ac4d74386264abf6314024fd35a3b0df267..6fdd07ff6da5e0beb28b5a968b25b5acd5e942fb 100644 (file)
@@ -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);
     }
index 4a01bcc5d93cd47dcc14fdc2c6b09cb0c2fe5345..d4684c78fd92408c6d675e38da1dd6638c997a77 100644 (file)
@@ -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