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