xref: /illumos-gate/usr/src/test/util-tests/tests/dis/risc-v/tst.rv32d.s (revision 4db555a5389470c6f15aa8b50a38ca5d533d0641)
1/*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source.  A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12/*
13 * Copyright 2018, Joyent, Inc.
14 */
15
16/*
17 * Test our disassembly of the RV32D instructions. Instructions are ordered per
18 * the ISA manual.
19 */
20
21.text
22.align 16
23.globl libdis_test
24.type libdis_test, @function
25libdis_test:
26	fld		ft1, (s2)
27	fld		ft1, -0x4(s2)
28	fld		ft1, 0x42(s2)
29	fsd		ft1, (s2)
30	fsd		ft1, -0x4(s2)
31	fsd		ft1, 0x42(s2)
32
33	fmadd.d		ft1, ft2, ft3, ft4
34	fmadd.d		ft1, ft2, ft3, ft4, rne
35	fmadd.d		ft1, ft2, ft3, ft4, rtz
36	fmadd.d		ft1, ft2, ft3, ft4, rdn
37	fmadd.d		ft1, ft2, ft3, ft4, rup
38	fmadd.d		ft1, ft2, ft3, ft4, rmm
39
40	fmsub.d		ft1, ft2, ft3, ft4
41	fmsub.d		ft1, ft2, ft3, ft4, rne
42	fmsub.d		ft1, ft2, ft3, ft4, rtz
43	fmsub.d		ft1, ft2, ft3, ft4, rdn
44	fmsub.d		ft1, ft2, ft3, ft4, rup
45	fmsub.d		ft1, ft2, ft3, ft4, rmm
46
47	fnmsub.d	ft1, ft2, ft3, ft4
48	fnmsub.d	ft1, ft2, ft3, ft4, rne
49	fnmsub.d	ft1, ft2, ft3, ft4, rtz
50	fnmsub.d	ft1, ft2, ft3, ft4, rdn
51	fnmsub.d	ft1, ft2, ft3, ft4, rup
52	fnmsub.d	ft1, ft2, ft3, ft4, rmm
53
54	fnmadd.d	ft1, ft2, ft3, ft4
55	fnmadd.d	ft1, ft2, ft3, ft4, rne
56	fnmadd.d	ft1, ft2, ft3, ft4, rtz
57	fnmadd.d	ft1, ft2, ft3, ft4, rdn
58	fnmadd.d	ft1, ft2, ft3, ft4, rup
59	fnmadd.d	ft1, ft2, ft3, ft4, rmm
60
61	fadd.d		fs0, fs1, fs2
62	fadd.d		fs1, fs2, fs3, rne
63	fadd.d		fs2, fs3, fs4, rtz
64	fadd.d		fs3, fs4, fs5, rdn
65	fadd.d		fs4, fs5, fs6, rup
66	fadd.d		fs5, fs6, fs7, rmm
67
68	fsub.d		fs0, fs1, fs2
69	fsub.d		fs1, fs2, fs3, rne
70	fsub.d		fs2, fs3, fs4, rtz
71	fsub.d		fs3, fs4, fs5, rdn
72	fsub.d		fs4, fs5, fs6, rup
73	fsub.d		fs5, fs6, fs7, rmm
74
75	fmul.d		fs0, fs1, fs2
76	fmul.d		fs1, fs2, fs3, rne
77	fmul.d		fs2, fs3, fs4, rtz
78	fmul.d		fs3, fs4, fs5, rdn
79	fmul.d		fs4, fs5, fs6, rup
80	fmul.d		fs5, fs6, fs7, rmm
81
82	fdiv.d		fs0, fs1, fs2
83	fdiv.d		fs1, fs2, fs3, rne
84	fdiv.d		fs2, fs3, fs4, rtz
85	fdiv.d		fs3, fs4, fs5, rdn
86	fdiv.d		fs4, fs5, fs6, rup
87	fdiv.d		fs5, fs6, fs7, rmm
88
89	fsqrt.d		fs0, fs1
90	fsqrt.d		fs1, fs2, rne
91	fsqrt.d		fs2, fs3, rtz
92	fsqrt.d		fs3, fs4, rdn
93	fsqrt.d		fs4, fs5, rup
94	fsqrt.d		fs5, fs6, rmm
95
96	fsgnj.d		fa0, fa1, fa2
97	fsgnjn.d	fa0, fa1, fa2
98	fsgnjx.d	fa0, fa1, fa2
99	fmin.d		fa0, fa1, fa2
100	fmax.d		fa0, fa1, fa2
101
102	fcvt.s.d	fs0, fs1
103	fcvt.s.d	fs1, fs2, rne
104	fcvt.s.d	fs2, fs3, rtz
105	fcvt.s.d	fs3, fs4, rdn
106	fcvt.s.d	fs4, fs5, rup
107	fcvt.s.d	fs5, fs6, rmm
108
109	fcvt.d.s	fa0, fa1
110
111	feq.d		a0, ft8, ft7
112	flt.d		a1, ft8, ft7
113	fle.d		a2, ft8, ft7
114	fclass.d	a3, ft8
115
116	fcvt.w.d	t0, ft1
117	fcvt.w.d	t1, ft2, rne
118	fcvt.w.d	t2, ft3, rtz
119	fcvt.w.d	t3, ft4, rdn
120	fcvt.w.d	t4, ft5, rup
121	fcvt.w.d	t5, ft6, rmm
122
123	fcvt.wu.d	t0, ft1
124	fcvt.wu.d	t1, ft2, rne
125	fcvt.wu.d	t2, ft3, rtz
126	fcvt.wu.d	t3, ft4, rdn
127	fcvt.wu.d	t4, ft5, rup
128	fcvt.wu.d	t5, ft6, rmm
129
130	fcvt.d.w	ft1, t2
131	fcvt.d.wu	ft1, t2
132.size libdis_test, [.-libdis_test]
133