forked from OSchip/llvm-project
Eliminate more * 4 in Thumb1 asm printing for consistency sake.
llvm-svn: 89325
This commit is contained in:
parent
4713b282ce
commit
547abae38d
|
@ -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 << "]";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue