xref: /llvm-project/llvm/test/MC/RISCV/rvv/mv.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 --no-print-imm-hex - \
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
11vmv.v.v v8, v20
12# CHECK-INST: vmv.v.v v8, v20
13# CHECK-ENCODING: [0x57,0x04,0x0a,0x5e]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: 5e0a0457 <unknown>
16
17vmv.v.x v8, a0
18# CHECK-INST: vmv.v.x v8, a0
19# CHECK-ENCODING: [0x57,0x44,0x05,0x5e]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: 5e054457 <unknown>
22
23vmv.v.i v8, 15
24# CHECK-INST: vmv.v.i v8, 15
25# CHECK-ENCODING: [0x57,0xb4,0x07,0x5e]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: 5e07b457 <unknown>
28
29vmv.x.s a2, v4
30# CHECK-INST: vmv.x.s a2, v4
31# CHECK-ENCODING: [0x57,0x26,0x40,0x42]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: 42402657 <unknown>
34
35vmv.s.x v8, a0
36# CHECK-INST: vmv.s.x v8, a0
37# CHECK-ENCODING: [0x57,0x64,0x05,0x42]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: 42056457 <unknown>
40
41vmv1r.v v8, v4
42# CHECK-INST: vmv1r.v v8, v4
43# CHECK-ENCODING: [0x57,0x34,0x40,0x9e]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: 9e403457 <unknown>
46
47vmv2r.v v8, v4
48# CHECK-INST: vmv2r.v v8, v4
49# CHECK-ENCODING: [0x57,0xb4,0x40,0x9e]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
51# CHECK-UNKNOWN: 9e40b457 <unknown>
52
53vmv4r.v v8, v4
54# CHECK-INST: vmv4r.v v8, v4
55# CHECK-ENCODING: [0x57,0xb4,0x41,0x9e]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
57# CHECK-UNKNOWN: 9e41b457 <unknown>
58
59vmv8r.v v8, v24
60# CHECK-INST: vmv8r.v v8, v24
61# CHECK-ENCODING: [0x57,0xb4,0x83,0x9f]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
63# CHECK-UNKNOWN: 9f83b457 <unknown>
64