xref: /llvm-project/llvm/test/MC/RISCV/rvv/div.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
11vdivu.vv v8, v4, v20, v0.t
12# CHECK-INST: vdivu.vv v8, v4, v20, v0.t
13# CHECK-ENCODING: [0x57,0x24,0x4a,0x80]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: 804a2457 <unknown>
16
17vdivu.vv v8, v4, v20
18# CHECK-INST: vdivu.vv v8, v4, v20
19# CHECK-ENCODING: [0x57,0x24,0x4a,0x82]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: 824a2457 <unknown>
22
23vdivu.vx v8, v4, a0, v0.t
24# CHECK-INST: vdivu.vx v8, v4, a0, v0.t
25# CHECK-ENCODING: [0x57,0x64,0x45,0x80]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: 80456457 <unknown>
28
29vdivu.vx v8, v4, a0
30# CHECK-INST: vdivu.vx v8, v4, a0
31# CHECK-ENCODING: [0x57,0x64,0x45,0x82]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: 82456457 <unknown>
34
35vdiv.vv v8, v4, v20, v0.t
36# CHECK-INST: vdiv.vv v8, v4, v20, v0.t
37# CHECK-ENCODING: [0x57,0x24,0x4a,0x84]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: 844a2457 <unknown>
40
41vdiv.vv v8, v4, v20
42# CHECK-INST: vdiv.vv v8, v4, v20
43# CHECK-ENCODING: [0x57,0x24,0x4a,0x86]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: 864a2457 <unknown>
46
47vdiv.vx v8, v4, a0, v0.t
48# CHECK-INST: vdiv.vx v8, v4, a0, v0.t
49# CHECK-ENCODING: [0x57,0x64,0x45,0x84]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
51# CHECK-UNKNOWN: 84456457 <unknown>
52
53vdiv.vx v8, v4, a0
54# CHECK-INST: vdiv.vx v8, v4, a0
55# CHECK-ENCODING: [0x57,0x64,0x45,0x86]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
57# CHECK-UNKNOWN: 86456457 <unknown>
58
59vremu.vv v8, v4, v20, v0.t
60# CHECK-INST: vremu.vv v8, v4, v20, v0.t
61# CHECK-ENCODING: [0x57,0x24,0x4a,0x88]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
63# CHECK-UNKNOWN: 884a2457 <unknown>
64
65vremu.vv v8, v4, v20
66# CHECK-INST: vremu.vv v8, v4, v20
67# CHECK-ENCODING: [0x57,0x24,0x4a,0x8a]
68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
69# CHECK-UNKNOWN: 8a4a2457 <unknown>
70
71vremu.vx v8, v4, a0, v0.t
72# CHECK-INST: vremu.vx v8, v4, a0, v0.t
73# CHECK-ENCODING: [0x57,0x64,0x45,0x88]
74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
75# CHECK-UNKNOWN: 88456457 <unknown>
76
77vremu.vx v8, v4, a0
78# CHECK-INST: vremu.vx v8, v4, a0
79# CHECK-ENCODING: [0x57,0x64,0x45,0x8a]
80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
81# CHECK-UNKNOWN: 8a456457 <unknown>
82
83vrem.vv v8, v4, v20, v0.t
84# CHECK-INST: vrem.vv v8, v4, v20, v0.t
85# CHECK-ENCODING: [0x57,0x24,0x4a,0x8c]
86# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
87# CHECK-UNKNOWN: 8c4a2457 <unknown>
88
89vrem.vv v8, v4, v20
90# CHECK-INST: vrem.vv v8, v4, v20
91# CHECK-ENCODING: [0x57,0x24,0x4a,0x8e]
92# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
93# CHECK-UNKNOWN: 8e4a2457 <unknown>
94
95vrem.vx v8, v4, a0, v0.t
96# CHECK-INST: vrem.vx v8, v4, a0, v0.t
97# CHECK-ENCODING: [0x57,0x64,0x45,0x8c]
98# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
99# CHECK-UNKNOWN: 8c456457 <unknown>
100
101vrem.vx v8, v4, a0
102# CHECK-INST: vrem.vx v8, v4, a0
103# CHECK-ENCODING: [0x57,0x64,0x45,0x8e]
104# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
105# CHECK-UNKNOWN: 8e456457 <unknown>
106