[llvm-commits] [llvm] r127888 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb2.td utils/TableGen/EDEmitter.cpp
Owen Anderson
resistor at mac.com
Fri Mar 18 10:42:55 PDT 2011
Author: resistor
Date: Fri Mar 18 12:42:55 2011
New Revision: 127888
URL: http://llvm.org/viewvc/llvm-project?rev=127888&view=rev
Log:
Thumb2 PC-relative loads require a fixup rather than just an immediate.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/utils/TableGen/EDEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=127888&r1=127887&r2=127888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Fri Mar 18 12:42:55 2011
@@ -95,6 +95,12 @@
let ParserMatchClass = MemMode5AsmOperand;
}
+// t2ldrlabel := imm12
+def t2ldrlabel : Operand<i32> {
+ let EncoderMethod = "getAddrModeImm12OpValue";
+}
+
+
// ADR instruction labels.
def t2adrlabel : Operand<i32> {
let EncoderMethod = "getT2AdrLabelOpValue";
@@ -877,7 +883,7 @@
}
// FIXME: Is the pci variant actually needed?
- def pci : T2Ipc <(outs GPR:$Rt), (ins i32imm:$addr), iii,
+ def pci : T2Ipc <(outs GPR:$Rt), (ins t2ldrlabel:$addr), iii,
opc, ".w\t$Rt, $addr",
[(set GPR:$Rt, (opnode (ARMWrapper tconstpool:$addr)))]> {
let isReMaterializable = 1;
Modified: llvm/trunk/utils/TableGen/EDEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/EDEmitter.cpp?rev=127888&r1=127887&r2=127888&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/EDEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/EDEmitter.cpp Fri Mar 18 12:42:55 2011
@@ -602,6 +602,7 @@
IMM("shr_imm16");
IMM("shr_imm32");
IMM("shr_imm64");
+ IMM("t2ldrlabel");
MISC("brtarget", "kOperandTypeARMBranchTarget"); // ?
MISC("uncondbrtarget", "kOperandTypeARMBranchTarget"); // ?
More information about the llvm-commits
mailing list