summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-12-19 23:06:24 +0000
committerJim Grosbach <grosbach@apple.com>2011-12-19 23:06:24 +0000
commit8648c1018464b743019f6f1c796b200e49b5b8a8 (patch)
treeaf17aef5810d032b238a95c257ea917233d897a7 /llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
parent3184a5e4821ad2d580e1ab7879f21c6bf7cd458c (diff)
downloadbcm5719-llvm-8648c1018464b743019f6f1c796b200e49b5b8a8.tar.gz
bcm5719-llvm-8648c1018464b743019f6f1c796b200e49b5b8a8.zip
ARM assembly parsing and encoding support for LDRD(label).
rdar://9932658 llvm-svn: 146921
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index 662097aee4a..f92bc557fa5 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -436,6 +436,12 @@ void ARMInstPrinter::printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned Op,
void ARMInstPrinter::printAddrMode3Operand(const MCInst *MI, unsigned Op,
raw_ostream &O) {
+ const MCOperand &MO1 = MI->getOperand(Op);
+ if (!MO1.isReg()) { // For label symbolic references.
+ printOperand(MI, Op, O);
+ return;
+ }
+
const MCOperand &MO3 = MI->getOperand(Op+2);
unsigned IdxMode = ARM_AM::getAM3IdxMode(MO3.getImm());
@@ -885,6 +891,11 @@ void ARMInstPrinter::printT2AddrModeImm8s4Operand(const MCInst *MI,
const MCOperand &MO1 = MI->getOperand(OpNum);
const MCOperand &MO2 = MI->getOperand(OpNum+1);
+ if (!MO1.isReg()) { // For label symbolic references.
+ printOperand(MI, OpNum, O);
+ return;
+ }
+
O << "[" << getRegisterName(MO1.getReg());
int32_t OffImm = (int32_t)MO2.getImm() / 4;
OpenPOWER on IntegriCloud