[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / arm11-hint-instr.s
blob4193a686870aba2e0d47f2b18d5c1616b26ee365
1 @ RUN: not llvm-mc -triple=armv6 -show-encoding < %s > %t1 2> %t2
2 @ RUN: FileCheck --check-prefix=CHECK-V6 %s < %t1
3 @ RUN: FileCheck --check-prefix=CHECK-ERROR-V6 %s < %t2
4 @ RUN: llvm-mc -triple=armv6k -show-encoding < %s \
5 @ RUN: | FileCheck --check-prefix=CHECK-ARM %s
6 @ RUN: llvm-mc -triple=armv6t2 -show-encoding < %s \
7 @ RUN: | FileCheck --check-prefix=CHECK-ARM %s
8 @ RUN: not llvm-mc -triple=thumb -mcpu=arm1156t2-s -show-encoding < %s > %t3 2> %t4
9 @ RUN: FileCheck --check-prefix=CHECK-THUMB %s < %t3
10 @ RUN: FileCheck --check-prefix=CHECK-ERROR-THUMB %s < %t4
11 @ RUN: not llvm-mc -triple=armv6m -show-encoding < %s > %t5 2> %t6
12 @ RUN: FileCheck --check-prefix=CHECK-V6M %s < %t5
13 @ RUN: FileCheck --check-prefix=CHECK-ERROR-V6M %s < %t6
15 .syntax unified
17 @------------------------------------------------------------------------------
18 @ YIELD/WFE/WFI/SEV/CLREX - are not supported pre v6K
19 @------------------------------------------------------------------------------
20 nop
21 yield
22 wfe
23 wfi
24 sev
25 clrex
28 @------------------------------------------------------------------------------
29 @ v6 using ARM encoding
30 @------------------------------------------------------------------------------
31 @ CHECK-V6: mov r0, r0 @ encoding: [0x00,0x00,0xa0,0xe1]
32 @ CHECK-ERROR-V6: error: instruction requires: armv6k
33 @ CHECK-ERROR-V6: yield
34 @ CHECK-ERROR-V6: ^
35 @ CHECK-ERROR-V6: error: instruction requires: armv6k
36 @ CHECK-ERROR-V6: wfe
37 @ CHECK-ERROR-V6: ^
38 @ CHECK-ERROR-V6: error: instruction requires: armv6k
39 @ CHECK-ERROR-V6: wfi
40 @ CHECK-ERROR-V6: error: instruction requires: armv6k
41 @ CHECK-ERROR-V6: sev
42 @ CHECK-ERROR-V6: ^
43 @ CHECK-ERROR-V6: error: instruction requires: armv6k
44 @ CHECK-ERROR-V6: clrex
45 @ CHECK-ERROR-V6: ^
47 @------------------------------------------------------------------------------
48 @ v6K using ARM encoding
49 @------------------------------------------------------------------------------
50 @------------------------------------------------------------------------------
51 @ v6T2 using ARM encoding (arm triple)
52 @------------------------------------------------------------------------------
53 @ CHECK-ARM: nop @ encoding: [0x00,0xf0,0x20,0xe3]
54 @ CHECK-ARM: yield @ encoding: [0x01,0xf0,0x20,0xe3]
55 @ CHECK-ARM: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
56 @ CHECK-ARM: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
57 @ CHECK-ARM: sev @ encoding: [0x04,0xf0,0x20,0xe3]
58 @ CHECK-ARM: clrex @ encoding: [0x1f,0xf0,0x7f,0xf5]
60 @------------------------------------------------------------------------------
61 @ v6T2 using THUMB encoding (thumb triple)
62 @------------------------------------------------------------------------------
63 @ CHECK-THUMB: nop @ encoding: [0x00,0xbf]
64 @ CHECK-THUMB: yield @ encoding: [0x10,0xbf]
65 @ CHECK-THUMB: wfe @ encoding: [0x20,0xbf]
66 @ CHECK-THUMB: wfi @ encoding: [0x30,0xbf]
67 @ CHECK-THUMB: sev @ encoding: [0x40,0xbf]
68 @ CHECK-ERROR-THUMB: error: instruction requires: v7 clrex
69 @ CHECK-ERROR-THUMB: clrex
70 @ CHECK-ERROR-THUMB: ^
72 @------------------------------------------------------------------------------
73 @ v6M using THUMB encoding
74 @------------------------------------------------------------------------------
75 @ CHECK-V6M: nop @ encoding: [0x00,0xbf]
76 @ CHECK-V6M: yield @ encoding: [0x10,0xbf]
77 @ CHECK-V6M: wfe @ encoding: [0x20,0xbf]
78 @ CHECK-V6M: wfi @ encoding: [0x30,0xbf]
79 @ CHECK-V6M: sev @ encoding: [0x40,0xbf]
80 @ CHECK-ERROR-V6M: error: instruction requires: v7 clrex
81 @ CHECK-ERROR-V6M: clrex
82 @ CHECK-ERROR-V6M: ^