arm: Fix disasm printing

Fix the printDataInst function to properly print the immediate value.
This commit is contained in:
Nathanael Premillieu 2016-03-16 16:08:24 +00:00
parent b8c1e370fa
commit f9cae4ae58
2 changed files with 3 additions and 3 deletions

View file

@ -559,7 +559,7 @@ void
ArmStaticInst::printDataInst(std::ostream &os, bool withImm, ArmStaticInst::printDataInst(std::ostream &os, bool withImm,
bool immShift, bool s, IntRegIndex rd, IntRegIndex rn, bool immShift, bool s, IntRegIndex rd, IntRegIndex rn,
IntRegIndex rm, IntRegIndex rs, uint32_t shiftAmt, IntRegIndex rm, IntRegIndex rs, uint32_t shiftAmt,
ArmShiftType type, uint32_t imm) const ArmShiftType type, uint64_t imm) const
{ {
printMnemonic(os, s ? "s" : ""); printMnemonic(os, s ? "s" : "");
bool firstOp = true; bool firstOp = true;
@ -581,7 +581,7 @@ ArmStaticInst::printDataInst(std::ostream &os, bool withImm,
if (!firstOp) if (!firstOp)
os << ", "; os << ", ";
if (withImm) { if (withImm) {
ccprintf(os, "#%d", imm); ccprintf(os, "#%ld", imm);
} else { } else {
printShiftOperand(os, rm, immShift, shiftAmt, rs, type); printShiftOperand(os, rm, immShift, shiftAmt, rs, type);
} }

View file

@ -180,7 +180,7 @@ class ArmStaticInst : public StaticInst
void printDataInst(std::ostream &os, bool withImm, bool immShift, bool s, void printDataInst(std::ostream &os, bool withImm, bool immShift, bool s,
IntRegIndex rd, IntRegIndex rn, IntRegIndex rm, IntRegIndex rd, IntRegIndex rn, IntRegIndex rm,
IntRegIndex rs, uint32_t shiftAmt, ArmShiftType type, IntRegIndex rs, uint32_t shiftAmt, ArmShiftType type,
uint32_t imm) const; uint64_t imm) const;
void void
advancePC(PCState &pcState) const advancePC(PCState &pcState) const