mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add support for "ri" addressing modes where the immediate is a 14-bit field
which is shifted left two bits before use. Instructions like STD use this addressing mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -201,6 +201,20 @@ namespace {
|
||||
printOperand(MI, OpNo+1);
|
||||
O << ')';
|
||||
}
|
||||
void printMemRegImmShifted(const MachineInstr *MI, unsigned OpNo) {
|
||||
if (MI->getOperand(OpNo).isImmediate())
|
||||
printS16X4ImmOperand(MI, OpNo);
|
||||
else
|
||||
printSymbolLo(MI, OpNo);
|
||||
O << '(';
|
||||
if (MI->getOperand(OpNo+1).isRegister() &&
|
||||
MI->getOperand(OpNo+1).getReg() == PPC::R0)
|
||||
O << "0";
|
||||
else
|
||||
printOperand(MI, OpNo+1);
|
||||
O << ')';
|
||||
}
|
||||
|
||||
void printMemRegReg(const MachineInstr *MI, unsigned OpNo) {
|
||||
// When used as the base register, r0 reads constant zero rather than
|
||||
// the value contained in the register. For this reason, the darwin
|
||||
|
||||
Reference in New Issue
Block a user