1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zfinx -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=+zfinx -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=+zfinx %s \
6 # RUN: | llvm-objdump --mattr=+zfinx -M no-aliases -d -r - \
7 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zfinx %s \
9 # RUN: | llvm-objdump --mattr=+zfinx -M no-aliases -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: fmadd.s a0, a1, a2, a3, dyn
13 # CHECK-ASM: encoding: [0x43,0xf5,0xc5,0x68]
14 fmadd.s x10
, x11
, x12
, x13
, dyn
15 # CHECK-ASM-AND-OBJ: fmsub.s a4, a5, a6, a7, dyn
16 # CHECK-ASM: encoding: [0x47,0xf7,0x07,0x89]
17 fmsub.s x14
, x15
, x16
, x17
, dyn
18 # CHECK-ASM-AND-OBJ: fnmsub.s s2, s3, s4, s5, dyn
19 # CHECK-ASM: encoding: [0x4b,0xf9,0x49,0xa9]
20 fnmsub.s x18
, x19
, x20
, x21
, dyn
21 # CHECK-ASM-AND-OBJ: fnmadd.s s6, s7, s8, s9, dyn
22 # CHECK-ASM: encoding: [0x4f,0xfb,0x8b,0xc9]
23 fnmadd.s x22
, x23
, x24
, x25
, dyn
25 # CHECK-ASM-AND-OBJ: fadd.s s10, s11, t3, dyn
26 # CHECK-ASM: encoding: [0x53,0xfd,0xcd,0x01]
27 fadd.s x26
, x27
, x28
, dyn
28 # CHECK-ASM-AND-OBJ: fsub.s t4, t5, t6, dyn
29 # CHECK-ASM: encoding: [0xd3,0x7e,0xff,0x09]
30 fsub.s x29
, x30
, x31
, dyn
31 # CHECK-ASM-AND-OBJ: fmul.s s0, s1, s2, dyn
32 # CHECK-ASM: encoding: [0x53,0xf4,0x24,0x11]
33 fmul.s s0
, s1
, s2
, dyn
34 # CHECK-ASM-AND-OBJ: fdiv.s s3, s4, s5, dyn
35 # CHECK-ASM: encoding: [0xd3,0x79,0x5a,0x19]
36 fdiv.s s3
, s4
, s5
, dyn
37 # CHECK-ASM-AND-OBJ: fsqrt.s t1, t2, dyn
38 # CHECK-ASM: encoding: [0x53,0xf3,0x03,0x58]
40 # CHECK-ASM-AND-OBJ: fsgnj.s s1, a0, a1
41 # CHECK-ASM: encoding: [0xd3,0x04,0xb5,0x20]
43 # CHECK-ASM-AND-OBJ: fsgnjn.s a1, a3, a4
44 # CHECK-ASM: encoding: [0xd3,0x95,0xe6,0x20]
46 # CHECK-ASM-AND-OBJ: fsgnjx.s a4, a3, a2
47 # CHECK-ASM: encoding: [0x53,0xa7,0xc6,0x20]
49 # CHECK-ASM-AND-OBJ: fmin.s a5, a6, a7
50 # CHECK-ASM: encoding: [0xd3,0x07,0x18,0x29]
52 # CHECK-ASM-AND-OBJ: fmax.s s2, s3, s4
53 # CHECK-ASM: encoding: [0x53,0x99,0x49,0x29]
55 # CHECK-ASM-AND-OBJ: fcvt.w.s a0, s5, dyn
56 # CHECK-ASM: encoding: [0x53,0xf5,0x0a,0xc0]
58 # CHECK-ASM-AND-OBJ: fcvt.wu.s a1, s6, dyn
59 # CHECK-ASM: encoding: [0xd3,0x75,0x1b,0xc0]
61 # CHECK-ASM-AND-OBJ: feq.s a1, s8, s9
62 # CHECK-ASM: encoding: [0xd3,0x25,0x9c,0xa1]
64 # CHECK-ASM-AND-OBJ: flt.s a2, s10, s11
65 # CHECK-ASM: encoding: [0x53,0x16,0xbd,0xa1]
67 # CHECK-ASM-AND-OBJ: fle.s a3, t3, t4
68 # CHECK-ASM: encoding: [0xd3,0x06,0xde,0xa1]
70 # CHECK-ASM-AND-OBJ: fclass.s a3, t5
71 # CHECK-ASM: encoding: [0xd3,0x16,0x0f,0xe0]
73 # CHECK-ASM-AND-OBJ: fcvt.s.w t6, a4, dyn
74 # CHECK-ASM: encoding: [0xd3,0x7f,0x07,0xd0]
76 # CHECK-ASM-AND-OBJ: fcvt.s.wu s0, a5, dyn
77 # CHECK-ASM: encoding: [0x53,0xf4,0x17,0xd0]
82 # CHECK-ASM-AND-OBJ: fmadd.s a0, a1, a2, a3, rne
83 # CHECK-ASM: encoding: [0x43,0x85,0xc5,0x68]
84 fmadd.s x10
, x11
, x12
, x13
, rne
85 # CHECK-ASM-AND-OBJ: fmsub.s a4, a5, a6, a7, rtz
86 # CHECK-ASM: encoding: [0x47,0x97,0x07,0x89]
87 fmsub.s x14
, x15
, x16
, x17
, rtz
88 # CHECK-ASM-AND-OBJ: fnmsub.s s2, s3, s4, s5, rdn
89 # CHECK-ASM: encoding: [0x4b,0xa9,0x49,0xa9]
90 fnmsub.s x18
, x19
, x20
, x21
, rdn
91 # CHECK-ASM-AND-OBJ: fnmadd.s s6, s7, s8, s9, rup
92 # CHECK-ASM: encoding: [0x4f,0xbb,0x8b,0xc9]
93 fnmadd.s x22
, x23
, x24
, x25
, rup
94 # CHECK-ASM-AND-OBJ: fmadd.s a0, a1, a2, a3, rmm
95 # CHECK-ASM: encoding: [0x43,0xc5,0xc5,0x68]
96 fmadd.s x10
, x11
, x12
, x13
, rmm
97 # CHECK-ASM-AND-OBJ: fmsub.s a4, a5, a6, a7
98 # CHECK-ASM: encoding: [0x47,0xf7,0x07,0x89]
99 fmsub.s x14
, x15
, x16
, x17
, dyn
101 # CHECK-ASM-AND-OBJ: fadd.s s10, s11, t3, rne
102 # CHECK-ASM: encoding: [0x53,0x8d,0xcd,0x01]
103 fadd.s x26
, x27
, x28
, rne
104 # CHECK-ASM-AND-OBJ: fsub.s t4, t5, t6, rtz
105 # CHECK-ASM: encoding: [0xd3,0x1e,0xff,0x09]
106 fsub.s x29
, x30
, x31
, rtz
107 # CHECK-ASM-AND-OBJ: fmul.s s0, s1, s2, rdn
108 # CHECK-ASM: encoding: [0x53,0xa4,0x24,0x11]
109 fmul.s s0
, s1
, s2
, rdn
110 # CHECK-ASM-AND-OBJ: fdiv.s s3, s4, s5, rup
111 # CHECK-ASM: encoding: [0xd3,0x39,0x5a,0x19]
112 fdiv.s s3
, s4
, s5
, rup
114 # CHECK-ASM-AND-OBJ: fsqrt.s t1, t2, rmm
115 # CHECK-ASM: encoding: [0x53,0xc3,0x03,0x58]
117 # CHECK-ASM-AND-OBJ: fcvt.w.s a0, s5, rup
118 # CHECK-ASM: encoding: [0x53,0xb5,0x0a,0xc0]
120 # CHECK-ASM-AND-OBJ: fcvt.wu.s a1, s6, rdn
121 # CHECK-ASM: encoding: [0xd3,0x25,0x1b,0xc0]
122 fcvt.wu.s a1
, s6
, rdn
123 # CHECK-ASM-AND-OBJ: fcvt.s.w t6, a4, rtz
124 # CHECK-ASM: encoding: [0xd3,0x1f,0x07,0xd0]
126 # CHECK-ASM-AND-OBJ: fcvt.s.wu s0, a5, rne
127 # CHECK-ASM: encoding: [0x53,0x84,0x17,0xd0]
128 fcvt.s.wu s0
, a5
, rne