1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zfbfmin -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zfbfmin -riscv-no-aliases -show-encoding \
4 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zfbfmin,+f < %s \
6 # RUN: | llvm-objdump --mattr=+zfbfmin --no-print-imm-hex -M no-aliases -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfbfmin,+f < %s \
9 # RUN: | llvm-objdump --mattr=+zfbfmin --no-print-imm-hex -M no-aliases -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: flh ft0, 12(a0)
13 # CHECK-ASM: encoding: [0x07,0x10,0xc5,0x00]
15 # CHECK-ASM-AND-OBJ: flh ft1, 4(ra)
16 # CHECK-ASM: encoding: [0x87,0x90,0x40,0x00]
18 # CHECK-ASM-AND-OBJ: flh ft2, -2048(a3)
19 # CHECK-ASM: encoding: [0x07,0x91,0x06,0x80]
21 # CHECK-ASM-AND-OBJ: flh ft3, -2048(s1)
22 # CHECK-ASM: encoding: [0x87,0x91,0x04,0x80]
24 # CHECK-ASM-AND-OBJ: flh ft4, 2047(s2)
25 # CHECK-ASM: encoding: [0x07,0x12,0xf9,0x7f]
27 # CHECK-ASM-AND-OBJ: flh ft5, 0(s3)
28 # CHECK-ASM: encoding: [0x87,0x92,0x09,0x00]
31 # CHECK-ASM-AND-OBJ: fsh ft6, 2047(s4)
32 # CHECK-ASM: encoding: [0xa7,0x1f,0x6a,0x7e]
34 # CHECK-ASM-AND-OBJ: fsh ft7, -2048(s5)
35 # CHECK-ASM: encoding: [0x27,0x90,0x7a,0x80]
37 # CHECK-ASM-AND-OBJ: fsh fs0, -2048(s6)
38 # CHECK-ASM: encoding: [0x27,0x10,0x8b,0x80]
40 # CHECK-ASM-AND-OBJ: fsh fs1, 999(s7)
41 # CHECK-ASM: encoding: [0xa7,0x93,0x9b,0x3e]
44 # CHECK-ASM-AND-OBJ: fmv.x.h a2, fs7
45 # CHECK-ASM: encoding: [0x53,0x86,0x0b,0xe4]
47 # CHECK-ASM-AND-OBJ: fmv.h.x ft1, a6
48 # CHECK-ASM: encoding: [0xd3,0x00,0x08,0xf4]
51 # CHECK-ASM-AND-OBJ: fcvt.s.bf16 fa0, ft0
52 # CHECK-ASM: encoding: [0x53,0x05,0x60,0x40]
54 # CHECK-ASM-AND-OBJ: fcvt.s.bf16 fa0, ft0, rup
55 # CHECK-ASM: encoding: [0x53,0x35,0x60,0x40]
56 fcvt.s.bf16 fa0
, ft0
, rup
57 # CHECK-ASM-AND-OBJ: fcvt.bf16.s ft2, fa2
58 # CHECK-ASM: encoding: [0x53,0x71,0x86,0x44]