xref: /llvm-project/llvm/test/MC/RISCV/rvv/fmv.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
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' (Vector Extensions for Embedded Processors){{$}}
18# CHECK-UNKNOWN: 5e055457 <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' (Vector Extensions for Embedded Processors){{$}}
24# CHECK-UNKNOWN: 42401557 <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' (Vector Extensions for Embedded Processors){{$}}
30# CHECK-UNKNOWN: 42055457 <unknown>
31