mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fixed the LLVM ARM v7 assembler and instruction printer for 8-bit immediate offset addressing. The assembler and instruction printer were not properly handeling the #-0 immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156608 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -426,9 +426,13 @@ void ARMInstPrinter::printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned Op,
|
||||
return;
|
||||
}
|
||||
|
||||
if (unsigned ImmOffs = ARM_AM::getAM3Offset(MO3.getImm()))
|
||||
//If the op is sub we have to print the immediate even if it is 0
|
||||
unsigned ImmOffs = ARM_AM::getAM3Offset(MO3.getImm());
|
||||
ARM_AM::AddrOpc op = ARM_AM::getAM3Op(MO3.getImm());
|
||||
|
||||
if (ImmOffs || (op == ARM_AM::sub))
|
||||
O << ", #"
|
||||
<< ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO3.getImm()))
|
||||
<< ARM_AM::getAddrOpcStr(op)
|
||||
<< ImmOffs;
|
||||
O << ']';
|
||||
}
|
||||
|
Reference in New Issue
Block a user