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
10 // CHECK-PACBTI
: autg
r12, lr, sp @ encoding
: [0x5e,0xfb,0x0d,0xcf]
11 // CHECK-NOPACBTI
: error
: instruction requires
: pacbti
13 // CHECK-PACBTI
: bxaut
r0, r1, r2 @ encoding
: [0x51,0xfb,0x12,0x0f]
14 // CHECK-NOPACBTI
: error
: instruction requires
: pacbti
17 // CHECK-PACBTI
: pacg
r0, r1, r2 @ encoding
: [0x61,0xfb,0x02,0xf0]
18 // CHECK-NOPACBTI
: error
: instruction requires
: pacbti
20 // CHECK-PACBTI
: pacg
r12, lr, sp @ encoding
: [0x6e,0xfb,0x0d,0xfc]
21 // CHECK-NOPACBTI
: error
: instruction requires
: pacbti
24 // CHECK-PACBTI
: msr pac_key_p_0
, r0 @ encoding
: [0x80,0xf3,0x20,0x88]
25 // CHECK-NOPACBTI
: error
: invalid operand for instruction
27 // CHECK-PACBTI
: msr pac_key_p_1
, r0 @ encoding
: [0x80,0xf3,0x21,0x88]
28 // CHECK-NOPACBTI
: error
: invalid operand for instruction
30 // CHECK-PACBTI
: msr pac_key_p_2
, r0 @ encoding
: [0x80,0xf3,0x22,0x88]
31 // CHECK-NOPACBTI
: error
: invalid operand for instruction
33 // CHECK-PACBTI
: msr pac_key_p_3
, r0 @ encoding
: [0x80,0xf3,0x23,0x88]
34 // CHECK-NOPACBTI
: error
: invalid operand for instruction
36 // CHECK-PACBTI
: msr pac_key_u_0
, r0 @ encoding
: [0x80,0xf3,0x24,0x88]
37 // CHECK-NOPACBTI
: error
: invalid operand for instruction
39 // CHECK-PACBTI
: msr pac_key_u_1
, r0 @ encoding
: [0x80,0xf3,0x25,0x88]
40 // CHECK-NOPACBTI
: error
: invalid operand for instruction
42 // CHECK-PACBTI
: msr pac_key_u_2
, r0 @ encoding
: [0x80,0xf3,0x26,0x88]
43 // CHECK-NOPACBTI
: error
: invalid operand for instruction
45 // CHECK-PACBTI
: msr pac_key_u_3
, r0 @ encoding
: [0x80,0xf3,0x27,0x88]
46 // CHECK-NOPACBTI
: error
: invalid operand for instruction
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
76 // CHECK-PACBTI
: mrs
r0, pac_key_p_1 @ encoding
: [0xef,0xf3,0x21,0x80]
77 // CHECK-NOPACBTI
: error
: invalid operand for instruction
79 // CHECK-PACBTI
: mrs
r0, pac_key_p_2 @ encoding
: [0xef,0xf3,0x22,0x80]
80 // CHECK-NOPACBTI
: error
: invalid operand for instruction
82 // CHECK-PACBTI
: mrs
r0, pac_key_p_3 @ encoding
: [0xef,0xf3,0x23,0x80]
83 // CHECK-NOPACBTI
: error
: invalid operand for instruction
85 // CHECK-PACBTI
: mrs
r0, pac_key_u_0 @ encoding
: [0xef,0xf3,0x24,0x80]
86 // CHECK-NOPACBTI
: error
: invalid operand for instruction
88 // CHECK-PACBTI
: mrs
r0, pac_key_u_1 @ encoding
: [0xef,0xf3,0x25,0x80]
89 // CHECK-NOPACBTI
: error
: invalid operand for instruction
91 // CHECK-PACBTI
: mrs
r0, pac_key_u_2 @ encoding
: [0xef,0xf3,0x26,0x80]
92 // CHECK-NOPACBTI
: error
: invalid operand for instruction
94 // CHECK-PACBTI
: mrs
r0, pac_key_u_3 @ encoding
: [0xef,0xf3,0x27,0x80]
95 // CHECK-NOPACBTI
: error
: invalid operand for instruction
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]
127 // CHECK: aut r12,lr,sp @ encoding: [0xaf,0xf3,0x2d,0x80]
130 // CHECK: bti @ encoding: [0xaf,0xf3,0x0f,0x80]
132 // CHECK: bti @ encoding: [0xaf,0xf3,0x0f,0x80]
135 // CHECK: pac r12, lr, sp @ encoding: [0xaf,0xf3,0x1d,0x80]
137 // CHECK: pac r12,lr,sp @ encoding: [0xaf,0xf3,0x1d,0x80]
139 // CHECK: pacbti r12, lr, sp @ encoding: [0xaf,0xf3,0x0d,0x80]
141 // CHECK: pacbti r12,lr,sp @ encoding: [0xaf,0xf3,0x0d,0x80]