xref: /illumos-gate/usr/src/test/util-tests/tests/dis/risc-v/tst.rv32a.s (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
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 RV32A instructions. Instructions are ordered per the
18 * ISA manual.
19 */
20
21.text
22.align 16
23.globl libdis_test
24.type libdis_test, @function
25libdis_test:
26	lr.w		s0, (s1)
27	lr.w.aq		s1, (s2)
28	lr.w.rl		s2, (s3)
29	lr.w.aqrl	s3, (s4)
30	sc.w		s0, s2, (s1)
31	sc.w.aq		s1, s3, (s1)
32	sc.w.rl		s2, s4, (s1)
33	sc.w.aqrl	s3, s5, (s1)
34	amoswap.w	t0, t1, (t2)
35	amoswap.w.aq	t1, t2, (t3)
36	amoswap.w.rl	t2, t3, (t4)
37	amoswap.w.aqrl	t3, t4, (t5)
38	amoadd.w	t0, t1, (t2)
39	amoadd.w.aq	t1, t2, (t3)
40	amoadd.w.rl	t2, t3, (t4)
41	amoadd.w.aqrl	t3, t4, (t5)
42	amoxor.w	t0, t1, (t2)
43	amoxor.w.aq	t1, t2, (t3)
44	amoxor.w.rl	t2, t3, (t4)
45	amoxor.w.aqrl	t3, t4, (t5)
46	amoand.w	t0, t1, (t2)
47	amoand.w.aq	t1, t2, (t3)
48	amoand.w.rl	t2, t3, (t4)
49	amoand.w.aqrl	t3, t4, (t5)
50	amoor.w		t0, t1, (t2)
51	amoor.w.aq	t1, t2, (t3)
52	amoor.w.rl	t2, t3, (t4)
53	amoor.w.aqrl	t3, t4, (t5)
54	amomin.w	t0, t1, (t2)
55	amomin.w.aq	t1, t2, (t3)
56	amomin.w.rl	t2, t3, (t4)
57	amomin.w.aqrl	t3, t4, (t5)
58	amomax.w	t0, t1, (t2)
59	amomax.w.aq	t1, t2, (t3)
60	amomax.w.rl	t2, t3, (t4)
61	amomax.w.aqrl	t3, t4, (t5)
62	amominu.w	t0, t1, (t2)
63	amominu.w.aq	t1, t2, (t3)
64	amominu.w.rl	t2, t3, (t4)
65	amominu.w.aqrl	t3, t4, (t5)
66	amomaxu.w	t0, t1, (t2)
67	amomaxu.w.aq	t1, t2, (t3)
68	amomaxu.w.rl	t2, t3, (t4)
69	amomaxu.w.aqrl	t3, t4, (t5)
70.size libdis_test, [.-libdis_test]
71