[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / MC / SystemZ / regs-bad.s
blob320cba0fc856c1b0ae43741e4db9b4464867b392
1 # RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t
2 # RUN: FileCheck < %t %s
4 # Test GR32 operands
6 #CHECK: error: invalid operand for instruction
7 #CHECK: lr %f0,%r1
8 #CHECK: error: invalid operand for instruction
9 #CHECK: lr %a0,%r1
10 #CHECK: error: invalid operand for instruction
11 #CHECK: lr %c0,%r1
12 #CHECK: error: invalid operand for instruction
13 #CHECK: lr %r0,%f1
14 #CHECK: error: invalid operand for instruction
15 #CHECK: lr %r0,%a1
16 #CHECK: error: invalid operand for instruction
17 #CHECK: lr %r0,%c1
18 #CHECK: error: invalid register
19 #CHECK: lr %r0,16
20 #CHECK: error: unexpected token in argument list
21 #CHECK: lr %r0,0(%r1)
23 lr %f0,%r1
24 lr %a0,%r1
25 lr %c0,%r1
26 lr %r0,%f1
27 lr %r0,%a1
28 lr %r0,%c1
29 lr %r0,16
30 lr %r0,0(%r1)
32 # Test GR64 operands
34 #CHECK: error: invalid operand for instruction
35 #CHECK: lgr %f0,%r1
36 #CHECK: error: invalid operand for instruction
37 #CHECK: lgr %a0,%r1
38 #CHECK: error: invalid operand for instruction
39 #CHECK: lgr %c0,%r1
40 #CHECK: error: invalid operand for instruction
41 #CHECK: lgr %r0,%f1
42 #CHECK: error: invalid operand for instruction
43 #CHECK: lgr %r0,%a1
44 #CHECK: error: invalid operand for instruction
45 #CHECK: lgr %r0,%c1
46 #CHECK: error: invalid register
47 #CHECK: lgr %r0,16
48 #CHECK: error: unexpected token in argument list
49 #CHECK: lgr %r0,0(%r1)
51 lgr %f0,%r1
52 lgr %a0,%r1
53 lgr %c0,%r1
54 lgr %r0,%f1
55 lgr %r0,%a1
56 lgr %r0,%c1
57 lgr %r0,16
58 lgr %r0,0(%r1)
60 # Test GR128 operands
62 #CHECK: error: invalid register pair
63 #CHECK: dlr %r1,%r0
64 #CHECK: error: invalid register pair
65 #CHECK: dlr %r3,%r0
66 #CHECK: error: invalid register pair
67 #CHECK: dlr %r5,%r0
68 #CHECK: error: invalid register pair
69 #CHECK: dlr %r7,%r0
70 #CHECK: error: invalid register pair
71 #CHECK: dlr %r9,%r0
72 #CHECK: error: invalid register pair
73 #CHECK: dlr %r11,%r0
74 #CHECK: error: invalid register pair
75 #CHECK: dlr %r13,%r0
76 #CHECK: error: invalid register pair
77 #CHECK: dlr %r15,%r0
78 #CHECK: error: invalid operand for instruction
79 #CHECK: dlr %f0,%r1
80 #CHECK: error: invalid operand for instruction
81 #CHECK: dlr %a0,%r1
82 #CHECK: error: invalid operand for instruction
83 #CHECK: dlr %c0,%r1
84 #CHECK: error: invalid operand for instruction
85 #CHECK: dlr %r0,%f1
86 #CHECK: error: invalid operand for instruction
87 #CHECK: dlr %r0,%a1
88 #CHECK: error: invalid operand for instruction
89 #CHECK: dlr %r0,%c1
90 #CHECK: error: invalid register
91 #CHECK: dlr %r0,16
92 #CHECK: error: unexpected token in argument list
93 #CHECK: dlr %r0,0(%r1)
95 dlr %r1,%r0
96 dlr %r3,%r0
97 dlr %r5,%r0
98 dlr %r7,%r0
99 dlr %r9,%r0
100 dlr %r11,%r0
101 dlr %r13,%r0
102 dlr %r15,%r0
103 dlr %f0,%r1
104 dlr %a0,%r1
105 dlr %c0,%r1
106 dlr %r0,%f1
107 dlr %r0,%a1
108 dlr %r0,%c1
109 dlr %r0,16
110 dlr %r0,0(%r1)
112 # Test FP32 operands
114 #CHECK: error: invalid operand for instruction
115 #CHECK: ler %r0,%f1
116 #CHECK: error: invalid operand for instruction
117 #CHECK: ler %a0,%f1
118 #CHECK: error: invalid operand for instruction
119 #CHECK: ler %c0,%f1
120 #CHECK: error: invalid operand for instruction
121 #CHECK: ler %f0,%r1
122 #CHECK: error: invalid operand for instruction
123 #CHECK: ler %f0,%a1
124 #CHECK: error: invalid operand for instruction
125 #CHECK: ler %f0,%c1
126 #CHECK: error: invalid register
127 #CHECK: ler %f0,16
128 #CHECK: error: unexpected token in argument list
129 #CHECK: ler %f0,0(%r1)
131 ler %r0,%f1
132 ler %a0,%f1
133 ler %c0,%f1
134 ler %f0,%r1
135 ler %f0,%a1
136 ler %f0,%c1
137 ler %f0,16
138 ler %f0,0(%r1)
140 # Test FP64 operands
142 #CHECK: error: invalid operand for instruction
143 #CHECK: ldr %r0,%f1
144 #CHECK: error: invalid operand for instruction
145 #CHECK: ldr %a0,%f1
146 #CHECK: error: invalid operand for instruction
147 #CHECK: ldr %c0,%f1
148 #CHECK: error: invalid operand for instruction
149 #CHECK: ldr %f0,%r1
150 #CHECK: error: invalid operand for instruction
151 #CHECK: ldr %f0,%a1
152 #CHECK: error: invalid operand for instruction
153 #CHECK: ldr %f0,%c1
154 #CHECK: error: invalid register
155 #CHECK: ldr %f0,16
156 #CHECK: error: unexpected token in argument list
157 #CHECK: ldr %f0,0(%r1)
159 ldr %r0,%f1
160 ldr %a0,%f1
161 ldr %c0,%f1
162 ldr %f0,%r1
163 ldr %f0,%a1
164 ldr %f0,%c1
165 ldr %f0,16
166 ldr %f0,0(%r1)
168 # Test FP128 operands
170 #CHECK: error: invalid register pair
171 #CHECK: lxr %f2,%f0
172 #CHECK: error: invalid register pair
173 #CHECK: lxr %f0,%f3
174 #CHECK: error: invalid register pair
175 #CHECK: lxr %f6,%f0
176 #CHECK: error: invalid register pair
177 #CHECK: lxr %f0,%f7
178 #CHECK: error: invalid register pair
179 #CHECK: lxr %f10,%f0
180 #CHECK: error: invalid register pair
181 #CHECK: lxr %f0,%f11
182 #CHECK: error: invalid register pair
183 #CHECK: lxr %f14,%f0
184 #CHECK: error: invalid register pair
185 #CHECK: lxr %f0,%f15
186 #CHECK: error: invalid operand for instruction
187 #CHECK: lxr %r0,%f1
188 #CHECK: error: invalid operand for instruction
189 #CHECK: lxr %a0,%f1
190 #CHECK: error: invalid operand for instruction
191 #CHECK: lxr %c0,%f1
192 #CHECK: error: invalid operand for instruction
193 #CHECK: lxr %f0,%r1
194 #CHECK: error: invalid operand for instruction
195 #CHECK: lxr %f0,%a1
196 #CHECK: error: invalid operand for instruction
197 #CHECK: lxr %f0,%c1
198 #CHECK: error: invalid register
199 #CHECK: lxr %f0,16
200 #CHECK: error: unexpected token in argument list
201 #CHECK: lxr %f0,0(%r1)
203 lxr %f2,%f0
204 lxr %f0,%f3
205 lxr %f6,%f0
206 lxr %f0,%f7
207 lxr %f10,%f0
208 lxr %f0,%f11
209 lxr %f14,%f0
210 lxr %f0,%f15
211 lxr %r0,%f1
212 lxr %a0,%f1
213 lxr %c0,%f1
214 lxr %f0,%r1
215 lxr %f0,%a1
216 lxr %f0,%c1
217 lxr %f0,16
218 lxr %f0,0(%r1)
220 # Test that a high (>=16) vector register is not accepted in a non-vector
221 # operand.
223 #CHECK: error: invalid register
224 #CHECK: .insn rr,0x1800,%v16,%v0
225 .insn rr,0x1800,%v16,%v0
227 # Test access register operands
229 #CHECK: error: invalid operand for instruction
230 #CHECK: ear %r0,%r0
231 #CHECK: error: invalid operand for instruction
232 #CHECK: ear %r0,%f0
233 #CHECK: error: invalid operand for instruction
234 #CHECK: ear %r0,%c0
235 #CHECK: error: invalid register
236 #CHECK: ear %r0,16
237 #CHECK: error: unexpected token in argument list
238 #CHECK: ear %r0,0(%r1)
240 ear %r0,%r0
241 ear %r0,%f0
242 ear %r0,%c0
243 ear %r0,16
244 ear %r0,0(%r1)
246 # Test control register operands
248 #CHECK: error: invalid operand for instruction
249 #CHECK: lctl %c0,%r0,0
250 #CHECK: lctl %c0,%f0,0
251 #CHECK: lctl %c0,%a0,0
252 #CHECK: lctl %c0,16,0
253 #CHECK: lctl %c0,0(%r1),0
255 lctl %c0,%r0,0
256 lctl %c0,%f0,0
257 lctl %c0,%a0,0
258 lctl %c0,16,0
259 lctl %c0,0(%r1),0
261 .cfi_startproc
263 # Test general register parsing, with no predetermined class in mind.
265 #CHECK: error: register expected
266 #CHECK: .cfi_offset r0,0
267 #CHECK: error: invalid register
268 #CHECK: .cfi_offset %,0
269 #CHECK: error: invalid register
270 #CHECK: .cfi_offset %r,0
271 #CHECK: error: invalid register
272 #CHECK: .cfi_offset %f,0
273 #CHECK: error: invalid register
274 #CHECK: .cfi_offset %a,0
275 #CHECK: error: invalid register
276 #CHECK: .cfi_offset %c,0
277 #CHECK: error: invalid register
278 #CHECK: .cfi_offset %0,0
279 #CHECK: error: invalid register
280 #CHECK: .cfi_offset %r16,0
281 #CHECK: error: invalid register
282 #CHECK: .cfi_offset %f16,0
283 #CHECK: error: invalid register
284 #CHECK: .cfi_offset %a16,0
285 #CHECK: error: invalid register
286 #CHECK: .cfi_offset %c16,0
287 #CHECK: error: invalid register
288 #CHECK: .cfi_offset %reef,0
289 #CHECK: error: invalid register
290 #CHECK: .cfi_offset %arid,0
292 .cfi_offset r0,0
293 .cfi_offset %,0
294 .cfi_offset %r,0
295 .cfi_offset %f,0
296 .cfi_offset %a,0
297 .cfi_offset %c,0
298 .cfi_offset %0,0
299 .cfi_offset %r16,0
300 .cfi_offset %f16,0
301 .cfi_offset %a16,0
302 .cfi_offset %c16,0
303 .cfi_offset %reef,0
304 .cfi_offset %arid,0
306 .cfi_endproc