[PATCH] D26499: [ARM] Thumb2 LDR (literal) should accept PC as the destination
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 05:30:32 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286446: [ARM] Thumb2 LDR (literal) should accept PC as the destination (authored by olista01).
Changed prior to commit:
https://reviews.llvm.org/D26499?vs=77472&id=77474#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26499
Files:
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
Index: llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
===================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
+++ llvm/trunk/test/MC/ARM/basic-thumb2-instructions.s
@@ -886,6 +886,7 @@
ldr.w r5, _foo
ldr lr, (_strcmp-4)
ldr sp, _foo
+ ldr pc, _foo
@ CHECK: ldr.w r5, _foo @ encoding: [0x5f'A',0xf8'A',A,0x50'A']
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
@@ -899,6 +900,10 @@
@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
@ CHECK-BE: ldr.w sp, _foo @ encoding: [0xf8'A',0x5f'A',0xd0'A',A]
@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
+@ CHECK: ldr.w pc, _foo @ encoding: [0x5f'A',0xf8'A',A,0xf0'A']
+@ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
+@ CHECK-BE: ldr.w pc, _foo @ encoding: [0xf8'A',0x5f'A',0xf0'A',A]
+@ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
ldr r7, [pc, #8]
ldr.n r7, [pc, #8]
Index: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
@@ -4407,7 +4407,7 @@
(t2LDRSHs rGPR:$Rt, t2addrmode_so_reg:$addr, pred:$p)>;
def : t2InstAlias<"ldr${p} $Rt, $addr",
- (t2LDRpci GPRnopc:$Rt, t2ldrlabel:$addr, pred:$p)>;
+ (t2LDRpci GPR:$Rt, t2ldrlabel:$addr, pred:$p)>;
def : t2InstAlias<"ldrb${p} $Rt, $addr",
(t2LDRBpci rGPR:$Rt, t2ldrlabel:$addr, pred:$p)>;
def : t2InstAlias<"ldrh${p} $Rt, $addr",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26499.77474.patch
Type: text/x-patch
Size: 1800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161110/9d338ecb/attachment.bin>
More information about the llvm-commits
mailing list