xref: /llvm-project/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s (revision c5a412dad5b89996cdd1661075c63dbf884f8e5c)
1# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvbitmanip %s 2>&1 \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ERROR
3
4cv.extract t0, t1
5# CHECK-ERROR: too few operands for instruction
6
7cv.extract t0, t1, 0
8# CHECK-ERROR: too few operands for instruction
9
10cv.extract t0, t1, t2
11# CHECK-ERROR: immediate must be an integer in the range [0, 31]
12
13cv.extract t0, t1, t2, t3
14# CHECK-ERROR: immediate must be an integer in the range [0, 31]
15
16cv.extract t0, t1, 0, 32
17# CHECK-ERROR: immediate must be an integer in the range [0, 31]
18
19cv.extract t0, t1, 0, -1
20# CHECK-ERROR: immediate must be an integer in the range [0, 31]
21
22cv.extract t0, t1, 32, 0
23# CHECK-ERROR: immediate must be an integer in the range [0, 31]
24
25cv.extract t0, t1, -1, 0
26# CHECK-ERROR: immediate must be an integer in the range [0, 31]
27
28cv.extractu t0, t1
29# CHECK-ERROR: too few operands for instruction
30
31cv.extractu t0, t1, 0
32# CHECK-ERROR: too few operands for instruction
33
34cv.extractu t0, t1, t2
35# CHECK-ERROR: immediate must be an integer in the range [0, 31]
36
37cv.extractu t0, t1, t2, t3
38# CHECK-ERROR: immediate must be an integer in the range [0, 31]
39
40cv.extractu t0, t1, 0, 32
41# CHECK-ERROR: immediate must be an integer in the range [0, 31]
42
43cv.extractu t0, t1, 0, -1
44# CHECK-ERROR: immediate must be an integer in the range [0, 31]
45
46cv.extractu t0, t1, 32, 0
47# CHECK-ERROR: immediate must be an integer in the range [0, 31]
48
49cv.extractu t0, t1, -1, 0
50# CHECK-ERROR: immediate must be an integer in the range [0, 31]
51
52cv.insert t0, t1
53# CHECK-ERROR: too few operands for instruction
54
55cv.insert t0, t1, 0
56# CHECK-ERROR: too few operands for instruction
57
58cv.insert t0, t1, t2
59# CHECK-ERROR: immediate must be an integer in the range [0, 31]
60
61cv.insert t0, t1, t2, t3
62# CHECK-ERROR: immediate must be an integer in the range [0, 31]
63
64cv.insert t0, t1, 0, 32
65# CHECK-ERROR: immediate must be an integer in the range [0, 31]
66
67cv.insert t0, t1, 0, -1
68# CHECK-ERROR: immediate must be an integer in the range [0, 31]
69
70cv.insert t0, t1, 32, 0
71# CHECK-ERROR: immediate must be an integer in the range [0, 31]
72
73cv.insert t0, t1, -1, 0
74# CHECK-ERROR: immediate must be an integer in the range [0, 31]
75
76cv.bclr t0, t1
77# CHECK-ERROR: too few operands for instruction
78
79cv.bclr t0, t1, 0
80# CHECK-ERROR: too few operands for instruction
81
82cv.bclr t0, t1, t2
83# CHECK-ERROR: immediate must be an integer in the range [0, 31]
84
85cv.bclr t0, t1, t2, t3
86# CHECK-ERROR: immediate must be an integer in the range [0, 31]
87
88cv.bclr t0, t1, 0, 32
89# CHECK-ERROR: immediate must be an integer in the range [0, 31]
90
91cv.bclr t0, t1, 0, -1
92# CHECK-ERROR: immediate must be an integer in the range [0, 31]
93
94cv.bclr t0, t1, 32, 0
95# CHECK-ERROR: immediate must be an integer in the range [0, 31]
96
97cv.bclr t0, t1, -1, 0
98# CHECK-ERROR: immediate must be an integer in the range [0, 31]
99
100cv.bset t0, t1
101# CHECK-ERROR: too few operands for instruction
102
103cv.bset t0, t1, 0
104# CHECK-ERROR: too few operands for instruction
105
106cv.bset t0, t1, t2
107# CHECK-ERROR: immediate must be an integer in the range [0, 31]
108
109cv.bset t0, t1, t2, t3
110# CHECK-ERROR: immediate must be an integer in the range [0, 31]
111
112cv.bset t0, t1, 0, 32
113# CHECK-ERROR: immediate must be an integer in the range [0, 31]
114
115cv.bset t0, t1, 0, -1
116# CHECK-ERROR: immediate must be an integer in the range [0, 31]
117
118cv.bset t0, t1, 32, 0
119# CHECK-ERROR: immediate must be an integer in the range [0, 31]
120
121cv.bset t0, t1, -1, 0
122# CHECK-ERROR: immediate must be an integer in the range [0, 31]
123
124cv.bitrev t0, t1
125# CHECK-ERROR: too few operands for instruction
126
127cv.bitrev t0, t1, 0
128# CHECK-ERROR: too few operands for instruction
129
130cv.bitrev t0, t1, t2
131# CHECK-ERROR: immediate must be an integer in the range [0, 3]
132
133cv.bitrev t0, t1, t2, t3
134# CHECK-ERROR: immediate must be an integer in the range [0, 3]
135
136cv.bitrev t0, t1, 0, 32
137# CHECK-ERROR: immediate must be an integer in the range [0, 31]
138
139cv.bitrev t0, t1, 0, -1
140# CHECK-ERROR: immediate must be an integer in the range [0, 31]
141
142cv.bitrev t0, t1, 32, 0
143# CHECK-ERROR: immediate must be an integer in the range [0, 3]
144
145cv.bitrev t0, t1, -1, 0
146# CHECK-ERROR: immediate must be an integer in the range [0, 3]
147
148cv.extractr t0
149# CHECK-ERROR: too few operands for instruction
150
151cv.extractr t0, 0
152# CHECK-ERROR: invalid operand for instruction
153
154cv.extractr t0, t1, 0
155# CHECK-ERROR: invalid operand for instruction
156
157cv.extractr t0, t1
158# CHECK-ERROR: too few operands for instruction
159
160cv.extractur t0
161# CHECK-ERROR: too few operands for instruction
162
163cv.extractur t0, 0
164# CHECK-ERROR: invalid operand for instruction
165
166cv.extractur t0, t1, 0
167# CHECK-ERROR: invalid operand for instruction
168
169cv.extractur t0, t1
170# CHECK-ERROR: too few operands for instruction
171
172cv.insertr t0
173# CHECK-ERROR: too few operands for instruction
174
175cv.insertr t0, 0
176# CHECK-ERROR: invalid operand for instruction
177
178cv.insertr t0, t1, 0
179# CHECK-ERROR: invalid operand for instruction
180
181cv.insertr t0, t1
182# CHECK-ERROR: too few operands for instruction
183
184cv.bclrr t0
185# CHECK-ERROR: too few operands for instruction
186
187cv.bclrr t0, 0
188# CHECK-ERROR: invalid operand for instruction
189
190cv.bclrr t0, t1, 0
191# CHECK-ERROR: invalid operand for instruction
192
193cv.bclrr t0, t1
194# CHECK-ERROR: too few operands for instruction
195
196cv.bsetr t0
197# CHECK-ERROR: too few operands for instruction
198
199cv.bsetr t0, 0
200# CHECK-ERROR: invalid operand for instruction
201
202cv.bsetr t0, t1, 0
203# CHECK-ERROR: invalid operand for instruction
204
205cv.bsetr t0, t1
206# CHECK-ERROR: too few operands for instruction
207
208cv.ror t0
209# CHECK-ERROR: too few operands for instruction
210
211cv.ror t0, 0
212# CHECK-ERROR: invalid operand for instruction
213
214cv.ror t0, t1, 0
215# CHECK-ERROR: invalid operand for instruction
216
217cv.ror t0, t1
218# CHECK-ERROR: too few operands for instruction
219
220cv.ff1 t0
221# CHECK-ERROR: too few operands for instruction
222
223cv.ff1 t0, 0
224# CHECK-ERROR: invalid operand for instruction
225
226cv.ff1 t0, t1, 0
227# CHECK-ERROR: invalid operand for instruction
228
229cv.ff1 t0, t1, t2
230# CHECK-ERROR: invalid operand for instruction
231
232cv.fl1 t0
233# CHECK-ERROR: too few operands for instruction
234
235cv.fl1 t0, 0
236# CHECK-ERROR: invalid operand for instruction
237
238cv.fl1 t0, t1, 0
239# CHECK-ERROR: invalid operand for instruction
240
241cv.fl1 t0, t1, t2
242# CHECK-ERROR: invalid operand for instruction
243
244cv.clb t0
245# CHECK-ERROR: too few operands for instruction
246
247cv.clb t0, 0
248# CHECK-ERROR: invalid operand for instruction
249
250cv.clb t0, t1, 0
251# CHECK-ERROR: invalid operand for instruction
252
253cv.clb t0, t1, t2
254# CHECK-ERROR: invalid operand for instruction
255
256cv.cnt t0
257# CHECK-ERROR: too few operands for instruction
258
259cv.cnt t0, 0
260# CHECK-ERROR: invalid operand for instruction
261
262cv.cnt t0, t1, 0
263# CHECK-ERROR: invalid operand for instruction
264
265cv.cnt t0, t1, t2
266# CHECK-ERROR: invalid operand for instruction
267
268