mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Should never see an indexed load / store with zero offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2acc760165
commit
bdc9869dbf
@ -433,10 +433,11 @@ void ARMAsmPrinter::printAddrMode2OffsetOperand(const MachineInstr *MI, int Op){
|
||||
const MachineOperand &MO2 = MI->getOperand(Op+1);
|
||||
|
||||
if (!MO1.getReg()) {
|
||||
if (ARM_AM::getAM2Offset(MO2.getImm())) // Don't print +0.
|
||||
O << "#"
|
||||
<< (char)ARM_AM::getAM2Op(MO2.getImm())
|
||||
<< ARM_AM::getAM2Offset(MO2.getImm());
|
||||
unsigned ImmOffs = ARM_AM::getAM2Offset(MO2.getImm());
|
||||
assert(ImmOffs && "Malformed indexed load / store!");
|
||||
O << "#"
|
||||
<< (char)ARM_AM::getAM2Op(MO2.getImm())
|
||||
<< ImmOffs;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -483,8 +484,9 @@ void ARMAsmPrinter::printAddrMode3OffsetOperand(const MachineInstr *MI, int Op){
|
||||
}
|
||||
|
||||
unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm());
|
||||
assert(ImmOffs && "Malformed indexed load / store!");
|
||||
O << "#"
|
||||
<< (char)ARM_AM::getAM3Op(MO2.getImm())
|
||||
<< (char)ARM_AM::getAM3Op(MO2.getImm())
|
||||
<< ImmOffs;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user