1 # RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-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=+experimental-v %s \
6 # RUN: | llvm-objdump -d --mattr=+experimental-v - \
7 # RUN: | FileCheck %s --check-prefix=CHECK-INST
8 # RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \
9 # RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11 vsll.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 Instructions)
15 # CHECK-UNKNOWN: 57 04 4a 94 <unknown>
18 # CHECK-INST: vsll.vv v8, v4, v20
19 # CHECK-ENCODING: [0x57,0x04,0x4a,0x96]
20 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
21 # CHECK-UNKNOWN: 57 04 4a 96 <unknown>
23 vsll.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 Instructions)
27 # CHECK-UNKNOWN: 57 44 45 94 <unknown>
30 # CHECK-INST: vsll.vx v8, v4, a0
31 # CHECK-ENCODING: [0x57,0x44,0x45,0x96]
32 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
33 # CHECK-UNKNOWN: 57 44 45 96 <unknown>
35 vsll.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 Instructions)
39 # CHECK-UNKNOWN: 57 b4 4f 94 <unknown>
42 # CHECK-INST: vsll.vi v8, v4, 31
43 # CHECK-ENCODING: [0x57,0xb4,0x4f,0x96]
44 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
45 # CHECK-UNKNOWN: 57 b4 4f 96 <unknown>
47 vsrl.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 Instructions)
51 # CHECK-UNKNOWN: 57 04 4a a0 <unknown>
54 # CHECK-INST: vsrl.vv v8, v4, v20
55 # CHECK-ENCODING: [0x57,0x04,0x4a,0xa2]
56 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
57 # CHECK-UNKNOWN: 57 04 4a a2 <unknown>
59 vsrl.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 Instructions)
63 # CHECK-UNKNOWN: 57 44 45 a0 <unknown>
66 # CHECK-INST: vsrl.vx v8, v4, a0
67 # CHECK-ENCODING: [0x57,0x44,0x45,0xa2]
68 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
69 # CHECK-UNKNOWN: 57 44 45 a2 <unknown>
71 vsrl.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 Instructions)
75 # CHECK-UNKNOWN: 57 b4 4f a0 <unknown>
78 # CHECK-INST: vsrl.vi v8, v4, 31
79 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xa2]
80 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
81 # CHECK-UNKNOWN: 57 b4 4f a2 <unknown>
83 vsra.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 Instructions)
87 # CHECK-UNKNOWN: 57 04 4a a4 <unknown>
90 # CHECK-INST: vsra.vv v8, v4, v20
91 # CHECK-ENCODING: [0x57,0x04,0x4a,0xa6]
92 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
93 # CHECK-UNKNOWN: 57 04 4a a6 <unknown>
95 vsra.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 Instructions)
99 # CHECK-UNKNOWN: 57 44 45 a4 <unknown>
102 # CHECK-INST: vsra.vx v8, v4, a0
103 # CHECK-ENCODING: [0x57,0x44,0x45,0xa6]
104 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
105 # CHECK-UNKNOWN: 57 44 45 a6 <unknown>
107 vsra.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 Instructions)
111 # CHECK-UNKNOWN: 57 b4 4f a4 <unknown>
114 # CHECK-INST: vsra.vi v8, v4, 31
115 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xa6]
116 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
117 # CHECK-UNKNOWN: 57 b4 4f a6 <unknown>
119 vnsrl.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 Instructions)
123 # CHECK-UNKNOWN: 57 04 4a b0 <unknown>
125 vnsrl.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 Instructions)
129 # CHECK-UNKNOWN: 57 02 4a b0 <unknown>
132 # CHECK-INST: vnsrl.wv v8, v4, v20
133 # CHECK-ENCODING: [0x57,0x04,0x4a,0xb2]
134 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
135 # CHECK-UNKNOWN: 57 04 4a b2 <unknown>
137 vnsrl.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 Instructions)
141 # CHECK-UNKNOWN: 57 44 45 b0 <unknown>
144 # CHECK-INST: vnsrl.wx v8, v4, a0
145 # CHECK-ENCODING: [0x57,0x44,0x45,0xb2]
146 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
147 # CHECK-UNKNOWN: 57 44 45 b2 <unknown>
149 vnsrl.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 Instructions)
153 # CHECK-UNKNOWN: 57 b4 4f b0 <unknown>
156 # CHECK-INST: vnsrl.wi v8, v4, 31
157 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xb2]
158 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
159 # CHECK-UNKNOWN: 57 b4 4f b2 <unknown>
161 vnsra.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 Instructions)
165 # CHECK-UNKNOWN: 57 04 4a b4 <unknown>
168 # CHECK-INST: vnsra.wv v8, v4, v20
169 # CHECK-ENCODING: [0x57,0x04,0x4a,0xb6]
170 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
171 # CHECK-UNKNOWN: 57 04 4a b6 <unknown>
173 vnsra.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 Instructions)
177 # CHECK-UNKNOWN: 57 44 45 b4 <unknown>
180 # CHECK-INST: vnsra.wx v8, v4, a0
181 # CHECK-ENCODING: [0x57,0x44,0x45,0xb6]
182 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
183 # CHECK-UNKNOWN: 57 44 45 b6 <unknown>
185 vnsra.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 Instructions)
189 # CHECK-UNKNOWN: 57 b4 4f b4 <unknown>
192 # CHECK-INST: vnsra.wi v8, v4, 31
193 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xb6]
194 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
195 # CHECK-UNKNOWN: 57 b4 4f b6 <unknown>
197 vssrl.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 Instructions)
201 # CHECK-UNKNOWN: 57 04 4a a8 <unknown>
204 # CHECK-INST: vssrl.vv v8, v4, v20
205 # CHECK-ENCODING: [0x57,0x04,0x4a,0xaa]
206 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
207 # CHECK-UNKNOWN: 57 04 4a aa <unknown>
209 vssrl.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 Instructions)
213 # CHECK-UNKNOWN: 57 44 45 a8 <unknown>
216 # CHECK-INST: vssrl.vx v8, v4, a0
217 # CHECK-ENCODING: [0x57,0x44,0x45,0xaa]
218 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
219 # CHECK-UNKNOWN: 57 44 45 aa <unknown>
221 vssrl.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 Instructions)
225 # CHECK-UNKNOWN: 57 b4 4f a8 <unknown>
228 # CHECK-INST: vssrl.vi v8, v4, 31
229 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xaa]
230 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
231 # CHECK-UNKNOWN: 57 b4 4f aa <unknown>
233 vssra.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 Instructions)
237 # CHECK-UNKNOWN: 57 04 4a ac <unknown>
240 # CHECK-INST: vssra.vv v8, v4, v20
241 # CHECK-ENCODING: [0x57,0x04,0x4a,0xae]
242 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
243 # CHECK-UNKNOWN: 57 04 4a ae <unknown>
245 vssra.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 Instructions)
249 # CHECK-UNKNOWN: 57 44 45 ac <unknown>
252 # CHECK-INST: vssra.vx v8, v4, a0
253 # CHECK-ENCODING: [0x57,0x44,0x45,0xae]
254 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
255 # CHECK-UNKNOWN: 57 44 45 ae <unknown>
257 vssra.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 Instructions)
261 # CHECK-UNKNOWN: 57 b4 4f ac <unknown>
264 # CHECK-INST: vssra.vi v8, v4, 31
265 # CHECK-ENCODING: [0x57,0xb4,0x4f,0xae]
266 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
267 # CHECK-UNKNOWN: 57 b4 4f ae <unknown>