[llvm-commits] [llvm] r155983 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb.td test/MC/ARM/basic-thumb-instructions.s test/MC/ARM/thumb-diagnostics.s test/MC/ARM/thumb.s test/MC/Disassembler/ARM/thumb1.txt
Richard Barton
richard.barton at arm.com
Wed May 2 02:43:18 PDT 2012
Author: rbarton
Date: Wed May 2 04:43:18 2012
New Revision: 155983
URL: http://llvm.org/viewvc/llvm-project?rev=155983&view=rev
Log:
Disallow YIELD and other allocated nop hints in pre-ARMv6 architectures.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
llvm/trunk/test/MC/ARM/thumb-diagnostics.s
llvm/trunk/test/MC/ARM/thumb.s
llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=155983&r1=155982&r2=155983&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Wed May 2 04:43:18 2012
@@ -258,16 +258,20 @@
Requires<[IsThumb2]>;
def tYIELD : T1pI<(outs), (ins), NoItinerary, "yield", "", []>,
- T1SystemEncoding<0x10>; // A8.6.410
+ T1SystemEncoding<0x10>, // A8.6.410
+ Requires<[IsThumb2]>;
def tWFE : T1pI<(outs), (ins), NoItinerary, "wfe", "", []>,
- T1SystemEncoding<0x20>; // A8.6.408
+ T1SystemEncoding<0x20>, // A8.6.408
+ Requires<[IsThumb2]>;
def tWFI : T1pI<(outs), (ins), NoItinerary, "wfi", "", []>,
- T1SystemEncoding<0x30>; // A8.6.409
+ T1SystemEncoding<0x30>, // A8.6.409
+ Requires<[IsThumb2]>;
def tSEV : T1pI<(outs), (ins), NoItinerary, "sev", "", []>,
- T1SystemEncoding<0x40>; // A8.6.157
+ T1SystemEncoding<0x40>, // A8.6.157
+ Requires<[IsThumb2]>;
// The imm operand $val can be used by a debugger to store more information
// about the breakpoint.
Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=155983&r1=155982&r2=155983&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Wed May 2 04:43:18 2012
@@ -635,13 +635,3 @@
@ CHECK: uxth r1, r4 @ encoding: [0xa1,0xb2]
- at ------------------------------------------------------------------------------
-@ WFE/WFI/YIELD
- at ------------------------------------------------------------------------------
- wfe
- wfi
- yield
-
-@ CHECK: wfe @ encoding: [0x20,0xbf]
-@ CHECK: wfi @ encoding: [0x30,0xbf]
-@ CHECK: yield @ encoding: [0x10,0xbf]
Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=155983&r1=155982&r2=155983&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Wed May 2 04:43:18 2012
@@ -138,3 +138,21 @@
@ CHECK-ERRORS: error: source register must be the same as destination
@ CHECK-ERRORS: add r2, sp, ip
@ CHECK-ERRORS: ^
+
+ at ------------------------------------------------------------------------------
+@ WFE/WFI/YIELD - are not supported pre v6T2
+ at ------------------------------------------------------------------------------
+ wfe
+ wfi
+ yield
+
+@ CHECK-ERRORS: error: instruction requires: thumb2
+@ CHECK-ERRORS: wfe
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: instruction requires: thumb2
+@ CHECK-ERRORS: wfi
+@ CHECK-ERRORS: ^
+@ CHECK-ERRORS: error: instruction requires: thumb2
+@ CHECK-ERRORS: yield
+@ CHECK-ERRORS: ^
+
Modified: llvm/trunk/test/MC/ARM/thumb.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb.s?rev=155983&r1=155982&r2=155983&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb.s (original)
+++ llvm/trunk/test/MC/ARM/thumb.s Wed May 2 04:43:18 2012
@@ -44,13 +44,6 @@
nop
@ CHECK: nop @ encoding: [0xc0,0x46]
- wfe
- wfi
- yield
-@ CHECK: wfe @ encoding: [0x20,0xbf]
-@ CHECK: wfi @ encoding: [0x30,0xbf]
-@ CHECK: yield @ encoding: [0x10,0xbf]
-
cpsie aif
@ CHECK: cpsie aif @ encoding: [0x67,0xb6]
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt?rev=155983&r1=155982&r2=155983&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb1.txt Wed May 2 04:43:18 2012
@@ -516,15 +516,3 @@
0xd7 0xb2
0xa1 0xb2
-
-
-#------------------------------------------------------------------------------
-# WFE/WFI/YIELD
-#------------------------------------------------------------------------------
-# CHECK: wfe
-# CHECK: wfi
-# CHECK: yield
-
-0x20 0xbf
-0x30 0xbf
-0x10 0xbf
More information about the llvm-commits
mailing list