aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-05 15:48:21 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-05 15:48:21 +0000
commitca8c70b9536bf351ee92395dae6f99a59c011a3d (patch)
treef3c01daa6046ad1af853641910d823053ad0fa72 /lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
parent9a45008e917b8c1aef01ab717f0df254cdf1af44 (diff)
ARM use a dedicated printer for postidx_reg operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r--lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index 37359cec7f..7972b27290 100644
--- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -382,6 +382,15 @@ void ARMInstPrinter::printPostIdxImm8Operand(const MCInst *MI,
O << '#' << ((Imm & 256) ? "" : "-") << (Imm & 0xff);
}
+void ARMInstPrinter::printPostIdxRegOperand(const MCInst *MI, unsigned OpNum,
+ raw_ostream &O) {
+ const MCOperand &MO1 = MI->getOperand(OpNum);
+ const MCOperand &MO2 = MI->getOperand(OpNum+1);
+
+ O << getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
+ << getRegisterName(MO1.getReg());
+}
+
void ARMInstPrinter::printPostIdxImm8s4Operand(const MCInst *MI,
unsigned OpNum,
raw_ostream &O) {