Eliminate more * 4 in Thumb1 asm printing for consistency sake.

llvm-svn: 89325
This commit is contained in:
Evan Cheng 2009-11-19 06:31:26 +00:00
parent 4713b282ce
commit 547abae38d
1 changed files with 4 additions and 4 deletions

View File

@ -713,7 +713,7 @@ ARMAsmPrinter::printThumbAddrModeRI5Operand(const MachineInstr *MI, int Op,
if (MO3.getReg())
O << ", " << getRegisterName(MO3.getReg());
else if (unsigned ImmOffs = MO2.getImm())
O << ", #" << ImmOffs * Scale;
O << ", #+" << ImmOffs * Scale;
O << "]";
}
@ -735,7 +735,7 @@ void ARMAsmPrinter::printThumbAddrModeSPOperand(const MachineInstr *MI,int Op) {
const MachineOperand &MO2 = MI->getOperand(Op+1);
O << "[" << getRegisterName(MO1.getReg());
if (unsigned ImmOffs = MO2.getImm())
O << ", #" << ImmOffs << " * 4";
O << ", #+" << ImmOffs*4;
O << "]";
}
@ -801,9 +801,9 @@ void ARMAsmPrinter::printT2AddrModeImm8s4Operand(const MachineInstr *MI,
int32_t OffImm = (int32_t)MO2.getImm() / 4;
// Don't print +0.
if (OffImm < 0)
O << ", #-" << -OffImm << " * 4";
O << ", #-" << -OffImm * 4;
else if (OffImm > 0)
O << ", #+" << OffImm << " * 4";
O << ", #+" << OffImm * 4;
O << "]";
}