mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 03:29:40 +00:00
Eliminate more * 4 in Thumb1 asm printing for consistency sake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2045c47aff
commit
a64ce45917
@ -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
Block a user