diff options
| author | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2013-07-19 16:18:56 +0000 |
|---|---|---|
| committer | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2013-07-19 16:18:56 +0000 |
| commit | 34869503cb814221b3260399835e02f68e69ee02 (patch) | |
| tree | 918a415c0decf51b3d767cba8c8b70b68911b970 | |
| parent | ff6c5a5609c9eb7f1d4a93b48e651759e073a9cd (diff) | |
| download | bcm5719-llvm-34869503cb814221b3260399835e02f68e69ee02.tar.gz bcm5719-llvm-34869503cb814221b3260399835e02f68e69ee02.zip | |
ARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.
See A8.8.127 in ARM DDI 0406C.b.
Related to <rdar://problem/14403733>.
llvm-svn: 186682
| -rw-r--r-- | llvm/lib/Target/ARM/ARMInstrThumb2.td | 7 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/basic-thumb2-instructions.s | 3 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/thumb2-pldw.s | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb2.td b/llvm/lib/Target/ARM/ARMInstrThumb2.td index f014e02de2c..fdbf5ae7332 100644 --- a/llvm/lib/Target/ARM/ARMInstrThumb2.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb2.td @@ -4428,7 +4428,12 @@ def : t2InstAlias<"ldrsh${p}.w $Rt, $addr", def : t2InstAlias<"add${p} $Rd, pc, $imm", (t2ADR rGPR:$Rd, imm0_4095:$imm, pred:$p)>; -// PLI with alternate literal form. +// PLD/PLDW/PLI with alternate literal form. +def : t2InstAlias<"pld${p} $addr", + (t2PLDpci t2ldr_pcrel_imm12:$addr, pred:$p)>; +def : InstAlias<"pldw${p} $addr", + (t2PLDWpci t2ldr_pcrel_imm12:$addr, pred:$p)>, + Requires<[IsThumb2,HasV7,HasMP]>; def : InstAlias<"pli${p} $addr", (t2PLIpci t2ldr_pcrel_imm12:$addr, pred:$p)>, Requires<[IsThumb2,HasV7]>; diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s index 50a505e1d3c..2bd9a133384 100644 --- a/llvm/test/MC/ARM/basic-thumb2-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s @@ -1573,6 +1573,9 @@ _func: @ FIXME: pld _foo @ encoding: [0x9f'A',0xf8'A',A,0xf0'A'] @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12 + pld [pc,#-4095] +@ CHECK: pld [pc, #-4095] @ encoding: [0x1f,0xf8,0xff,0xff] + @------------------------------------------------------------------------------ @ PLD(register) diff --git a/llvm/test/MC/ARM/thumb2-pldw.s b/llvm/test/MC/ARM/thumb2-pldw.s new file mode 100644 index 00000000000..7acbd39cbd3 --- /dev/null +++ b/llvm/test/MC/ARM/thumb2-pldw.s @@ -0,0 +1,7 @@ +@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -mattr=+mp -show-encoding < %s | FileCheck %s + +@------------------------------------------------------------------------------ +@ PLD(literal) +@------------------------------------------------------------------------------ + pldw [pc,#-4095] +@ CHECK: pldw [pc, #-4095] @ encoding: [0x3f,0xf8,0xff,0xff] |

