1 # RUN: llvm-mc %s -triple=riscv64 -mattr=+f -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+f < %s \
4 # RUN: | llvm-objdump -mattr=+f -M no-aliases -d -r - \
5 # RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
7 # RUN: not llvm-mc -triple riscv32 -mattr=+f < %s 2>&1 \
8 # RUN: | FileCheck -check-prefix=CHECK-RV32 %s
10 # FIXME: error messages for rv32f are misleading
12 # CHECK-ASM-AND-OBJ: fcvt.l.s a0, ft0, dyn
13 # CHECK-ASM: encoding: [0x53,0x75,0x20,0xc0]
14 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
16 # CHECK-ASM-AND-OBJ: fcvt.lu.s a1, ft1, dyn
17 # CHECK-ASM: encoding: [0xd3,0xf5,0x30,0xc0]
18 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
19 fcvt.lu.s a1
, ft1
, dyn
20 # CHECK-ASM-AND-OBJ: fcvt.s.l ft2, a2, dyn
21 # CHECK-ASM: encoding: [0x53,0x71,0x26,0xd0]
22 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
24 # CHECK-ASM-AND-OBJ: fcvt.s.lu ft3, a3, dyn
25 # CHECK-ASM: encoding: [0xd3,0xf1,0x36,0xd0]
26 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
27 fcvt.s.
lu ft3
, a3
, dyn
30 # CHECK-ASM-AND-OBJ: fcvt.l.s a4, ft4, rne
31 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
33 # CHECK-ASM-AND-OBJ: fcvt.lu.s a5, ft5, rtz
34 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
35 fcvt.lu.s a5
, ft5
, rtz
36 # CHECK-ASM-AND-OBJ: fcvt.s.l ft6, a6, rdn
37 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
39 # CHECK-ASM-AND-OBJ: fcvt.s.lu ft7, a7, rup
40 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
41 fcvt.s.
lu ft7
, a7
, rup