xref: /llvm-project/llvm/test/MC/RISCV/rvv/macc.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 -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
11vmacc.vv v8, v20, v4, v0.t
12# CHECK-INST: vmacc.vv v8, v20, v4, v0.t
13# CHECK-ENCODING: [0x57,0x24,0x4a,0xb4]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: b44a2457 <unknown>
16
17vmacc.vv v8, v20, v4
18# CHECK-INST: vmacc.vv v8, v20, v4
19# CHECK-ENCODING: [0x57,0x24,0x4a,0xb6]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: b64a2457 <unknown>
22
23vmacc.vx v8, a0, v4, v0.t
24# CHECK-INST: vmacc.vx v8, a0, v4, v0.t
25# CHECK-ENCODING: [0x57,0x64,0x45,0xb4]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: b4456457 <unknown>
28
29vmacc.vx v8, a0, v4
30# CHECK-INST: vmacc.vx v8, a0, v4
31# CHECK-ENCODING: [0x57,0x64,0x45,0xb6]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: b6456457 <unknown>
34
35vnmsac.vv v8, v20, v4, v0.t
36# CHECK-INST: vnmsac.vv v8, v20, v4, v0.t
37# CHECK-ENCODING: [0x57,0x24,0x4a,0xbc]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: bc4a2457 <unknown>
40
41vnmsac.vv v8, v20, v4
42# CHECK-INST: vnmsac.vv v8, v20, v4
43# CHECK-ENCODING: [0x57,0x24,0x4a,0xbe]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: be4a2457 <unknown>
46
47vnmsac.vx v8, a0, v4, v0.t
48# CHECK-INST: vnmsac.vx v8, a0, v4, v0.t
49# CHECK-ENCODING: [0x57,0x64,0x45,0xbc]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
51# CHECK-UNKNOWN: bc456457 <unknown>
52
53vnmsac.vx v8, a0, v4
54# CHECK-INST: vnmsac.vx v8, a0, v4
55# CHECK-ENCODING: [0x57,0x64,0x45,0xbe]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
57# CHECK-UNKNOWN: be456457 <unknown>
58
59vmadd.vv v8, v20, v4, v0.t
60# CHECK-INST: vmadd.vv v8, v20, v4, v0.t
61# CHECK-ENCODING: [0x57,0x24,0x4a,0xa4]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
63# CHECK-UNKNOWN: a44a2457 <unknown>
64
65vmadd.vv v8, v20, v4
66# CHECK-INST: vmadd.vv v8, v20, v4
67# CHECK-ENCODING: [0x57,0x24,0x4a,0xa6]
68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
69# CHECK-UNKNOWN: a64a2457 <unknown>
70
71vmadd.vx v8, a0, v4, v0.t
72# CHECK-INST: vmadd.vx v8, a0, v4, v0.t
73# CHECK-ENCODING: [0x57,0x64,0x45,0xa4]
74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
75# CHECK-UNKNOWN: a4456457 <unknown>
76
77vmadd.vx v8, a0, v4
78# CHECK-INST: vmadd.vx v8, a0, v4
79# CHECK-ENCODING: [0x57,0x64,0x45,0xa6]
80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
81# CHECK-UNKNOWN: a6456457 <unknown>
82
83vnmsub.vv v8, v20, v4, v0.t
84# CHECK-INST: vnmsub.vv v8, v20, v4, v0.t
85# CHECK-ENCODING: [0x57,0x24,0x4a,0xac]
86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
87# CHECK-UNKNOWN: ac4a2457 <unknown>
88
89vnmsub.vv v8, v20, v4
90# CHECK-INST: vnmsub.vv v8, v20, v4
91# CHECK-ENCODING: [0x57,0x24,0x4a,0xae]
92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
93# CHECK-UNKNOWN: ae4a2457 <unknown>
94
95vnmsub.vx v8, a0, v4, v0.t
96# CHECK-INST: vnmsub.vx v8, a0, v4, v0.t
97# CHECK-ENCODING: [0x57,0x64,0x45,0xac]
98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
99# CHECK-UNKNOWN: ac456457 <unknown>
100
101vnmsub.vx v8, a0, v4
102# CHECK-INST: vnmsub.vx v8, a0, v4
103# CHECK-ENCODING: [0x57,0x64,0x45,0xae]
104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
105# CHECK-UNKNOWN: ae456457 <unknown>
106
107vwmaccu.vv v8, v20, v4, v0.t
108# CHECK-INST: vwmaccu.vv v8, v20, v4, v0.t
109# CHECK-ENCODING: [0x57,0x24,0x4a,0xf0]
110# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
111# CHECK-UNKNOWN: f04a2457 <unknown>
112
113vwmaccu.vv v8, v20, v4
114# CHECK-INST: vwmaccu.vv v8, v20, v4
115# CHECK-ENCODING: [0x57,0x24,0x4a,0xf2]
116# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
117# CHECK-UNKNOWN: f24a2457 <unknown>
118
119vwmaccu.vx v8, a0, v4, v0.t
120# CHECK-INST: vwmaccu.vx v8, a0, v4, v0.t
121# CHECK-ENCODING: [0x57,0x64,0x45,0xf0]
122# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
123# CHECK-UNKNOWN: f0456457 <unknown>
124
125vwmaccu.vx v8, a0, v4
126# CHECK-INST: vwmaccu.vx v8, a0, v4
127# CHECK-ENCODING: [0x57,0x64,0x45,0xf2]
128# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
129# CHECK-UNKNOWN: f2456457 <unknown>
130
131vwmacc.vv v8, v20, v4, v0.t
132# CHECK-INST: vwmacc.vv v8, v20, v4, v0.t
133# CHECK-ENCODING: [0x57,0x24,0x4a,0xf4]
134# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
135# CHECK-UNKNOWN: f44a2457 <unknown>
136
137vwmacc.vv v8, v20, v4
138# CHECK-INST: vwmacc.vv v8, v20, v4
139# CHECK-ENCODING: [0x57,0x24,0x4a,0xf6]
140# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
141# CHECK-UNKNOWN: f64a2457 <unknown>
142
143vwmacc.vx v8, a0, v4, v0.t
144# CHECK-INST: vwmacc.vx v8, a0, v4, v0.t
145# CHECK-ENCODING: [0x57,0x64,0x45,0xf4]
146# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
147# CHECK-UNKNOWN: f4456457 <unknown>
148
149vwmacc.vx v8, a0, v4
150# CHECK-INST: vwmacc.vx v8, a0, v4
151# CHECK-ENCODING: [0x57,0x64,0x45,0xf6]
152# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
153# CHECK-UNKNOWN: f6456457 <unknown>
154
155vwmaccsu.vv v8, v20, v4, v0.t
156# CHECK-INST: vwmaccsu.vv v8, v20, v4, v0.t
157# CHECK-ENCODING: [0x57,0x24,0x4a,0xfc]
158# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
159# CHECK-UNKNOWN: fc4a2457 <unknown>
160
161vwmaccsu.vv v8, v20, v4
162# CHECK-INST: vwmaccsu.vv v8, v20, v4
163# CHECK-ENCODING: [0x57,0x24,0x4a,0xfe]
164# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
165# CHECK-UNKNOWN: fe4a2457 <unknown>
166
167vwmaccsu.vx v8, a0, v4, v0.t
168# CHECK-INST: vwmaccsu.vx v8, a0, v4, v0.t
169# CHECK-ENCODING: [0x57,0x64,0x45,0xfc]
170# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
171# CHECK-UNKNOWN: fc456457 <unknown>
172
173vwmaccsu.vx v8, a0, v4
174# CHECK-INST: vwmaccsu.vx v8, a0, v4
175# CHECK-ENCODING: [0x57,0x64,0x45,0xfe]
176# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
177# CHECK-UNKNOWN: fe456457 <unknown>
178
179vwmaccus.vx v8, a0, v4, v0.t
180# CHECK-INST: vwmaccus.vx v8, a0, v4, v0.t
181# CHECK-ENCODING: [0x57,0x64,0x45,0xf8]
182# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
183# CHECK-UNKNOWN: f8456457 <unknown>
184
185vwmaccus.vx v8, a0, v4
186# CHECK-INST: vwmaccus.vx v8, a0, v4
187# CHECK-ENCODING: [0x57,0x64,0x45,0xfa]
188# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
189# CHECK-UNKNOWN: fa456457 <unknown>
190