summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-06-18 19:45:50 +0000
committerJim Grosbach <grosbach@apple.com>2012-06-18 19:45:50 +0000
commit7e99a60857532ca2973cf9dabc790d84a2e15a8a (patch)
treea23f18aa057f260d97a803e5f60b751bc411dade /test
parent325bd661ff57787efddc6b302230f22e9c187655 (diff)
downloadllvm-7e99a60857532ca2973cf9dabc790d84a2e15a8a.tar.gz
llvm-7e99a60857532ca2973cf9dabc790d84a2e15a8a.tar.bz2
llvm-7e99a60857532ca2973cf9dabc790d84a2e15a8a.tar.xz
ARM: Define generic HINT instruction.
The NOP, WFE, WFI, SEV and YIELD instructions are all hints w/ a different immediate value in bits [7,0]. Define a generic HINT instruction and refactor NOP, WFI, WFI, SEV and YIELD to be assembly aliases of that. rdar://11600518 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/basic-arm-instructions.s26
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s16
2 files changed, 34 insertions, 8 deletions
diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s
index 35acb65d2b..0920d715d5 100644
--- a/test/MC/ARM/basic-arm-instructions.s
+++ b/test/MC/ARM/basic-arm-instructions.s
@@ -2711,10 +2711,22 @@ Lforward:
wfilt
yield
yieldne
-
-@ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
-@ CHECK: wfehi @ encoding: [0x02,0xf0,0x20,0x83]
-@ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
-@ CHECK: wfilt @ encoding: [0x03,0xf0,0x20,0xb3]
-@ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3]
-@ CHECK: yieldne @ encoding: [0x01,0xf0,0x20,0x13]
+ hint #5
+ hint #4
+ hint #3
+ hint #2
+ hint #1
+ hint #0
+
+@ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
+@ CHECK: wfehi @ encoding: [0x02,0xf0,0x20,0x83]
+@ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
+@ CHECK: wfilt @ encoding: [0x03,0xf0,0x20,0xb3]
+@ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3]
+@ CHECK: yieldne @ encoding: [0x01,0xf0,0x20,0x13]
+@ CHECK: hint #5 @ encoding: [0x05,0xf0,0x20,0xe3]
+@ CHECK: sev @ encoding: [0x04,0xf0,0x20,0xe3]
+@ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
+@ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
+@ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3]
+@ CHECK: nop @ encoding: [0x00,0xf0,0x20,0xe3]
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index 2104be3694..4cfe2f2111 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -3369,7 +3369,7 @@ _func:
@ CHECK: uxth.w r7, r8 @ encoding: [0x1f,0xfa,0x88,0xf7]
@------------------------------------------------------------------------------
-@ WFE/WFI/YIELD
+@ WFE/WFI/YIELD/HINT
@------------------------------------------------------------------------------
wfe
wfi
@@ -3378,6 +3378,13 @@ _func:
wfelt
wfige
yieldlt
+ hint #5
+ hint.w #5
+ hint.w #4
+ hint #3
+ hint #2
+ hint #1
+ hint #0
@ CHECK: wfe @ encoding: [0x20,0xbf]
@ CHECK: wfi @ encoding: [0x30,0xbf]
@@ -3386,6 +3393,13 @@ _func:
@ CHECK: wfelt @ encoding: [0x20,0xbf]
@ CHECK: wfige @ encoding: [0x30,0xbf]
@ CHECK: yieldlt @ encoding: [0x10,0xbf]
+@ CHECK: hint #5 @ encoding: [0xaf,0xf3,0x05,0x80]
+@ CHECK: hint #5 @ encoding: [0xaf,0xf3,0x05,0x80]
+@ CHECK: sev.w @ encoding: [0xaf,0xf3,0x04,0x80]
+@ CHECK: wfi.w @ encoding: [0xaf,0xf3,0x03,0x80]
+@ CHECK: wfe.w @ encoding: [0xaf,0xf3,0x02,0x80]
+@ CHECK: yield.w @ encoding: [0xaf,0xf3,0x01,0x80]
+@ CHECK: nop.w @ encoding: [0xaf,0xf3,0x00,0x80]
@------------------------------------------------------------------------------