xref: /llvm-project/llvm/test/MC/RISCV/corev/XCVmac-invalid.s (revision e219dd88d1b61153805742587a9ed7f96b9faecc)
1# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvmac %s 2>&1 \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ERROR
3
4cv.mac t0, t1, 0
5# CHECK-ERROR: invalid operand for instruction
6
7cv.mac t0, 0, t2
8# CHECK-ERROR: invalid operand for instruction
9
10cv.mac 0, t1, t2
11# CHECK-ERROR: invalid operand for instruction
12
13cv.mac t0, t1
14# CHECK-ERROR: too few operands for instruction
15
16cv.mac t0, t1, t2, t4
17# CHECK-ERROR: invalid operand for instruction
18
19cv.machhsn t0, t1, t2, -1
20# CHECK-ERROR: immediate must be an integer in the range [0, 31]
21
22cv.machhsn t0, t1, t2, 32
23# CHECK-ERROR: immediate must be an integer in the range [0, 31]
24
25cv.machhsn t0, t1, t2, a0
26# CHECK-ERROR: immediate must be an integer in the range [0, 31]
27
28cv.machhsn t0, t1, 0, 0
29# CHECK-ERROR: invalid operand for instruction
30
31cv.machhsn t0, 0, t2, 0
32# CHECK-ERROR: invalid operand for instruction
33
34cv.machhsn 0, t1, t2, 0
35# CHECK-ERROR: invalid operand for instruction
36
37cv.machhsn t0, t1, t2
38# CHECK-ERROR: too few operands for instruction
39
40cv.machhsn t0, t1, t2, 0, a0
41# CHECK-ERROR: invalid operand for instruction
42
43cv.machhsrn t0, t1, t2, -1
44# CHECK-ERROR: immediate must be an integer in the range [0, 31]
45
46cv.machhsrn t0, t1, t2, 32
47# CHECK-ERROR: immediate must be an integer in the range [0, 31]
48
49cv.machhsrn t0, t1, t2, a0
50# CHECK-ERROR: immediate must be an integer in the range [0, 31]
51
52cv.machhsrn t0, t1, 0, 0
53# CHECK-ERROR: invalid operand for instruction
54
55cv.machhsrn t0, 0, t2, 0
56# CHECK-ERROR: invalid operand for instruction
57
58cv.machhsrn 0, t1, t2, 0
59# CHECK-ERROR: invalid operand for instruction
60
61cv.machhsrn t0, t1, t2
62# CHECK-ERROR: too few operands for instruction
63
64cv.machhsrn t0, t1, t2, 0, a0
65# CHECK-ERROR: invalid operand for instruction
66
67cv.machhun t0, t1, t2, -1
68# CHECK-ERROR: immediate must be an integer in the range [0, 31]
69
70cv.machhun t0, t1, t2, 32
71# CHECK-ERROR: immediate must be an integer in the range [0, 31]
72
73cv.machhun t0, t1, t2, a0
74# CHECK-ERROR: immediate must be an integer in the range [0, 31]
75
76cv.machhun t0, t1, 0, 0
77# CHECK-ERROR: invalid operand for instruction
78
79cv.machhun t0, 0, t2, 0
80# CHECK-ERROR: invalid operand for instruction
81
82cv.machhun 0, t1, t2, 0
83# CHECK-ERROR: invalid operand for instruction
84
85cv.machhun t0, t1, t2
86# CHECK-ERROR: too few operands for instruction
87
88cv.machhun t0, t1, t2, 0, a0
89# CHECK-ERROR: invalid operand for instruction
90
91cv.machhurn t0, t1, t2, -1
92# CHECK-ERROR: immediate must be an integer in the range [0, 31]
93
94cv.machhurn t0, t1, t2, 32
95# CHECK-ERROR: immediate must be an integer in the range [0, 31]
96
97cv.machhurn t0, t1, t2, a0
98# CHECK-ERROR: immediate must be an integer in the range [0, 31]
99
100cv.machhurn t0, t1, 0, 0
101# CHECK-ERROR: invalid operand for instruction
102
103cv.machhurn t0, 0, t2, 0
104# CHECK-ERROR: invalid operand for instruction
105
106cv.machhurn 0, t1, t2, 0
107# CHECK-ERROR: invalid operand for instruction
108
109cv.machhurn t0, t1, t2
110# CHECK-ERROR: too few operands for instruction
111
112cv.machhurn t0, t1, t2, 0, a0
113# CHECK-ERROR: invalid operand for instruction
114
115cv.macsn t0, t1, t2, -1
116# CHECK-ERROR: immediate must be an integer in the range [0, 31]
117
118cv.macsn t0, t1, t2, 32
119# CHECK-ERROR: immediate must be an integer in the range [0, 31]
120
121cv.macsn t0, t1, t2, a0
122# CHECK-ERROR: immediate must be an integer in the range [0, 31]
123
124cv.macsn t0, t1, 0, 0
125# CHECK-ERROR: invalid operand for instruction
126
127cv.macsn t0, 0, t2, 0
128# CHECK-ERROR: invalid operand for instruction
129
130cv.macsn 0, t1, t2, 0
131# CHECK-ERROR: invalid operand for instruction
132
133cv.macsn t0, t1, t2
134# CHECK-ERROR: too few operands for instruction
135
136cv.macsn t0, t1, t2, 0, a0
137# CHECK-ERROR: invalid operand for instruction
138
139cv.macsrn t0, t1, t2, -1
140# CHECK-ERROR: immediate must be an integer in the range [0, 31]
141
142cv.macsrn t0, t1, t2, 32
143# CHECK-ERROR: immediate must be an integer in the range [0, 31]
144
145cv.macsrn t0, t1, t2, a0
146# CHECK-ERROR: immediate must be an integer in the range [0, 31]
147
148cv.macsrn t0, t1, 0, 0
149# CHECK-ERROR: invalid operand for instruction
150
151cv.macsrn t0, 0, t2, 0
152# CHECK-ERROR: invalid operand for instruction
153
154cv.macsrn 0, t1, t2, 0
155# CHECK-ERROR: invalid operand for instruction
156
157cv.macsrn t0, t1, t2
158# CHECK-ERROR: too few operands for instruction
159
160cv.macsrn t0, t1, t2, 0, a0
161# CHECK-ERROR: invalid operand for instruction
162
163cv.macun t0, t1, t2, -1
164# CHECK-ERROR: immediate must be an integer in the range [0, 31]
165
166cv.macun t0, t1, t2, 32
167# CHECK-ERROR: immediate must be an integer in the range [0, 31]
168
169cv.macun t0, t1, t2, a0
170# CHECK-ERROR: immediate must be an integer in the range [0, 31]
171
172cv.macun t0, t1, 0, 0
173# CHECK-ERROR: invalid operand for instruction
174
175cv.macun t0, 0, t2, 0
176# CHECK-ERROR: invalid operand for instruction
177
178cv.macun 0, t1, t2, 0
179# CHECK-ERROR: invalid operand for instruction
180
181cv.macun t0, t1, t2
182# CHECK-ERROR: too few operands for instruction
183
184cv.macun t0, t1, t2, 0, a0
185# CHECK-ERROR: invalid operand for instruction
186
187cv.macurn t0, t1, t2, -1
188# CHECK-ERROR: immediate must be an integer in the range [0, 31]
189
190cv.macurn t0, t1, t2, 32
191# CHECK-ERROR: immediate must be an integer in the range [0, 31]
192
193cv.macurn t0, t1, t2, a0
194# CHECK-ERROR: immediate must be an integer in the range [0, 31]
195
196cv.macurn t0, t1, 0, 0
197# CHECK-ERROR: invalid operand for instruction
198
199cv.macurn t0, 0, t2, 0
200# CHECK-ERROR: invalid operand for instruction
201
202cv.macurn 0, t1, t2, 0
203# CHECK-ERROR: invalid operand for instruction
204
205cv.macurn t0, t1, t2
206# CHECK-ERROR: too few operands for instruction
207
208cv.macurn t0, t1, t2, 0, a0
209# CHECK-ERROR: invalid operand for instruction
210
211cv.msu t0, t1, 0
212# CHECK-ERROR: invalid operand for instruction
213
214cv.msu t0, 0, t2
215# CHECK-ERROR: invalid operand for instruction
216
217cv.msu 0, t1, t2
218# CHECK-ERROR: invalid operand for instruction
219
220cv.msu t0, t1
221# CHECK-ERROR: too few operands for instruction
222
223cv.msu t0, t1, t2, t4
224# CHECK-ERROR: invalid operand for instruction
225
226cv.mulhhs t0, t1, 0
227# CHECK-ERROR: invalid operand for instruction
228
229cv.mulhhs t0, 0, t2
230# CHECK-ERROR: invalid operand for instruction
231
232cv.mulhhs 0, t1, t2
233# CHECK-ERROR: invalid operand for instruction
234
235cv.mulhhs t0, t1
236# CHECK-ERROR: too few operands for instruction
237
238cv.mulhhs t0, t1, t2, t4
239# CHECK-ERROR: invalid operand for instruction
240
241cv.mulhhsn t0, t1, t2, -1
242# CHECK-ERROR: immediate must be an integer in the range [0, 31]
243
244cv.mulhhsn t0, t1, t2, 32
245# CHECK-ERROR: immediate must be an integer in the range [0, 31]
246
247cv.mulhhsn t0, t1, t2, a0
248# CHECK-ERROR: immediate must be an integer in the range [0, 31]
249
250cv.mulhhsn t0, t1, 0, 0
251# CHECK-ERROR: invalid operand for instruction
252
253cv.mulhhsn t0, 0, t2, 0
254# CHECK-ERROR: invalid operand for instruction
255
256cv.mulhhsn 0, t1, t2, 0
257# CHECK-ERROR: invalid operand for instruction
258
259cv.mulhhsn t0, t1, t2
260# CHECK-ERROR: too few operands for instruction
261
262cv.mulhhsn t0, t1, t2, 0, a0
263# CHECK-ERROR: invalid operand for instruction
264
265cv.mulhhsrn t0, t1, t2, -1
266# CHECK-ERROR: immediate must be an integer in the range [0, 31]
267
268cv.mulhhsrn t0, t1, t2, 32
269# CHECK-ERROR: immediate must be an integer in the range [0, 31]
270
271cv.mulhhsrn t0, t1, t2, a0
272# CHECK-ERROR: immediate must be an integer in the range [0, 31]
273
274cv.mulhhsrn t0, t1, 0, 0
275# CHECK-ERROR: invalid operand for instruction
276
277cv.mulhhsrn t0, 0, t2, 0
278# CHECK-ERROR: invalid operand for instruction
279
280cv.mulhhsrn 0, t1, t2, 0
281# CHECK-ERROR: invalid operand for instruction
282
283cv.mulhhsrn t0, t1, t2
284# CHECK-ERROR: too few operands for instruction
285
286cv.mulhhsrn t0, t1, t2, 0, a0
287# CHECK-ERROR: invalid operand for instruction
288
289cv.mulhhu t0, t1, 0
290# CHECK-ERROR: invalid operand for instruction
291
292cv.mulhhu t0, 0, t2
293# CHECK-ERROR: invalid operand for instruction
294
295cv.mulhhu 0, t1, t2
296# CHECK-ERROR: invalid operand for instruction
297
298cv.mulhhu t0, t1
299# CHECK-ERROR: too few operands for instruction
300
301cv.mulhhu t0, t1, t2, t4
302# CHECK-ERROR: invalid operand for instruction
303
304cv.mulhhun t0, t1, t2, -1
305# CHECK-ERROR: immediate must be an integer in the range [0, 31]
306
307cv.mulhhun t0, t1, t2, 32
308# CHECK-ERROR: immediate must be an integer in the range [0, 31]
309
310cv.mulhhun t0, t1, t2, a0
311# CHECK-ERROR: immediate must be an integer in the range [0, 31]
312
313cv.mulhhun t0, t1, 0, 0
314# CHECK-ERROR: invalid operand for instruction
315
316cv.mulhhun t0, 0, t2, 0
317# CHECK-ERROR: invalid operand for instruction
318
319cv.mulhhun 0, t1, t2, 0
320# CHECK-ERROR: invalid operand for instruction
321
322cv.mulhhun t0, t1, t2
323# CHECK-ERROR: too few operands for instruction
324
325cv.mulhhun t0, t1, t2, 0, a0
326# CHECK-ERROR: invalid operand for instruction
327
328cv.mulhhurn t0, t1, t2, -1
329# CHECK-ERROR: immediate must be an integer in the range [0, 31]
330
331cv.mulhhurn t0, t1, t2, 32
332# CHECK-ERROR: immediate must be an integer in the range [0, 31]
333
334cv.mulhhurn t0, t1, t2, a0
335# CHECK-ERROR: immediate must be an integer in the range [0, 31]
336
337cv.mulhhurn t0, t1, 0, 0
338# CHECK-ERROR: invalid operand for instruction
339
340cv.mulhhurn t0, 0, t2, 0
341# CHECK-ERROR: invalid operand for instruction
342
343cv.mulhhurn 0, t1, t2, 0
344# CHECK-ERROR: invalid operand for instruction
345
346cv.mulhhurn t0, t1, t2
347# CHECK-ERROR: too few operands for instruction
348
349cv.mulhhurn t0, t1, t2, 0, a0
350# CHECK-ERROR: invalid operand for instruction
351
352cv.muls t0, t1, 0
353# CHECK-ERROR: invalid operand for instruction
354
355cv.muls t0, 0, t2
356# CHECK-ERROR: invalid operand for instruction
357
358cv.muls 0, t1, t2
359# CHECK-ERROR: invalid operand for instruction
360
361cv.muls t0, t1
362# CHECK-ERROR: too few operands for instruction
363
364cv.muls t0, t1, t2, t4
365# CHECK-ERROR: invalid operand for instruction
366
367cv.mulsn t0, t1, t2, -1
368# CHECK-ERROR: immediate must be an integer in the range [0, 31]
369
370cv.mulsn t0, t1, t2, 32
371# CHECK-ERROR: immediate must be an integer in the range [0, 31]
372
373cv.mulsn t0, t1, t2, a0
374# CHECK-ERROR: immediate must be an integer in the range [0, 31]
375
376cv.mulsn t0, t1, 0, 0
377# CHECK-ERROR: invalid operand for instruction
378
379cv.mulsn t0, 0, t2, 0
380# CHECK-ERROR: invalid operand for instruction
381
382cv.mulsn 0, t1, t2, 0
383# CHECK-ERROR: invalid operand for instruction
384
385cv.mulsn t0, t1, t2
386# CHECK-ERROR: too few operands for instruction
387
388cv.mulsn t0, t1, t2, 0, a0
389# CHECK-ERROR: invalid operand for instruction
390
391cv.mulsrn t0, t1, t2, -1
392# CHECK-ERROR: immediate must be an integer in the range [0, 31]
393
394cv.mulsrn t0, t1, t2, 32
395# CHECK-ERROR: immediate must be an integer in the range [0, 31]
396
397cv.mulsrn t0, t1, t2, a0
398# CHECK-ERROR: immediate must be an integer in the range [0, 31]
399
400cv.mulsrn t0, t1, 0, 0
401# CHECK-ERROR: invalid operand for instruction
402
403cv.mulsrn t0, 0, t2, 0
404# CHECK-ERROR: invalid operand for instruction
405
406cv.mulsrn 0, t1, t2, 0
407# CHECK-ERROR: invalid operand for instruction
408
409cv.mulsrn t0, t1, t2
410# CHECK-ERROR: too few operands for instruction
411
412cv.mulsrn t0, t1, t2, 0, a0
413# CHECK-ERROR: invalid operand for instruction
414
415cv.mulu t0, t1, 0
416# CHECK-ERROR: invalid operand for instruction
417
418cv.mulu t0, 0, t2
419# CHECK-ERROR: invalid operand for instruction
420
421cv.mulu 0, t1, t2
422# CHECK-ERROR: invalid operand for instruction
423
424cv.mulu t0, t1
425# CHECK-ERROR: too few operands for instruction
426
427cv.mulu t0, t1, t2, t4
428# CHECK-ERROR: invalid operand for instruction
429
430cv.mulun t0, t1, t2, -1
431# CHECK-ERROR: immediate must be an integer in the range [0, 31]
432
433cv.mulun t0, t1, t2, 32
434# CHECK-ERROR: immediate must be an integer in the range [0, 31]
435
436cv.mulun t0, t1, t2, a0
437# CHECK-ERROR: immediate must be an integer in the range [0, 31]
438
439cv.mulun t0, t1, 0, 0
440# CHECK-ERROR: invalid operand for instruction
441
442cv.mulun t0, 0, t2, 0
443# CHECK-ERROR: invalid operand for instruction
444
445cv.mulun 0, t1, t2, 0
446# CHECK-ERROR: invalid operand for instruction
447
448cv.mulun t0, t1, t2
449# CHECK-ERROR: too few operands for instruction
450
451cv.mulun t0, t1, t2, 0, a0
452# CHECK-ERROR: invalid operand for instruction
453
454cv.mulurn t0, t1, t2, -1
455# CHECK-ERROR: immediate must be an integer in the range [0, 31]
456
457cv.mulurn t0, t1, t2, 32
458# CHECK-ERROR: immediate must be an integer in the range [0, 31]
459
460cv.mulurn t0, t1, t2, a0
461# CHECK-ERROR: immediate must be an integer in the range [0, 31]
462
463cv.mulurn t0, t1, 0, 0
464# CHECK-ERROR: invalid operand for instruction
465
466cv.mulurn t0, 0, t2, 0
467# CHECK-ERROR: invalid operand for instruction
468
469cv.mulurn 0, t1, t2, 0
470# CHECK-ERROR: invalid operand for instruction
471
472cv.mulurn t0, t1, t2
473# CHECK-ERROR: too few operands for instruction
474
475cv.mulurn t0, t1, t2, 0, a0
476# CHECK-ERROR: invalid operand for instruction
477