File: cmpbr_lbl.s

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (320 lines) | stat: -rw-r--r-- 12,043 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+cmpbr < %s \
// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+cmpbr < %s \
// RUN:        | llvm-objdump -d --no-print-imm-hex --mattr=+cmpbr - | FileCheck %s --check-prefix=CHECK-DISASS
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+cmpbr < %s \
// RUN:        | llvm-objdump -d --no-print-imm-hex --mattr=-cmpbr - | FileCheck %s --check-prefix=CHECK-UNKNOWN

// Label at address 4, so we can test that the address shows up in the
// disassembly.
  nop

lbl:

//------------------------------------------------------------------------------
// Compare & branch (Register)
//------------------------------------------------------------------------------
///
// CB<XX>
///
cbgt w5, w5, lbl
// CHECK-INST: cbgt w5, w5, lbl
// CHECK-DISASS: cbgt w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x05,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74050005  <unknown>

cbgt x5, x5, lbl
// CHECK-INST: cbgt x5, x5, lbl
// CHECK-DISASS: cbgt x5, x5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x05,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4053fe5

cbge x2, x2, lbl
// CHECK-INST: cbge x2, x2, lbl
// CHECK-DISASS: cbge x2, x2, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00010,0b00AAAAAA,0x22,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4223fc2

cbge w5, w5, lbl
// CHECK-INST: cbge w5, w5, lbl
// CHECK-DISASS: cbge w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x25,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74253fa5

cbhi w5, w5, lbl
// CHECK-INST: cbhi w5, w5, lbl
// CHECK-DISASS: cbhi w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x45,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74453f85

cbhi x5, x5, lbl
// CHECK-INST: cbhi x5, x5, lbl
// CHECK-DISASS: cbhi x5, x5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x45,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4453f65

cbhs x2, x2, lbl
// CHECK-INST: cbhs x2, x2, lbl
// CHECK-DISASS: cbhs x2, x2, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00010,0b00AAAAAA,0x62,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4623f42

cbhs w5, w5, lbl
// CHECK-INST: cbhs w5, w5, lbl
// CHECK-DISASS: cbhs w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x65,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74653f25

cbeq w5, w5, lbl
// CHECK-INST: cbeq w5, w5, lbl
// CHECK-DISASS: cbeq w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0xc5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74c53f05

cbeq x5, x5, lbl
// CHECK-INST: cbeq x5, x5, lbl
// CHECK-DISASS: cbeq x5, x5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0xc5,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4c53ee5

cbne x2, x2, lbl
// CHECK-INST: cbne x2, x2, lbl
// CHECK-DISASS: cbne x2, x2, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00010,0b00AAAAAA,0xe2,0xf4]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f4e23ec2

cbne w5, w5, lbl
// CHECK-INST: cbne w5, w5, lbl
// CHECK-DISASS: cbne w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0xe5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74e53ea5

///
// CBH<XX>
///

cbhgt w5, w5, lbl
// CHECK-INST: cbhgt w5, w5, lbl
// CHECK-DISASS: cbhgt w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0x05,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7405fe85

cbhge w5, w5, lbl
// CHECK-INST: cbhge w5, w5, lbl
// CHECK-DISASS: cbhge w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0x25,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7425fe65

cbhhi w5, w5, lbl
// CHECK-INST: cbhhi w5, w5, lbl
// CHECK-DISASS: cbhhi w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0x45,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7445fe45

cbhhs w5, w5, lbl
// CHECK-INST: cbhhs w5, w5, lbl
// CHECK-DISASS: cbhhs w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0x65,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7465fe25

cbheq w5, w5, lbl
// CHECK-INST: cbheq w5, w5, lbl
// CHECK-DISASS: cbheq w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0xc5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74c5fe05

cbhne w5, w5, lbl
// CHECK-INST: cbhne w5, w5, lbl
// CHECK-DISASS: cbhne w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b11AAAAAA,0xe5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74e5fde5


///
// CBB<XX>
///
cbbgt w5, w5, lbl
// CHECK-INST: cbbgt w5, w5, lbl
// CHECK-DISASS: cbbgt w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x05,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7405bdc5

cbbge w5, w5, lbl
// CHECK-INST: cbbge w5, w5, lbl
// CHECK-DISASS: cbbge w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x25,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7425bda5

cbbhi w5, w5, lbl
// CHECK-INST: cbbhi w5, w5, lbl
// CHECK-DISASS: cbbhi w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x45,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7445bd85

cbbhs w5, w5, lbl
// CHECK-INST: cbbhs w5, w5, lbl
// CHECK-DISASS: cbbhs w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x65,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 7465bd65

cbbeq w5, w5, lbl
// CHECK-INST: cbbeq w5, w5, lbl
// CHECK-DISASS: cbbeq w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xc5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74c5bd45

cbbne w5, w5, lbl
// CHECK-INST: cbbne w5, w5, lbl
// CHECK-DISASS: cbbne w5, w5, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xe5,0x74]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 74e5bd25

//------------------------------------------------------------------------------
// Compare & branch (Immediate)
//------------------------------------------------------------------------------

cbgt w5, #63, lbl
// CHECK-INST: cbgt w5, #63, lbl
// CHECK-DISASS: cbgt w5, #63, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x1f,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 751fbd05

cbgt x5, #0, lbl
// CHECK-INST: cbgt x5, #0, lbl
// CHECK-DISASS: cbgt x5, #0, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x00,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f5003ce5

cbhi w5, #31, lbl
// CHECK-INST: cbhi w5, #31, lbl
// CHECK-DISASS: cbhi w5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x4f,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 754fbcc5

cbhi x5, #31, lbl
// CHECK-INST: cbhi x5, #31, lbl
// CHECK-DISASS: cbhi x5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x4f,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f54fbca5

cblt w5, #63, lbl
// CHECK-INST: cblt w5, #63, lbl
// CHECK-DISASS: cblt w5, #63, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x3f,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 753fbc85

cblt x5, #0, lbl
// CHECK-INST: cblt x5, #0, lbl
// CHECK-DISASS: cblt x5, #0, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b00AAAAAA,0x20,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f5203c65

cblo w5, #31, lbl
// CHECK-INST: cblo w5, #31, lbl
// CHECK-DISASS: cblo w5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x6f,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 756fbc45

cblo x5, #31, lbl
// CHECK-INST: cblo x5, #31, lbl
// CHECK-DISASS: cblo x5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0x6f,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f56fbc25

cbeq w5, #31, lbl
// CHECK-INST: cbeq w5, #31, lbl
// CHECK-DISASS: cbeq w5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xcf,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 75cfbc05

cbeq x5, #31, lbl
// CHECK-INST: cbeq x5, #31, lbl
// CHECK-DISASS: cbeq x5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xcf,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f5cfbbe5

cbne w5, #31, lbl
// CHECK-INST: cbne w5, #31, lbl
// CHECK-DISASS: cbne w5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xef,0x75]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: 75efbbc5

cbne x5, #31, lbl
// CHECK-INST: cbne x5, #31, lbl
// CHECK-DISASS: cbne x5, #31, 0x4 <lbl>
// CHECK-ENCODING: [0bAAA00101,0b10AAAAAA,0xef,0xf5]
// CHECK-ENCODING: fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch9
// CHECK-ERROR: instruction requires: cmpbr
// CHECK-UNKNOWN: f5efbba5