1 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+cmpbr
< %s \
2 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
3 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
< %s
2>&1 \
4 // RUN
: | FileCheck
%s
--check-prefix
=CHECK-ERROR
5 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+cmpbr
< %s \
6 // RUN
: | llvm-objdump
-d
--no-print-imm-hex
--mattr
=+cmpbr
- | FileCheck
%s
--check-prefix
=CHECK-DISASS
7 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+cmpbr
< %s \
8 // RUN
: | llvm-objdump
-d
--no-print-imm-hex
--mattr
=-cmpbr
- | FileCheck
%s
--check-prefix
=CHECK-UNKNOWN
9 // Disassemble encoding
and check the re-encoding
(-show-encoding
) matches.
10 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+cmpbr
< %s \
11 // RUN
: | sed
'/.text/d' | sed
's/.*encoding: //g' \
12 // RUN
: | llvm-mc
-triple
=aarch64
-mattr
=+cmpbr
-disassemble
-show-encoding \
13 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
15 //------------------------------------------------------------------------------
16 // Compare
& branch
(Register
)
17 //------------------------------------------------------------------------------
20 // CHECK-INST
: cbgt w5
, w5
, #-1024
21 // CHECK-DISASS
: cbgt w5
, w5
, 0xfffffffffffffc00 <.text+0xfffffffffffffc00
22 // CHECK-ENCODING
: [0x05,0x20,0x05,0x74]
23 // CHECK-ERROR
: instruction requires
: cmpbr
24 // CHECK-UNKNOWN
: 74052005 <unknown
>
27 // CHECK-INST
: cbgt x5
, x5
, #1020
28 // CHECK-DISASS
: cbgt x5
, x5
, 0x400 <.text+0x400>
29 // CHECK-ENCODING
: [0xe5,0x1f,0x05,0xf4]
30 // CHECK-ERROR
: instruction requires
: cmpbr
31 // CHECK-UNKNOWN
: f4051fe5
<unknown
>
34 // CHECK-INST
: cbge x2
, x2
, #-1024
35 // CHECK-DISASS
: cbge x2
, x2
, 0xfffffffffffffc08 <.text+0xfffffffffffffc08
36 // CHECK-ENCODING
: [0x02,0x20,0x22,0xf4]
37 // CHECK-ERROR
: instruction requires
: cmpbr
38 // CHECK-UNKNOWN
: f4222002
<unknown
>
41 // CHECK-INST
: cbge w5
, w5
, #1020
42 // CHECK-DISASS
: cbge w5
, w5
, 0x408 <.text+0x408>
43 // CHECK-ENCODING
: [0xe5,0x1f,0x25,0x74]
44 // CHECK-ERROR
: instruction requires
: cmpbr
45 // CHECK-UNKNOWN
: 74251fe5
<unknown
>
49 // CHECK-INST
: cbhi w5
, w5
, #-1024
50 // CHECK-DISASS
: cbhi w5
, w5
, 0xfffffffffffffc10 <.text+0xfffffffffffffc10>
51 // CHECK-ENCODING
: [0x05,0x20,0x45,0x74]
52 // CHECK-ERROR
: instruction requires
: cmpbr
53 // CHECK-UNKNOWN
: 74452005 <unknown
>
56 // CHECK-INST
: cbhi x5
, x5
, #1020
57 // CHECK-DISASS
: cbhi x5
, x5
, 0x410 <.text+0x410>
58 // CHECK-ENCODING
: [0xe5,0x1f,0x45,0xf4]
59 // CHECK-ERROR
: instruction requires
: cmpbr
60 // CHECK-UNKNOWN
: f4451fe5
<unknown
>
63 // CHECK-INST
: cbhs x2
, x2
, #1020
64 // CHECK-DISASS
: cbhs x2
, x2
, 0x414 <.text+0x414>
65 // CHECK-ENCODING
: [0xe2,0x1f,0x62,0xf4]
66 // CHECK-ERROR
: instruction requires
: cmpbr
67 // CHECK-UNKNOWN
: f4621fe2
<unknown
>
70 // CHECK-INST
: cbhs w5
, w5
, #1020
71 // CHECK-DISASS
: cbhs w5
, w5
, 0x418 <.text+0x418>
72 // CHECK-ENCODING
: [0xe5,0x1f,0x65,0x74]
73 // CHECK-ERROR
: instruction requires
: cmpbr
74 // CHECK-UNKNOWN
: 74651fe5
<unknown
>
77 // CHECK-INST
: cbeq w5
, w5
, #-1024
78 // CHECK-DISASS
: cbeq w5
, w5
, 0xfffffffffffffc20 <.text+0xfffffffffffffc20>
79 // CHECK-ENCODING
: [0x05,0x20,0xc5,0x74]
80 // CHECK-ERROR
: instruction requires
: cmpbr
81 // CHECK-UNKNOWN
: 74c52005
<unknown
>
84 // CHECK-INST
: cbeq x5
, x5
, #1020
85 // CHECK-DISASS
: cbeq x5
, x5
, 0x420 <.text+0x420>
86 // CHECK-ENCODING
: [0xe5,0x1f,0xc5,0xf4]
87 // CHECK-ERROR
: instruction requires
: cmpbr
88 // CHECK-UNKNOWN
: f4c51fe5
<unknown
>
91 // CHECK-INST
: cbne x2
, x2
, #-1024
92 // CHECK-DISASS
: cbne x2
, x2
, 0xfffffffffffffc28 <.text+0xfffffffffffffc28>
93 // CHECK-ENCODING
: [0x02,0x20,0xe2,0xf4]
94 // CHECK-ERROR
: instruction requires
: cmpbr
95 // CHECK-UNKNOWN
: f4e22002
<unknown
>
98 // CHECK-INST
: cbne w5
, w5
, #-1024
99 // CHECK-DISASS
: cbne w5
, w5
, 0xfffffffffffffc2c <.text+0xfffffffffffffc2c>
100 // CHECK-ENCODING
: [0x05,0x20,0xe5,0x74]
101 // CHECK-ERROR
: instruction requires
: cmpbr
102 // CHECK-UNKNOWN
: 74e52005
<unknown
>
109 // CHECK-INST
: cbhgt w5
, w5
, #-1024
110 // CHECK-DISASS
: cbhgt w5
, w5
, 0xfffffffffffffc30 <.text+0xfffffffffffffc30>
111 // CHECK-ENCODING
: [0x05,0xe0,0x05,0x74]
112 // CHECK-ERROR
: instruction requires
: cmpbr
113 // CHECK-UNKNOWN
: 7405e005
<unknown
>
116 // CHECK-INST
: cbhge w5
, w5
, #-1024
117 // CHECK-DISASS
: cbhge w5
, w5
, 0xfffffffffffffc34 <.text+0xfffffffffffffc34>
118 // CHECK-ENCODING
: [0x05,0xe0,0x25,0x74]
119 // CHECK-ERROR
: instruction requires
: cmpbr
120 // CHECK-UNKNOWN
: 7425e005
<unknown
>
123 // CHECK-INST
: cbhhi w5
, w5
, #-1024
124 // CHECK-DISASS
: cbhhi w5
, w5
, 0xfffffffffffffc38 <.text+0xfffffffffffffc38>
125 // CHECK-ENCODING
: [0x05,0xe0,0x45,0x74]
126 // CHECK-ERROR
: instruction requires
: cmpbr
127 // CHECK-UNKNOWN
: 7445e005
<unknown
>
130 // CHECK-INST
: cbhhs w5
, w5
, #-1024
131 // CHECK-DISASS
: cbhhs w5
, w5
, 0xfffffffffffffc3c <.text+0xfffffffffffffc3c>
132 // CHECK-ENCODING
: [0x05,0xe0,0x65,0x74]
133 // CHECK-ERROR
: instruction requires
: cmpbr
134 // CHECK-UNKNOWN
: 7465e005
<unknown
>
137 // CHECK-INST
: cbheq w5
, w5
, #-1024
138 // CHECK-DISASS
: cbheq w5
, w5
, 0xfffffffffffffc40 <.text+0xfffffffffffffc40>
139 // CHECK-ENCODING
: [0x05,0xe0,0xc5,0x74]
140 // CHECK-ERROR
: instruction requires
: cmpbr
141 // CHECK-UNKNOWN
: 74c5e005
<unknown
>
144 // CHECK-INST
: cbhne w5
, w5
, #-1024
145 // CHECK-DISASS
: cbhne w5
, w5
, 0xfffffffffffffc44 <.text+0xfffffffffffffc44>
146 // CHECK-ENCODING
: [0x05,0xe0,0xe5,0x74]
147 // CHECK-ERROR
: instruction requires
: cmpbr
148 // CHECK-UNKNOWN
: 74e5e005
<unknown
>
155 // CHECK-INST
: cbbgt w5
, w5
, #-1024
156 // CHECK-DISASS
: cbbgt w5
, w5
, 0xfffffffffffffc48 <.text+0xfffffffffffffc48>
157 // CHECK-ENCODING
: [0x05,0xa0,0x05,0x74]
158 // CHECK-ERROR
: instruction requires
: cmpbr
159 // CHECK-UNKNOWN
: 7405a005
<unknown
>
162 // CHECK-INST
: cbbge w5
, w5
, #-1024
163 // CHECK-DISASS
: cbbge w5
, w5
, 0xfffffffffffffc4c <.text+0xfffffffffffffc4c>
164 // CHECK-ENCODING
: [0x05,0xa0,0x25,0x74]
165 // CHECK-ERROR
: instruction requires
: cmpbr
166 // CHECK-UNKNOWN
: 7425a005
<unknown
>
169 // CHECK-INST
: cbbhi w5
, w5
, #-1024
170 // CHECK-DISASS
: cbbhi w5
, w5
, 0xfffffffffffffc50 <.text+0xfffffffffffffc50>
171 // CHECK-ENCODING
: [0x05,0xa0,0x45,0x74]
172 // CHECK-ERROR
: instruction requires
: cmpbr
173 // CHECK-UNKNOWN
: 7445a005
<unknown
>
176 // CHECK-INST
: cbbhs w5
, w5
, #-1024
177 // CHECK-DISASS
: cbbhs w5
, w5
, 0xfffffffffffffc54 <.text+0xfffffffffffffc54>
178 // CHECK-ENCODING
: [0x05,0xa0,0x65,0x74]
179 // CHECK-ERROR
: instruction requires
: cmpbr
180 // CHECK-UNKNOWN
: 7465a005
<unknown
>
183 // CHECK-INST
: cbbeq w5
, w5
, #-1024
184 // CHECK-DISASS
: cbbeq w5
, w5
, 0xfffffffffffffc58 <.text+0xfffffffffffffc58>
185 // CHECK-ENCODING
: [0x05,0xa0,0xc5,0x74]
186 // CHECK-ERROR
: instruction requires
: cmpbr
187 // CHECK-UNKNOWN
: 74c5a005
<unknown
>
190 // CHECK-INST
: cbbne w5
, w5
, #-1024
191 // CHECK-DISASS
: cbbne w5
, w5
, 0xfffffffffffffc5c <.text+0xfffffffffffffc5c>
192 // CHECK-ENCODING
: [0x05,0xa0,0xe5,0x74]
193 // CHECK-ERROR
: instruction requires
: cmpbr
194 // CHECK-UNKNOWN
: 74e5a005
<unknown
>
196 //------------------------------------------------------------------------------
197 // Compare
& branch
(Immediate
)
198 //------------------------------------------------------------------------------
201 // CHECK-INST
: cbgt w5
, #63, #1020
202 // CHECK-DISASS
: cbgt w5
, #63, 0x45c <.text+0x45c>
203 // CHECK-ENCODING
: [0xe5,0x9f,0x1f,0x75]
204 // CHECK-ERROR
: instruction requires
: cmpbr
205 // CHECK-UNKNOWN
: 751f9fe5
<unknown
>
208 // CHECK-INST
: cbgt x5
, #0, #-1024
209 // CHECK-DISASS
: cbgt x5
, #0, 0xfffffffffffffc64 <.text+0xfffffffffffffc64>
210 // CHECK-ENCODING
: [0x05,0x20,0x00,0xf5]
211 // CHECK-ERROR
: instruction requires
: cmpbr
212 // CHECK-UNKNOWN
: f5002005
<unknown
>
215 // CHECK-INST
: cbhi w5
, #31, #1020
216 // CHECK-DISASS
: cbhi w5
, #31, 0x464 <.text+0x464>
217 // CHECK-ENCODING
: [0xe5,0x9f,0x4f,0x75]
218 // CHECK-ERROR
: instruction requires
: cmpbr
219 // CHECK-UNKNOWN
: 754f9fe5
<unknown
>
222 // CHECK-INST
: cbhi x5
, #63, #-1024
223 // CHECK-DISASS
: cbhi x5
, #63, 0xfffffffffffffc6c <.text+0xfffffffffffffc6c>
224 // CHECK-ENCODING
: [0x05,0xa0,0x5f,0xf5]
225 // CHECK-ERROR
: instruction requires
: cmpbr
226 // CHECK-UNKNOWN
: f55fa005
<unknown
>
229 // CHECK-INST
: cblt w5
, #63, #1020
230 // CHECK-DISASS
: cblt w5
, #63, 0x46c <.text+0x46c>
231 // CHECK-ENCODING
: [0xe5,0x9f,0x3f,0x75]
232 // CHECK-ERROR
: instruction requires
: cmpbr
233 // CHECK-UNKNOWN
: 753f9fe5
<unknown
>
236 // CHECK-INST
: cblt x5
, #0, #-1024
237 // CHECK-DISASS
: cblt x5
, #0, 0xfffffffffffffc74 <.text+0xfffffffffffffc74>
238 // CHECK-ENCODING
: [0x05,0x20,0x20,0xf5]
239 // CHECK-ERROR
: instruction requires
: cmpbr
240 // CHECK-UNKNOWN
: f5202005
<unknown
>
243 // CHECK-INST
: cblo w5
, #31, #1020
244 // CHECK-DISASS
: cblo w5
, #31, 0x474 <.text+0x474>
245 // CHECK-ENCODING
: [0xe5,0x9f,0x6f,0x75]
246 // CHECK-ERROR
: instruction requires
: cmpbr
247 // CHECK-UNKNOWN
: 756f9fe5
<unknown
>
250 // CHECK-INST
: cblo x5
, #31, #-1024
251 // CHECK-DISASS
: cblo x5
, #31, 0xfffffffffffffc7c <.text+0xfffffffffffffc7c>
252 // CHECK-ENCODING
: [0x05,0xa0,0x6f,0xf5]
253 // CHECK-ERROR
: instruction requires
: cmpbr
254 // CHECK-UNKNOWN
: f56fa005
<unknown
>
257 // CHECK-INST
: cbeq w5
, #31, #1020
258 // CHECK-DISASS
: cbeq w5
, #31, 0x47c <.text+0x47c>
259 // CHECK-ENCODING
: [0xe5,0x9f,0xcf,0x75]
260 // CHECK-ERROR
: instruction requires
: cmpbr
261 // CHECK-UNKNOWN
: 75cf9fe5
<unknown
>
264 // CHECK-INST
: cbeq x5
, #31, #-1024
265 // CHECK-DISASS
: cbeq x5
, #31, 0xfffffffffffffc84 <.text+0xfffffffffffffc84>
266 // CHECK-ENCODING
: [0x05,0xa0,0xcf,0xf5]
267 // CHECK-ERROR
: instruction requires
: cmpbr
268 // CHECK-UNKNOWN
: f5cfa005
<unknown
>
271 // CHECK-INST
: cbne w5
, #31, #1020
272 // CHECK-DISASS
: cbne w5
, #31, 0x484 <.text+0x484>
273 // CHECK-ENCODING
: [0xe5,0x9f,0xef,0x75]
274 // CHECK-ERROR
: instruction requires
: cmpbr
275 // CHECK-UNKNOWN
: 75ef9fe5
<unknown
>
278 // CHECK-INST
: cbne x5
, #31, #-1024
279 // CHECK-DISASS
: cbne x5
, #31, 0xfffffffffffffc8c <.text+0xfffffffffffffc8c>
280 // CHECK-ENCODING
: [0x05,0xa0,0xef,0xf5]
281 // CHECK-ERROR
: instruction requires
: cmpbr
282 // CHECK-UNKNOWN
: f5efa005
<unknown
>