xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/32.avx512_vnni.s (revision b1e2e3fb17324e9ddf43db264a0c64da7756d9e6)
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 2019, Joyent, Inc.
14 */
15
16/*
17 * 32-bit AVX-512 VNNI instruction disassembly.
18 *
19 * The support for VNNI instructions in gas is not present in the commonly used
20 * versions of gas in illumos (it's not present in 2.26.1 or older). Support is
21 * present in at least 2.30 (though maybe earlier). Rather than have the test
22 * suite force a version upgrade, we instead encode each instruction as the
23 * corresponding series of .byte expressions. Each .byte line follows a group of
24 * commented out assembly instructions and has a one to one mapping between
25 * them.
26 */
27
28.text
29.align 16
30.globl libdis_test
31.type libdis_test, @function
32libdis_test:
33	/*
34	 * vpdpbusd	%xmm0, %xmm1, %xmm2
35	 * vpdpbusd	%ymm3, %ymm4, %ymm5
36	 * vpdpbusd	%zmm6, %zmm7, %zmm0
37	 * vpdpbusd	%xmm1, %xmm2, %xmm3{%k1}
38	 * vpdpbusd	%xmm4, %xmm5, %xmm6{%k2}{z}
39	 * vpdpbusd	%ymm7, %ymm0, %ymm1{%k3}
40	 * vpdpbusd	%ymm2, %ymm3, %ymm4{%k4}{z}
41	 * vpdpbusd	%zmm5, %zmm6, %zmm7{%k5}
42	 * vpdpbusd	%zmm0, %zmm1, %zmm2{%k6}{z}
43	 * vpdpbusd	0x64(%eax), %zmm3, %zmm4
44	 * vpdpbusd	0x123456(%ebx, %ecx, 8), %zmm5, %zmm6
45	 */
46
47	.byte	0x62, 0xf2, 0x75, 0x08, 0x50, 0xd0
48	.byte	0x62, 0xf2, 0x5d, 0x28, 0x50, 0xeb
49	.byte	0x62, 0xf2, 0x45, 0x48, 0x50, 0xc6
50	.byte	0x62, 0xf2, 0x6d, 0x09, 0x50, 0xd9
51	.byte	0x62, 0xf2, 0x55, 0x8a, 0x50, 0xf4
52	.byte	0x62, 0xf2, 0x7d, 0x2b, 0x50, 0xcf
53	.byte	0x62, 0xf2, 0x65, 0xac, 0x50, 0xe2
54	.byte	0x62, 0xf2, 0x4d, 0x4d, 0x50, 0xfd
55	.byte	0x62, 0xf2, 0x75, 0xce, 0x50, 0xd0
56	.byte	0x62, 0xf2, 0x65, 0x48, 0x50, 0xa0, 0x64, 0x00, 0x00, 0x00
57	.byte	0x62, 0xf2, 0x55, 0x48, 0x50, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
58
59
60	/*
61	 * vpdpbusds	%xmm0, %xmm1, %xmm2
62	 * vpdpbusds	%ymm3, %ymm4, %ymm5
63	 * vpdpbusds	%zmm6, %zmm7, %zmm0
64	 * vpdpbusds	%xmm1, %xmm2, %xmm3{%k1}
65	 * vpdpbusds	%xmm4, %xmm5, %xmm6{%k2}{z}
66	 * vpdpbusds	%ymm7, %ymm0, %ymm1{%k3}
67	 * vpdpbusds	%ymm2, %ymm3, %ymm4{%k4}{z}
68	 * vpdpbusds	%zmm5, %zmm6, %zmm7{%k5}
69	 * vpdpbusds	%zmm0, %zmm1, %zmm2{%k6}{z}
70	 * vpdpbusds	0x64(%eax), %zmm3, %zmm4
71	 * vpdpbusds	0x123456(%ebx, %ecx, 8), %zmm5, %zmm6
72	 */
73
74	.byte	0x62, 0xf2, 0x75, 0x08, 0x51, 0xd0
75	.byte	0x62, 0xf2, 0x5d, 0x28, 0x51, 0xeb
76	.byte	0x62, 0xf2, 0x45, 0x48, 0x51, 0xc6
77	.byte	0x62, 0xf2, 0x6d, 0x09, 0x51, 0xd9
78	.byte	0x62, 0xf2, 0x55, 0x8a, 0x51, 0xf4
79	.byte	0x62, 0xf2, 0x7d, 0x2b, 0x51, 0xcf
80	.byte	0x62, 0xf2, 0x65, 0xac, 0x51, 0xe2
81	.byte	0x62, 0xf2, 0x4d, 0x4d, 0x51, 0xfd
82	.byte	0x62, 0xf2, 0x75, 0xce, 0x51, 0xd0
83	.byte	0x62, 0xf2, 0x65, 0x48, 0x51, 0xa0, 0x64, 0x00, 0x00, 0x00
84	.byte	0x62, 0xf2, 0x55, 0x48, 0x51, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
85
86	/*
87	 * vpdpwssd	%xmm0, %xmm1, %xmm2
88	 * vpdpwssd	%ymm3, %ymm4, %ymm5
89	 * vpdpwssd	%zmm6, %zmm7, %zmm0
90	 * vpdpwssd	%xmm1, %xmm2, %xmm3{%k1}
91	 * vpdpwssd	%xmm4, %xmm5, %xmm6{%k2}{z}
92	 * vpdpwssd	%ymm7, %ymm0, %ymm1{%k3}
93	 * vpdpwssd	%ymm2, %ymm3, %ymm4{%k4}{z}
94	 * vpdpwssd	%zmm5, %zmm6, %zmm7{%k5}
95	 * vpdpwssd	%zmm0, %zmm1, %zmm2{%k6}{z}
96	 * vpdpwssd	0x64(%eax), %zmm3, %zmm4
97	 * vpdpwssd	0x123456(%ebx, %ecx, 8), %zmm5, %zmm6
98	 */
99
100	.byte	0x62, 0xf2, 0x75, 0x08, 0x52, 0xd0
101	.byte	0x62, 0xf2, 0x5d, 0x28, 0x52, 0xeb
102	.byte	0x62, 0xf2, 0x45, 0x48, 0x52, 0xc6
103	.byte	0x62, 0xf2, 0x6d, 0x09, 0x52, 0xd9
104	.byte	0x62, 0xf2, 0x55, 0x8a, 0x52, 0xf4
105	.byte	0x62, 0xf2, 0x7d, 0x2b, 0x52, 0xcf
106	.byte	0x62, 0xf2, 0x65, 0xac, 0x52, 0xe2
107	.byte	0x62, 0xf2, 0x4d, 0x4d, 0x52, 0xfd
108	.byte	0x62, 0xf2, 0x75, 0xce, 0x52, 0xd0
109	.byte	0x62, 0xf2, 0x65, 0x48, 0x52, 0xa0, 0x64, 0x00, 0x00, 0x00
110	.byte	0x62, 0xf2, 0x55, 0x48, 0x52, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
111
112	/*
113	 * vpdpwssds	%xmm0, %xmm1, %xmm2
114	 * vpdpwssds	%ymm3, %ymm4, %ymm5
115	 * vpdpwssds	%zmm6, %zmm7, %zmm0
116	 * vpdpwssds	%xmm1, %xmm2, %xmm3{%k1}
117	 * vpdpwssds	%xmm4, %xmm5, %xmm6{%k2}{z}
118	 * vpdpwssds	%ymm7, %ymm0, %ymm1{%k3}
119	 * vpdpwssds	%ymm2, %ymm3, %ymm4{%k4}{z}
120	 * vpdpwssds	%zmm5, %zmm6, %zmm7{%k5}
121	 * vpdpwssds	%zmm0, %zmm1, %zmm2{%k6}{z}
122	 * vpdpwssds	0x64(%eax), %zmm3, %zmm4
123	 * vpdpwssds	0x123456(%ebx, %ecx, 8), %zmm5, %zmm6
124	 */
125
126	.byte	0x62, 0xf2, 0x75, 0x08, 0x53, 0xd0
127	.byte	0x62, 0xf2, 0x5d, 0x28, 0x53, 0xeb
128	.byte	0x62, 0xf2, 0x45, 0x48, 0x53, 0xc6
129	.byte	0x62, 0xf2, 0x6d, 0x09, 0x53, 0xd9
130	.byte	0x62, 0xf2, 0x55, 0x8a, 0x53, 0xf4
131	.byte	0x62, 0xf2, 0x7d, 0x2b, 0x53, 0xcf
132	.byte	0x62, 0xf2, 0x65, 0xac, 0x53, 0xe2
133	.byte	0x62, 0xf2, 0x4d, 0x4d, 0x53, 0xfd
134	.byte	0x62, 0xf2, 0x75, 0xce, 0x53, 0xd0
135	.byte	0x62, 0xf2, 0x65, 0x48, 0x53, 0xa0, 0x64, 0x00, 0x00, 0x00
136	.byte	0x62, 0xf2, 0x55, 0x48, 0x53, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
137.size libdis_test, [.-libdis_test]
138