xref: /llvm-project/llvm/test/MC/RISCV/rvv/xsfvfnrclip.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v,+xsfvfnrclipxfqf %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,+xsfvfnrclipxfqf %s \
6# RUN:        | llvm-objdump -d --mattr=+v,+xsfvfnrclipxfqf - \
7# RUN:        | FileCheck %s --check-prefix=CHECK-INST
8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v,+xsfvfnrclipxfqf %s \
9# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10
11sf.vfnrclip.xu.f.qf v4, v8, fa2
12# CHECK-INST: sf.vfnrclip.xu.f.qf v4, v8, fa2
13# CHECK-ENCODING: [0x5b,0x52,0x86,0x8a]
14# CHECK-ERROR: instruction requires the following: 'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)
15# CHECK-UNKNOWN: 8a86525b <unknown>
16
17sf.vfnrclip.xu.f.qf v4, v8, fa2, v0.t
18# CHECK-INST: sf.vfnrclip.xu.f.qf v4, v8, fa2
19# CHECK-ENCODING: [0x5b,0x52,0x86,0x88]
20# CHECK-ERROR: instruction requires the following: 'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)
21# CHECK-UNKNOWN: 8886525b <unknown>
22
23sf.vfnrclip.x.f.qf v4, v8, fa2
24# CHECK-INST: sf.vfnrclip.x.f.qf v4, v8, fa2
25# CHECK-ENCODING: [0x5b,0x52,0x86,0x8e]
26# CHECK-ERROR: instruction requires the following: 'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)
27# CHECK-UNKNOWN: 8e86525b <unknown>
28
29sf.vfnrclip.x.f.qf v4, v8, fa2, v0.t
30# CHECK-INST: sf.vfnrclip.x.f.qf v4, v8, fa2
31# CHECK-ENCODING: [0x5b,0x52,0x86,0x8c]
32# CHECK-ERROR: instruction requires the following: 'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)
33# CHECK-UNKNOWN: 8c86525b <unknown>
34