xref: /llvm-project/llvm/test/MC/RISCV/rvv/shift.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
4# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
6# RUN:        | llvm-objdump --no-print-imm-hex -d --mattr=+v - \
7# RUN:        | FileCheck %s --check-prefix=CHECK-INST
8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
9# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10
11vsll.vv v8, v4, v20, v0.t
12# CHECK-INST: vsll.vv v8, v4, v20, v0.t
13# CHECK-ENCODING: [0x57,0x04,0x4a,0x94]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: 944a0457 <unknown>
16
17vsll.vv v8, v4, v20
18# CHECK-INST: vsll.vv v8, v4, v20
19# CHECK-ENCODING: [0x57,0x04,0x4a,0x96]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: 964a0457 <unknown>
22
23vsll.vx v8, v4, a0, v0.t
24# CHECK-INST: vsll.vx v8, v4, a0, v0.t
25# CHECK-ENCODING: [0x57,0x44,0x45,0x94]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: 94454457 <unknown>
28
29vsll.vx v8, v4, a0
30# CHECK-INST: vsll.vx v8, v4, a0
31# CHECK-ENCODING: [0x57,0x44,0x45,0x96]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: 96454457 <unknown>
34
35vsll.vi v8, v4, 31, v0.t
36# CHECK-INST: vsll.vi v8, v4, 31, v0.t
37# CHECK-ENCODING: [0x57,0xb4,0x4f,0x94]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: 944fb457 <unknown>
40
41vsll.vi v8, v4, 31
42# CHECK-INST: vsll.vi v8, v4, 31
43# CHECK-ENCODING: [0x57,0xb4,0x4f,0x96]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: 964fb457 <unknown>
46
47vsrl.vv v8, v4, v20, v0.t
48# CHECK-INST: vsrl.vv v8, v4, v20, v0.t
49# CHECK-ENCODING: [0x57,0x04,0x4a,0xa0]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
51# CHECK-UNKNOWN: a04a0457 <unknown>
52
53vsrl.vv v8, v4, v20
54# CHECK-INST: vsrl.vv v8, v4, v20
55# CHECK-ENCODING: [0x57,0x04,0x4a,0xa2]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
57# CHECK-UNKNOWN: a24a0457 <unknown>
58
59vsrl.vx v8, v4, a0, v0.t
60# CHECK-INST: vsrl.vx v8, v4, a0, v0.t
61# CHECK-ENCODING: [0x57,0x44,0x45,0xa0]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
63# CHECK-UNKNOWN: a0454457 <unknown>
64
65vsrl.vx v8, v4, a0
66# CHECK-INST: vsrl.vx v8, v4, a0
67# CHECK-ENCODING: [0x57,0x44,0x45,0xa2]
68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
69# CHECK-UNKNOWN: a2454457 <unknown>
70
71vsrl.vi v8, v4, 31, v0.t
72# CHECK-INST: vsrl.vi v8, v4, 31, v0.t
73# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa0]
74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
75# CHECK-UNKNOWN: a04fb457 <unknown>
76
77vsrl.vi v8, v4, 31
78# CHECK-INST: vsrl.vi v8, v4, 31
79# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa2]
80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
81# CHECK-UNKNOWN: a24fb457 <unknown>
82
83vsra.vv v8, v4, v20, v0.t
84# CHECK-INST: vsra.vv v8, v4, v20, v0.t
85# CHECK-ENCODING: [0x57,0x04,0x4a,0xa4]
86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
87# CHECK-UNKNOWN: a44a0457 <unknown>
88
89vsra.vv v8, v4, v20
90# CHECK-INST: vsra.vv v8, v4, v20
91# CHECK-ENCODING: [0x57,0x04,0x4a,0xa6]
92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
93# CHECK-UNKNOWN: a64a0457 <unknown>
94
95vsra.vx v8, v4, a0, v0.t
96# CHECK-INST: vsra.vx v8, v4, a0, v0.t
97# CHECK-ENCODING: [0x57,0x44,0x45,0xa4]
98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
99# CHECK-UNKNOWN: a4454457 <unknown>
100
101vsra.vx v8, v4, a0
102# CHECK-INST: vsra.vx v8, v4, a0
103# CHECK-ENCODING: [0x57,0x44,0x45,0xa6]
104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
105# CHECK-UNKNOWN: a6454457 <unknown>
106
107vsra.vi v8, v4, 31, v0.t
108# CHECK-INST: vsra.vi v8, v4, 31, v0.t
109# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa4]
110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
111# CHECK-UNKNOWN: a44fb457 <unknown>
112
113vsra.vi v8, v4, 31
114# CHECK-INST: vsra.vi v8, v4, 31
115# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa6]
116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
117# CHECK-UNKNOWN: a64fb457 <unknown>
118
119vnsrl.wv v8, v4, v20, v0.t
120# CHECK-INST: vnsrl.wv v8, v4, v20, v0.t
121# CHECK-ENCODING: [0x57,0x04,0x4a,0xb0]
122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
123# CHECK-UNKNOWN: b04a0457 <unknown>
124
125vnsrl.wv v4, v4, v20, v0.t
126# CHECK-INST: vnsrl.wv v4, v4, v20, v0.t
127# CHECK-ENCODING: [0x57,0x02,0x4a,0xb0]
128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
129# CHECK-UNKNOWN: b04a0257 <unknown>
130
131vnsrl.wv v8, v4, v20
132# CHECK-INST: vnsrl.wv v8, v4, v20
133# CHECK-ENCODING: [0x57,0x04,0x4a,0xb2]
134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
135# CHECK-UNKNOWN: b24a0457 <unknown>
136
137vnsrl.wx v8, v4, a0, v0.t
138# CHECK-INST: vnsrl.wx v8, v4, a0, v0.t
139# CHECK-ENCODING: [0x57,0x44,0x45,0xb0]
140# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
141# CHECK-UNKNOWN: b0454457 <unknown>
142
143vnsrl.wx v8, v4, a0
144# CHECK-INST: vnsrl.wx v8, v4, a0
145# CHECK-ENCODING: [0x57,0x44,0x45,0xb2]
146# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
147# CHECK-UNKNOWN: b2454457 <unknown>
148
149vnsrl.wi v8, v4, 31, v0.t
150# CHECK-INST: vnsrl.wi v8, v4, 31, v0.t
151# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb0]
152# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
153# CHECK-UNKNOWN: b04fb457 <unknown>
154
155vnsrl.wi v8, v4, 31
156# CHECK-INST: vnsrl.wi v8, v4, 31
157# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb2]
158# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
159# CHECK-UNKNOWN: b24fb457 <unknown>
160
161vnsra.wv v8, v4, v20, v0.t
162# CHECK-INST: vnsra.wv v8, v4, v20, v0.t
163# CHECK-ENCODING: [0x57,0x04,0x4a,0xb4]
164# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
165# CHECK-UNKNOWN: b44a0457 <unknown>
166
167vnsra.wv v8, v4, v20
168# CHECK-INST: vnsra.wv v8, v4, v20
169# CHECK-ENCODING: [0x57,0x04,0x4a,0xb6]
170# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
171# CHECK-UNKNOWN: b64a0457 <unknown>
172
173vnsra.wx v8, v4, a0, v0.t
174# CHECK-INST: vnsra.wx v8, v4, a0, v0.t
175# CHECK-ENCODING: [0x57,0x44,0x45,0xb4]
176# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
177# CHECK-UNKNOWN: b4454457 <unknown>
178
179vnsra.wx v8, v4, a0
180# CHECK-INST: vnsra.wx v8, v4, a0
181# CHECK-ENCODING: [0x57,0x44,0x45,0xb6]
182# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
183# CHECK-UNKNOWN: b6454457 <unknown>
184
185vnsra.wi v8, v4, 31, v0.t
186# CHECK-INST: vnsra.wi v8, v4, 31, v0.t
187# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb4]
188# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
189# CHECK-UNKNOWN: b44fb457 <unknown>
190
191vnsra.wi v8, v4, 31
192# CHECK-INST: vnsra.wi v8, v4, 31
193# CHECK-ENCODING: [0x57,0xb4,0x4f,0xb6]
194# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
195# CHECK-UNKNOWN: b64fb457 <unknown>
196
197vssrl.vv v8, v4, v20, v0.t
198# CHECK-INST: vssrl.vv v8, v4, v20, v0.t
199# CHECK-ENCODING: [0x57,0x04,0x4a,0xa8]
200# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
201# CHECK-UNKNOWN: a84a0457 <unknown>
202
203vssrl.vv v8, v4, v20
204# CHECK-INST: vssrl.vv v8, v4, v20
205# CHECK-ENCODING: [0x57,0x04,0x4a,0xaa]
206# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
207# CHECK-UNKNOWN: aa4a0457 <unknown>
208
209vssrl.vx v8, v4, a0, v0.t
210# CHECK-INST: vssrl.vx v8, v4, a0, v0.t
211# CHECK-ENCODING: [0x57,0x44,0x45,0xa8]
212# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
213# CHECK-UNKNOWN: a8454457 <unknown>
214
215vssrl.vx v8, v4, a0
216# CHECK-INST: vssrl.vx v8, v4, a0
217# CHECK-ENCODING: [0x57,0x44,0x45,0xaa]
218# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
219# CHECK-UNKNOWN: aa454457 <unknown>
220
221vssrl.vi v8, v4, 31, v0.t
222# CHECK-INST: vssrl.vi v8, v4, 31, v0.t
223# CHECK-ENCODING: [0x57,0xb4,0x4f,0xa8]
224# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
225# CHECK-UNKNOWN: a84fb457 <unknown>
226
227vssrl.vi v8, v4, 31
228# CHECK-INST: vssrl.vi v8, v4, 31
229# CHECK-ENCODING: [0x57,0xb4,0x4f,0xaa]
230# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
231# CHECK-UNKNOWN: aa4fb457 <unknown>
232
233vssra.vv v8, v4, v20, v0.t
234# CHECK-INST: vssra.vv v8, v4, v20, v0.t
235# CHECK-ENCODING: [0x57,0x04,0x4a,0xac]
236# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
237# CHECK-UNKNOWN: ac4a0457 <unknown>
238
239vssra.vv v8, v4, v20
240# CHECK-INST: vssra.vv v8, v4, v20
241# CHECK-ENCODING: [0x57,0x04,0x4a,0xae]
242# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
243# CHECK-UNKNOWN: ae4a0457 <unknown>
244
245vssra.vx v8, v4, a0, v0.t
246# CHECK-INST: vssra.vx v8, v4, a0, v0.t
247# CHECK-ENCODING: [0x57,0x44,0x45,0xac]
248# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
249# CHECK-UNKNOWN: ac454457 <unknown>
250
251vssra.vx v8, v4, a0
252# CHECK-INST: vssra.vx v8, v4, a0
253# CHECK-ENCODING: [0x57,0x44,0x45,0xae]
254# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
255# CHECK-UNKNOWN: ae454457 <unknown>
256
257vssra.vi v8, v4, 31, v0.t
258# CHECK-INST: vssra.vi v8, v4, 31, v0.t
259# CHECK-ENCODING: [0x57,0xb4,0x4f,0xac]
260# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
261# CHECK-UNKNOWN: ac4fb457 <unknown>
262
263vssra.vi v8, v4, 31
264# CHECK-INST: vssra.vi v8, v4, 31
265# CHECK-ENCODING: [0x57,0xb4,0x4f,0xae]
266# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
267# CHECK-UNKNOWN: ae4fb457 <unknown>
268