Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / armv8.1m-pacbti.s
blob7c0c19aee73fc124cbc36e39b2cfa113c8b655a9
1 // RUN: llvm-mc -triple thumbv8.1m.main-arm-none-eabi -mattr=+pacbti %s -show-encoding -o - | FileCheck %s --check-prefixes=CHECK,CHECK-PACBTI
2 // RUN: not llvm-mc -triple thumbv8.1m.main-arm-none-eabi -mattr=-pacbti %s -show-encoding -o - 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOPACBTI
3 // RUN: not llvm-mc -triple thumbv7m-arm-none-eabi %s -show-encoding -o - 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOPACBTI
5 // Non Hint Space instructions and system regs
7 // CHECK-PACBTI: autg r0, r1, r2 @ encoding: [0x51,0xfb,0x02,0x0f]
8 // CHECK-NOPACBTI: error: instruction requires: pacbti
9 autg r0, r1, r2
10 // CHECK-PACBTI: autg r12, lr, sp @ encoding: [0x5e,0xfb,0x0d,0xcf]
11 // CHECK-NOPACBTI: error: instruction requires: pacbti
12 autg ip, lr, sp
13 // CHECK-PACBTI: bxaut r0, r1, r2 @ encoding: [0x51,0xfb,0x12,0x0f]
14 // CHECK-NOPACBTI: error: instruction requires: pacbti
15 bxaut r0, r1, r2
17 // CHECK-PACBTI: pacg r0, r1, r2 @ encoding: [0x61,0xfb,0x02,0xf0]
18 // CHECK-NOPACBTI: error: instruction requires: pacbti
19 pacg r0, r1, r2
20 // CHECK-PACBTI: pacg r12, lr, sp @ encoding: [0x6e,0xfb,0x0d,0xfc]
21 // CHECK-NOPACBTI: error: instruction requires: pacbti
22 pacg ip, lr, sp
24 // CHECK-PACBTI: msr pac_key_p_0, r0 @ encoding: [0x80,0xf3,0x20,0x88]
25 // CHECK-NOPACBTI: error: invalid operand for instruction
26 msr pac_key_p_0, r0
27 // CHECK-PACBTI: msr pac_key_p_1, r0 @ encoding: [0x80,0xf3,0x21,0x88]
28 // CHECK-NOPACBTI: error: invalid operand for instruction
29 msr pac_key_p_1, r0
30 // CHECK-PACBTI: msr pac_key_p_2, r0 @ encoding: [0x80,0xf3,0x22,0x88]
31 // CHECK-NOPACBTI: error: invalid operand for instruction
32 msr pac_key_p_2, r0
33 // CHECK-PACBTI: msr pac_key_p_3, r0 @ encoding: [0x80,0xf3,0x23,0x88]
34 // CHECK-NOPACBTI: error: invalid operand for instruction
35 msr pac_key_p_3, r0
36 // CHECK-PACBTI: msr pac_key_u_0, r0 @ encoding: [0x80,0xf3,0x24,0x88]
37 // CHECK-NOPACBTI: error: invalid operand for instruction
38 msr pac_key_u_0, r0
39 // CHECK-PACBTI: msr pac_key_u_1, r0 @ encoding: [0x80,0xf3,0x25,0x88]
40 // CHECK-NOPACBTI: error: invalid operand for instruction
41 msr pac_key_u_1, r0
42 // CHECK-PACBTI: msr pac_key_u_2, r0 @ encoding: [0x80,0xf3,0x26,0x88]
43 // CHECK-NOPACBTI: error: invalid operand for instruction
44 msr pac_key_u_2, r0
45 // CHECK-PACBTI: msr pac_key_u_3, r0 @ encoding: [0x80,0xf3,0x27,0x88]
46 // CHECK-NOPACBTI: error: invalid operand for instruction
47 msr pac_key_u_3, r0
48 // CHECK-PACBTI: msr pac_key_p_0_ns, r0 @ encoding: [0x80,0xf3,0xa0,0x88]
49 // CHECK-NOPACBTI: error: invalid operand for instruction
50 msr pac_key_p_0_ns, r0
51 // CHECK-PACBTI: msr pac_key_p_1_ns, r0 @ encoding: [0x80,0xf3,0xa1,0x88]
52 // CHECK-NOPACBTI: error: invalid operand for instruction
53 msr pac_key_p_1_ns, r0
54 // CHECK-PACBTI: msr pac_key_p_2_ns, r0 @ encoding: [0x80,0xf3,0xa2,0x88]
55 // CHECK-NOPACBTI: error: invalid operand for instruction
56 msr pac_key_p_2_ns, r0
57 // CHECK-PACBTI: msr pac_key_p_3_ns, r0 @ encoding: [0x80,0xf3,0xa3,0x88]
58 // CHECK-NOPACBTI: error: invalid operand for instruction
59 msr pac_key_p_3_ns, r0
60 // CHECK-PACBTI: msr pac_key_u_0_ns, r0 @ encoding: [0x80,0xf3,0xa4,0x88]
61 // CHECK-NOPACBTI: error: invalid operand for instruction
62 msr pac_key_u_0_ns, r0
63 // CHECK-PACBTI: msr pac_key_u_1_ns, r0 @ encoding: [0x80,0xf3,0xa5,0x88]
64 // CHECK-NOPACBTI: error: invalid operand for instruction
65 msr pac_key_u_1_ns, r0
66 // CHECK-PACBTI: msr pac_key_u_2_ns, r0 @ encoding: [0x80,0xf3,0xa6,0x88]
67 // CHECK-NOPACBTI: error: invalid operand for instruction
68 msr pac_key_u_2_ns, r0
69 // CHECK-PACBTI: msr pac_key_u_3_ns, r0 @ encoding: [0x80,0xf3,0xa7,0x88]
70 // CHECK-NOPACBTI: error: invalid operand for instruction
71 msr pac_key_u_3_ns, r0
73 // CHECK-PACBTI: mrs r0, pac_key_p_0 @ encoding: [0xef,0xf3,0x20,0x80]
74 // CHECK-NOPACBTI: error: invalid operand for instruction
75 mrs r0, pac_key_p_0
76 // CHECK-PACBTI: mrs r0, pac_key_p_1 @ encoding: [0xef,0xf3,0x21,0x80]
77 // CHECK-NOPACBTI: error: invalid operand for instruction
78 mrs r0, pac_key_p_1
79 // CHECK-PACBTI: mrs r0, pac_key_p_2 @ encoding: [0xef,0xf3,0x22,0x80]
80 // CHECK-NOPACBTI: error: invalid operand for instruction
81 mrs r0, pac_key_p_2
82 // CHECK-PACBTI: mrs r0, pac_key_p_3 @ encoding: [0xef,0xf3,0x23,0x80]
83 // CHECK-NOPACBTI: error: invalid operand for instruction
84 mrs r0, pac_key_p_3
85 // CHECK-PACBTI: mrs r0, pac_key_u_0 @ encoding: [0xef,0xf3,0x24,0x80]
86 // CHECK-NOPACBTI: error: invalid operand for instruction
87 mrs r0, pac_key_u_0
88 // CHECK-PACBTI: mrs r0, pac_key_u_1 @ encoding: [0xef,0xf3,0x25,0x80]
89 // CHECK-NOPACBTI: error: invalid operand for instruction
90 mrs r0, pac_key_u_1
91 // CHECK-PACBTI: mrs r0, pac_key_u_2 @ encoding: [0xef,0xf3,0x26,0x80]
92 // CHECK-NOPACBTI: error: invalid operand for instruction
93 mrs r0, pac_key_u_2
94 // CHECK-PACBTI: mrs r0, pac_key_u_3 @ encoding: [0xef,0xf3,0x27,0x80]
95 // CHECK-NOPACBTI: error: invalid operand for instruction
96 mrs r0, pac_key_u_3
97 // CHECK-PACBTI: mrs r0, pac_key_p_0_ns @ encoding: [0xef,0xf3,0xa0,0x80]
98 // CHECK-NOPACBTI: error: invalid operand for instruction
99 mrs r0, pac_key_p_0_ns
100 // CHECK-PACBTI: mrs r0, pac_key_p_1_ns @ encoding: [0xef,0xf3,0xa1,0x80]
101 // CHECK-NOPACBTI: error: invalid operand for instruction
102 mrs r0, pac_key_p_1_ns
103 // CHECK-PACBTI: mrs r0, pac_key_p_2_ns @ encoding: [0xef,0xf3,0xa2,0x80]
104 // CHECK-NOPACBTI: error: invalid operand for instruction
105 mrs r0, pac_key_p_2_ns
106 // CHECK-PACBTI: mrs r0, pac_key_p_3_ns @ encoding: [0xef,0xf3,0xa3,0x80]
107 // CHECK-NOPACBTI: error: invalid operand for instruction
108 mrs r0, pac_key_p_3_ns
109 // CHECK-PACBTI: mrs r0, pac_key_u_0_ns @ encoding: [0xef,0xf3,0xa4,0x80]
110 // CHECK-NOPACBTI: error: invalid operand for instruction
111 mrs r0, pac_key_u_0_ns
112 // CHECK-PACBTI: mrs r0, pac_key_u_1_ns @ encoding: [0xef,0xf3,0xa5,0x80]
113 // CHECK-NOPACBTI: error: invalid operand for instruction
114 mrs r0, pac_key_u_1_ns
115 // CHECK-PACBTI: mrs r0, pac_key_u_2_ns @ encoding: [0xef,0xf3,0xa6,0x80]
116 // CHECK-NOPACBTI: error: invalid operand for instruction
117 mrs r0, pac_key_u_2_ns
118 // CHECK-PACBTI: mrs r0, pac_key_u_3_ns @ encoding: [0xef,0xf3,0xa7,0x80]
119 // CHECK-NOPACBTI: error: invalid operand for instruction
120 mrs r0, pac_key_u_3_ns
122 // Hint space instructions - deliberately at the bottom of the file as the
123 // error's are emitted first.
125 // CHECK: aut r12, lr, sp @ encoding: [0xaf,0xf3,0x2d,0x80]
126 aut ip, lr, sp
127 // CHECK: aut r12,lr,sp @ encoding: [0xaf,0xf3,0x2d,0x80]
128 hint.w #45
130 // CHECK: bti @ encoding: [0xaf,0xf3,0x0f,0x80]
132 // CHECK: bti @ encoding: [0xaf,0xf3,0x0f,0x80]
133 hint.w #15
135 // CHECK: pac r12, lr, sp @ encoding: [0xaf,0xf3,0x1d,0x80]
136 pac ip, lr, sp
137 // CHECK: pac r12,lr,sp @ encoding: [0xaf,0xf3,0x1d,0x80]
138 hint.w #29
139 // CHECK: pacbti r12, lr, sp @ encoding: [0xaf,0xf3,0x0d,0x80]
140 pacbti ip, lr, sp
141 // CHECK: pacbti r12,lr,sp @ encoding: [0xaf,0xf3,0x0d,0x80]
142 hint.w #13