xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/64.gfni.s (revision 78801af7286cd73dbc996d470f789e75993cf15d)
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 2020 Robert Mustacchi
14 */
15
16/*
17 * Test GFNI related instructions
18 */
19
20.text
21.align 16
22.globl libdis_test
23.type libdis_test, @function
24libdis_test:
25	/* SSE Form */
26	gf2p8affineinvqb	$0x23, %xmm0, %xmm1
27	gf2p8affineinvqb	$0x51, (%rax), %xmm2
28	gf2p8affineinvqb	$0x19, 0x12(%rbx), %xmm3
29	gf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %xmm4
30
31	gf2p8affineqb		$0x23, %xmm7, %xmm6
32	gf2p8affineqb		$0x51, (%rax), %xmm5
33	gf2p8affineqb		$0x19, 0x12(%rbx), %xmm4
34	gf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %xmm3
35
36	gf2p8mulb		%xmm2, %xmm3
37	gf2p8mulb		(%rax), %xmm4
38	gf2p8mulb		0x12(%rbx), %xmm3
39	gf2p8mulb		0x17(%r10, %r12, 4), %xmm2
40
41	/* VEX Form - xmm */
42	vgf2p8affineinvqb	$0x23, %xmm0, %xmm1, %xmm5
43	vgf2p8affineinvqb	$0x51, (%rax), %xmm2, %xmm6
44	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %xmm3, %xmm7
45	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %xmm4, %xmm0
46
47	vgf2p8affineqb		$0x23, %xmm7, %xmm6, %xmm0
48	vgf2p8affineqb		$0x51, (%rax), %xmm5, %xmm1
49	vgf2p8affineqb		$0x19, 0x12(%rbx), %xmm4, %xmm2
50	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %xmm3, %xmm6
51
52	vgf2p8mulb		%xmm2, %xmm3, %xmm0
53	vgf2p8mulb		(%rax), %xmm4, %xmm1
54	vgf2p8mulb		0x12(%rbx), %xmm3, %xmm2
55	vgf2p8mulb		0x17(%r10, %r12, 4), %xmm2, %xmm3
56
57	/* VEX Form - ymm */
58	vgf2p8affineinvqb	$0x23, %ymm0, %ymm1, %ymm5
59	vgf2p8affineinvqb	$0x51, (%rax), %ymm2, %ymm6
60	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %ymm3, %ymm7
61	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %ymm4, %ymm0
62
63	vgf2p8affineqb		$0x23, %ymm7, %ymm6, %ymm0
64	vgf2p8affineqb		$0x51, (%rax), %ymm5, %ymm1
65	vgf2p8affineqb		$0x19, 0x12(%rbx), %ymm4, %ymm2
66	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %ymm3, %ymm6
67
68	vgf2p8mulb		%ymm2, %ymm3, %ymm0
69	vgf2p8mulb		(%rax), %ymm4, %ymm1
70	vgf2p8mulb		0x12(%rbx), %ymm3, %ymm2
71	vgf2p8mulb		0x17(%r10, %r12, 4), %ymm2, %ymm3
72
73	/* EVEX Form - basic zmm */
74	vgf2p8affineinvqb	$0x23, %zmm0, %zmm1, %zmm5
75	vgf2p8affineinvqb	$0x51, (%rax), %zmm2, %zmm6
76	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %zmm3, %zmm7
77	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %zmm4, %zmm0
78
79	vgf2p8affineqb		$0x23, %zmm7, %zmm6, %zmm0
80	vgf2p8affineqb		$0x51, (%rax), %zmm5, %zmm1
81	vgf2p8affineqb		$0x19, 0x12(%rbx), %zmm4, %zmm2
82	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %zmm3, %zmm6
83
84	vgf2p8mulb		%zmm2, %zmm3, %zmm0
85	vgf2p8mulb		(%rax), %zmm4, %zmm1
86	vgf2p8mulb		0x12(%rbx), %zmm3, %zmm2
87	vgf2p8mulb		0x17(%r10, %r12, 4), %zmm2, %zmm3
88
89	/* EVEX Form - zmm, masks */
90	vgf2p8affineinvqb	$0x23, %zmm0, %zmm1, %zmm5{%k1}
91	vgf2p8affineinvqb	$0x23, %zmm0, %zmm1, %zmm5{%k2}{z}
92	vgf2p8affineinvqb	$0x51, (%rax), %zmm2, %zmm6{%k3}
93	vgf2p8affineinvqb	$0x51, (%rax), %zmm2, %zmm6{%k4}{z}
94	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %zmm3, %zmm7{%k5}
95	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %zmm3, %zmm7{%k6}{z}
96	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %zmm4, %zmm0{%k7}
97	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %zmm4, %zmm0{%k7}{z}
98
99	vgf2p8affineqb		$0x23, %zmm7, %zmm6, %zmm0{%k7}
100	vgf2p8affineqb		$0x23, %zmm7, %zmm6, %zmm0{%k6}{z}
101	vgf2p8affineqb		$0x51, (%rax), %zmm5, %zmm1{%k5}
102	vgf2p8affineqb		$0x51, (%rax), %zmm5, %zmm1{%k4}{z}
103	vgf2p8affineqb		$0x19, 0x12(%rbx), %zmm4, %zmm2{%k3}
104	vgf2p8affineqb		$0x19, 0x12(%rbx), %zmm4, %zmm2{%k2}{z}
105	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %zmm3, %zmm6{%k1}
106	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %zmm3, %zmm6{%k2}{z}
107
108	vgf2p8mulb		%zmm2, %zmm3, %zmm0{%k3}
109	vgf2p8mulb		%zmm2, %zmm3, %zmm0{%k2}{z}
110	vgf2p8mulb		(%rax), %zmm4, %zmm1{%k4}
111	vgf2p8mulb		(%rax), %zmm4, %zmm1{%k5}{z}
112	vgf2p8mulb		0x12(%rbx), %zmm3, %zmm2{%k1}
113	vgf2p8mulb		0x12(%rbx), %zmm3, %zmm2{%k2}{z}
114	vgf2p8mulb		0x17(%r10, %r12, 4), %zmm2, %zmm3{%k7}
115	vgf2p8mulb		0x17(%r10, %r12, 4), %zmm2, %zmm3{%k6}{z}
116
117	/* EVEX Form - ymm, masks */
118	vgf2p8affineinvqb	$0x23, %ymm0, %ymm1, %ymm5{%k1}
119	vgf2p8affineinvqb	$0x23, %ymm0, %ymm1, %ymm5{%k2}{z}
120	vgf2p8affineinvqb	$0x51, (%rax), %ymm2, %ymm6{%k3}
121	vgf2p8affineinvqb	$0x51, (%rax), %ymm2, %ymm6{%k4}{z}
122	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %ymm3, %ymm7{%k5}
123	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %ymm3, %ymm7{%k6}{z}
124	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %ymm4, %ymm0{%k7}
125	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %ymm4, %ymm0{%k7}{z}
126
127	vgf2p8affineqb		$0x23, %ymm7, %ymm6, %ymm0{%k7}
128	vgf2p8affineqb		$0x23, %ymm7, %ymm6, %ymm0{%k6}{z}
129	vgf2p8affineqb		$0x51, (%rax), %ymm5, %ymm1{%k5}
130	vgf2p8affineqb		$0x51, (%rax), %ymm5, %ymm1{%k4}{z}
131	vgf2p8affineqb		$0x19, 0x12(%rbx), %ymm4, %ymm2{%k3}
132	vgf2p8affineqb		$0x19, 0x12(%rbx), %ymm4, %ymm2{%k2}{z}
133	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %ymm3, %ymm6{%k1}
134	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %ymm3, %ymm6{%k2}{z}
135
136	vgf2p8mulb		%ymm2, %ymm3, %ymm0{%k3}
137	vgf2p8mulb		%ymm2, %ymm3, %ymm0{%k2}{z}
138	vgf2p8mulb		(%rax), %ymm4, %ymm1{%k4}
139	vgf2p8mulb		(%rax), %ymm4, %ymm1{%k5}{z}
140	vgf2p8mulb		0x12(%rbx), %ymm3, %ymm2{%k1}
141	vgf2p8mulb		0x12(%rbx), %ymm3, %ymm2{%k2}{z}
142	vgf2p8mulb		0x17(%r10, %r12, 4), %ymm2, %ymm3{%k7}
143	vgf2p8mulb		0x17(%r10, %r12, 4), %ymm2, %ymm3{%k6}{z}
144
145	/* EVEX Form - ymm, masks */
146	vgf2p8affineinvqb	$0x23, %xmm0, %xmm1, %xmm5{%k1}
147	vgf2p8affineinvqb	$0x23, %xmm0, %xmm1, %xmm5{%k2}{z}
148	vgf2p8affineinvqb	$0x51, (%rax), %xmm2, %xmm6{%k3}
149	vgf2p8affineinvqb	$0x51, (%rax), %xmm2, %xmm6{%k4}{z}
150	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %xmm3, %xmm7{%k5}
151	vgf2p8affineinvqb	$0x19, 0x12(%rbx), %xmm3, %xmm7{%k6}{z}
152	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %xmm4, %xmm0{%k7}
153	vgf2p8affineinvqb	$0x77, 0x12(%r10, %r12, 4), %xmm4, %xmm0{%k7}{z}
154
155	vgf2p8affineqb		$0x23, %xmm7, %xmm6, %xmm0{%k7}
156	vgf2p8affineqb		$0x23, %xmm7, %xmm6, %xmm0{%k6}{z}
157	vgf2p8affineqb		$0x51, (%rax), %xmm5, %xmm1{%k5}
158	vgf2p8affineqb		$0x51, (%rax), %xmm5, %xmm1{%k4}{z}
159	vgf2p8affineqb		$0x19, 0x12(%rbx), %xmm4, %xmm2{%k3}
160	vgf2p8affineqb		$0x19, 0x12(%rbx), %xmm4, %xmm2{%k2}{z}
161	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %xmm3, %xmm6{%k1}
162	vgf2p8affineqb		$0x77, 0x12(%r10, %r12, 4), %xmm3, %xmm6{%k2}{z}
163
164	vgf2p8mulb		%xmm2, %xmm3, %xmm0{%k3}
165	vgf2p8mulb		%xmm2, %xmm3, %xmm0{%k2}{z}
166	vgf2p8mulb		(%rax), %xmm4, %xmm1{%k4}
167	vgf2p8mulb		(%rax), %xmm4, %xmm1{%k5}{z}
168	vgf2p8mulb		0x12(%rbx), %xmm3, %xmm2{%k1}
169	vgf2p8mulb		0x12(%rbx), %xmm3, %xmm2{%k2}{z}
170	vgf2p8mulb		0x17(%r10, %r12, 4), %xmm2, %xmm3{%k7}
171	vgf2p8mulb		0x17(%r10, %r12, 4), %xmm2, %xmm3{%k6}{z}
172.size libdis_test, [.-libdis_test]
173