[llvm] r186459 - ARM: Add support for the Thumb2 PLI alternate literal form.
Tilmann Scheller
tilmann.scheller at googlemail.com
Tue Jul 16 14:52:35 PDT 2013
Author: tilmann
Date: Tue Jul 16 16:52:34 2013
New Revision: 186459
URL: http://llvm.org/viewvc/llvm-project?rev=186459&view=rev
Log:
ARM: Add support for the Thumb2 PLI alternate literal form.
This adds an instruction alias to make the assembler recognize the alternate literal form: pli [PC, #+/-<imm>]
See A8.8.129 in the ARM ARM (DDI 0406C.b).
Fixes <rdar://problem/14403733>.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=186459&r1=186458&r2=186459&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Jul 16 16:52:34 2013
@@ -4427,3 +4427,6 @@ def : t2InstAlias<"ldrsh${p}.w $Rt, $add
def : t2InstAlias<"add${p} $Rd, pc, $imm",
(t2ADR rGPR:$Rd, imm0_4095:$imm, pred:$p)>;
+
+// PLI with alternate literal form.
+def : t2InstAlias<"pli${p} $addr", (t2PLIpci t2ldr_pcrel_imm12:$addr, pred:$p)>;
Modified: llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s?rev=186459&r1=186458&r2=186459&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s Tue Jul 16 16:52:34 2013
@@ -1599,12 +1599,16 @@ _func:
pli [r6, #33]
pli [r6, #257]
pli [r7, #257]
+ pli [pc, #+4095]
+ pli [pc, #-4095]
@ CHECK: pli [r5, #-4] @ encoding: [0x15,0xf9,0x04,0xfc]
@ CHECK: pli [r6, #32] @ encoding: [0x96,0xf9,0x20,0xf0]
@ CHECK: pli [r6, #33] @ encoding: [0x96,0xf9,0x21,0xf0]
@ CHECK: pli [r6, #257] @ encoding: [0x96,0xf9,0x01,0xf1]
@ CHECK: pli [r7, #257] @ encoding: [0x97,0xf9,0x01,0xf1]
+@ CHECK: pli [pc, #4095] @ encoding: [0x9f,0xf9,0xff,0xff]
+@ CHECK: pli [pc, #-4095] @ encoding: [0x1f,0xf9,0xff,0xff]
@------------------------------------------------------------------------------
More information about the llvm-commits
mailing list