aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-08-04 18:24:14 +0000
committerOwen Anderson <resistor@mac.com>2011-08-04 18:24:14 +0000
commit154c41dbbc06284efd56782a8bc137a25148918e (patch)
tree4c6673483d45b1580448935a2ad4030912d3ed78 /lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
parent5c4e52e49648c196f629b8623b4aca7e4c0080e3 (diff)
downloadexternal_llvm-154c41dbbc06284efd56782a8bc137a25148918e.zip
external_llvm-154c41dbbc06284efd56782a8bc137a25148918e.tar.gz
external_llvm-154c41dbbc06284efd56782a8bc137a25148918e.tar.bz2
LDCL_POST and STCL_POST need one's-complement offsets, rather than two's complement offsets. Add an appropriate immediate type for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136896 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 2394340..37359ce 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::printPostIdxImm8s4Operand(const MCInst *MI,
+ unsigned OpNum,
+ raw_ostream &O) {
+ const MCOperand &MO = MI->getOperand(OpNum);
+ unsigned Imm = MO.getImm();
+ O << '#' << ((Imm & 256) ? "" : "-") << ((Imm & 0xff) << 2);
+}
+
+
void ARMInstPrinter::printLdStmModeOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
ARM_AM::AMSubMode Mode = ARM_AM::getAM4SubMode(MI->getOperand(OpNum)