xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/64.avx512_vnni.s (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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 * 64-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
29.text
30.align 16
31.globl libdis_test
32.type libdis_test, @function
33libdis_test:
34	/*
35	 * vpdpbusd	%xmm0, %xmm1, %xmm2
36	 * vpdpbusd	%ymm3, %ymm4, %ymm5
37	 * vpdpbusd	%zmm6, %zmm7, %zmm8
38	 * vpdpbusd	%xmm9, %xmm10, %xmm11{%k1}
39	 * vpdpbusd	%xmm12, %xmm13, %xmm14{%k2}{z}
40	 * vpdpbusd	%ymm15, %ymm16, %ymm17{%k3}
41	 * vpdpbusd	%ymm18, %ymm19, %ymm20{%k4}{z}
42	 * vpdpbusd	%zmm21, %zmm22, %zmm23{%k5}
43	 * vpdpbusd	%zmm24, %zmm25, %zmm26{%k6}{z}
44	 * vpdpbusd	0x64(%rax), %zmm27, %zmm28
45	 * vpdpbusd	0x123456(%rbx, %rcx, 8), %zmm29, %zmm30
46	 */
47
48	.byte	0x62, 0xf2, 0x75, 0x08, 0x50, 0xd0
49	.byte	0x62, 0xf2, 0x5d, 0x28, 0x50, 0xeb
50	.byte	0x62, 0x72, 0x45, 0x48, 0x50, 0xc6
51	.byte	0x62, 0x52, 0x2d, 0x09, 0x50, 0xd9
52	.byte	0x62, 0x52, 0x15, 0x8a, 0x50, 0xf4
53	.byte	0x62, 0xc2, 0x7d, 0x23, 0x50, 0xcf
54	.byte	0x62, 0xa2, 0x65, 0xa4, 0x50, 0xe2
55	.byte	0x62, 0xa2, 0x4d, 0x45, 0x50, 0xfd
56	.byte	0x62, 0x02, 0x35, 0xc6, 0x50, 0xd0
57	.byte	0x62, 0x62, 0x25, 0x40, 0x50, 0xa0, 0x64, 0x00, 0x00, 0x00
58	.byte	0x62, 0x62, 0x15, 0x40, 0x50, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
59
60	/*
61	 * vpdpbusds	%xmm0, %xmm1, %xmm2
62	 * vpdpbusds	%ymm3, %ymm4, %ymm5
63	 * vpdpbusds	%zmm6, %zmm7, %zmm8
64	 * vpdpbusds	%xmm9, %xmm10, %xmm11{%k1}
65	 * vpdpbusds	%xmm12, %xmm13, %xmm14{%k2}{z}
66	 * vpdpbusds	%ymm15, %ymm16, %ymm17{%k3}
67	 * vpdpbusds	%ymm18, %ymm19, %ymm20{%k4}{z}
68	 * vpdpbusds	%zmm21, %zmm22, %zmm23{%k5}
69	 * vpdpbusds	%zmm24, %zmm25, %zmm26{%k6}{z}
70	 * vpdpbusds	0x64(%rax), %zmm27, %zmm28
71	 * vpdpbusds	0x123456(%rbx, %rcx, 8), %zmm29, %zmm30
72	 */
73
74	.byte	0x62, 0xf2, 0x75, 0x08, 0x51, 0xd0
75	.byte	0x62, 0xf2, 0x5d, 0x28, 0x51, 0xeb
76	.byte	0x62, 0x72, 0x45, 0x48, 0x51, 0xc6
77	.byte	0x62, 0x52, 0x2d, 0x09, 0x51, 0xd9
78	.byte	0x62, 0x52, 0x15, 0x8a, 0x51, 0xf4
79	.byte	0x62, 0xc2, 0x7d, 0x23, 0x51, 0xcf
80	.byte	0x62, 0xa2, 0x65, 0xa4, 0x51, 0xe2
81	.byte	0x62, 0xa2, 0x4d, 0x45, 0x51, 0xfd
82	.byte	0x62, 0x02, 0x35, 0xc6, 0x51, 0xd0
83	.byte	0x62, 0x62, 0x25, 0x40, 0x51, 0xa0, 0x64, 0x00, 0x00, 0x00
84	.byte	0x62, 0x62, 0x15, 0x40, 0x51, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
85
86	/*
87	 * vpdpwssd	%xmm0, %xmm1, %xmm2
88	 * vpdpwssd	%ymm3, %ymm4, %ymm5
89	 * vpdpwssd	%zmm6, %zmm7, %zmm8
90	 * vpdpwssd	%xmm9, %xmm10, %xmm11{%k1}
91	 * vpdpwssd	%xmm12, %xmm13, %xmm14{%k2}{z}
92	 * vpdpwssd	%ymm15, %ymm16, %ymm17{%k3}
93	 * vpdpwssd	%ymm18, %ymm19, %ymm20{%k4}{z}
94	 * vpdpwssd	%zmm21, %zmm22, %zmm23{%k5}
95	 * vpdpwssd	%zmm24, %zmm25, %zmm26{%k6}{z}
96	 * vpdpwssd	0x64(%rax), %zmm27, %zmm28
97	 * vpdpwssd	0x123456(%rbx, %rcx, 8), %zmm29, %zmm30
98	 */
99
100	.byte	0x62, 0xf2, 0x75, 0x08, 0x52, 0xd0
101	.byte	0x62, 0xf2, 0x5d, 0x28, 0x52, 0xeb
102	.byte	0x62, 0x72, 0x45, 0x48, 0x52, 0xc6
103	.byte	0x62, 0x52, 0x2d, 0x09, 0x52, 0xd9
104	.byte	0x62, 0x52, 0x15, 0x8a, 0x52, 0xf4
105	.byte	0x62, 0xc2, 0x7d, 0x23, 0x52, 0xcf
106	.byte	0x62, 0xa2, 0x65, 0xa4, 0x52, 0xe2
107	.byte	0x62, 0xa2, 0x4d, 0x45, 0x52, 0xfd
108	.byte	0x62, 0x02, 0x35, 0xc6, 0x52, 0xd0
109	.byte	0x62, 0x62, 0x25, 0x40, 0x52, 0xa0, 0x64, 0x00, 0x00, 0x00
110	.byte	0x62, 0x62, 0x15, 0x40, 0x52, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
111
112	/*
113	 * vpdpwssds	%xmm0, %xmm1, %xmm2
114	 * vpdpwssds	%ymm3, %ymm4, %ymm5
115	 * vpdpwssds	%zmm6, %zmm7, %zmm8
116	 * vpdpwssds	%xmm9, %xmm10, %xmm11{%k1}
117	 * vpdpwssds	%xmm12, %xmm13, %xmm14{%k2}{z}
118	 * vpdpwssds	%ymm15, %ymm16, %ymm17{%k3}
119	 * vpdpwssds	%ymm18, %ymm19, %ymm20{%k4}{z}
120	 * vpdpwssds	%zmm21, %zmm22, %zmm23{%k5}
121	 * vpdpwssds	%zmm24, %zmm25, %zmm26{%k6}{z}
122	 * vpdpwssds	0x64(%rax), %zmm27, %zmm28
123	 * vpdpwssds	0x123456(%rbx, %rcx, 8), %zmm29, %zmm30
124	 */
125
126	.byte	0x62, 0xf2, 0x75, 0x08, 0x53, 0xd0
127	.byte	0x62, 0xf2, 0x5d, 0x28, 0x53, 0xeb
128	.byte	0x62, 0x72, 0x45, 0x48, 0x53, 0xc6
129	.byte	0x62, 0x52, 0x2d, 0x09, 0x53, 0xd9
130	.byte	0x62, 0x52, 0x15, 0x8a, 0x53, 0xf4
131	.byte	0x62, 0xc2, 0x7d, 0x23, 0x53, 0xcf
132	.byte	0x62, 0xa2, 0x65, 0xa4, 0x53, 0xe2
133	.byte	0x62, 0xa2, 0x4d, 0x45, 0x53, 0xfd
134	.byte	0x62, 0x02, 0x35, 0xc6, 0x53, 0xd0
135	.byte	0x62, 0x62, 0x25, 0x40, 0x53, 0xa0, 0x64, 0x00, 0x00, 0x00
136	.byte	0x62, 0x62, 0x15, 0x40, 0x53, 0xb4, 0xcb, 0x56, 0x34, 0x12, 0x00
137.size libdis_test, [.-libdis_test]
138