xref: /llvm-project-15.0.7/llvm/test/MC/RISCV/rvv/fmv.s (revision 3cf15af2)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \
2# RUN:         --mattr=+f \
3# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
4# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
5# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
6# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
7# RUN:         --mattr=+f \
8# RUN:        | llvm-objdump -d --mattr=+v --mattr=+f - \
9# RUN:        | FileCheck %s --check-prefix=CHECK-INST
10# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
11# RUN:         --mattr=+f \
12# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
13
14vfmv.v.f v8, fa0
15# CHECK-INST: vfmv.v.f v8, fa0
16# CHECK-ENCODING: [0x57,0x54,0x05,0x5e]
17# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f', 'Zve64f' or 'Zve64d'
18# CHECK-UNKNOWN: 57 54 05 5e <unknown>
19
20vfmv.f.s fa0, v4
21# CHECK-INST: vfmv.f.s fa0, v4
22# CHECK-ENCODING: [0x57,0x15,0x40,0x42]
23# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f', 'Zve64f' or 'Zve64d'
24# CHECK-UNKNOWN: 57 15 40 42 <unknown>
25
26vfmv.s.f v8, fa0
27# CHECK-INST: vfmv.s.f v8, fa0
28# CHECK-ENCODING: [0x57,0x54,0x05,0x42]
29# CHECK-ERROR: instruction requires the following: 'V'{{.*}}'Zve32f', 'Zve64f' or 'Zve64d'
30# CHECK-UNKNOWN: 57 54 05 42 <unknown>
31