diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-03-22 05:26:03 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-03-22 05:26:03 +0000 |
| commit | e5ba580ab05b18eaa9fd4d36e31466e41f693ad9 (patch) | |
| tree | ea873c31ab21fc81c9a69d02c84b8cdb0f0b82c7 /lib/Target/PowerPC/PPCAsmPrinter.cpp | |
| parent | 6df1154644a0044636022a2ec9810bbacd5f8d30 (diff) | |
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
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9b33dd4bcb..6fb6e5fd1e 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -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 |
