xref: /llvm-project/llvm/test/MC/RISCV/rvv/ext.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
11vzext.vf2 v8, v4, v0.t
12# CHECK-INST: vzext.vf2 v8, v4, v0.t
13# CHECK-ENCODING: [0x57,0x24,0x43,0x48]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: 48432457 <unknown>
16
17vzext.vf2 v8, v4
18# CHECK-INST: vzext.vf2 v8, v4
19# CHECK-ENCODING: [0x57,0x24,0x43,0x4a]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: 4a432457 <unknown>
22
23vsext.vf2 v8, v4, v0.t
24# CHECK-INST: vsext.vf2 v8, v4, v0.t
25# CHECK-ENCODING: [0x57,0xa4,0x43,0x48]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: 4843a457 <unknown>
28
29vsext.vf2 v8, v4
30# CHECK-INST: vsext.vf2 v8, v4
31# CHECK-ENCODING: [0x57,0xa4,0x43,0x4a]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: 4a43a457 <unknown>
34
35vzext.vf4 v8, v4, v0.t
36# CHECK-INST: vzext.vf4 v8, v4, v0.t
37# CHECK-ENCODING: [0x57,0x24,0x42,0x48]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: 48422457 <unknown>
40
41vzext.vf4 v8, v4
42# CHECK-INST: vzext.vf4 v8, v4
43# CHECK-ENCODING: [0x57,0x24,0x42,0x4a]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: 4a422457 <unknown>
46
47vsext.vf4 v8, v4, v0.t
48# CHECK-INST: vsext.vf4 v8, v4, v0.t
49# CHECK-ENCODING: [0x57,0xa4,0x42,0x48]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
51# CHECK-UNKNOWN: 4842a457 <unknown>
52
53vsext.vf4 v8, v4
54# CHECK-INST: vsext.vf4 v8, v4
55# CHECK-ENCODING: [0x57,0xa4,0x42,0x4a]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
57# CHECK-UNKNOWN: 4a42a457 <unknown>
58
59vzext.vf8 v8, v4, v0.t
60# CHECK-INST: vzext.vf8 v8, v4, v0.t
61# CHECK-ENCODING: [0x57,0x24,0x41,0x48]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
63# CHECK-UNKNOWN: 48412457 <unknown>
64
65vzext.vf8 v8, v4
66# CHECK-INST: vzext.vf8 v8, v4
67# CHECK-ENCODING: [0x57,0x24,0x41,0x4a]
68# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
69# CHECK-UNKNOWN: 4a412457 <unknown>
70
71vsext.vf8 v8, v4, v0.t
72# CHECK-INST: vsext.vf8 v8, v4, v0.t
73# CHECK-ENCODING: [0x57,0xa4,0x41,0x48]
74# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
75# CHECK-UNKNOWN: 4841a457 <unknown>
76
77vsext.vf8 v8, v4
78# CHECK-INST: vsext.vf8 v8, v4
79# CHECK-ENCODING: [0x57,0xa4,0x41,0x4a]
80# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
81# CHECK-UNKNOWN: 4a41a457 <unknown>
82