xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/32.bitalg.s (revision 3863692f7043eea9677c6fc00e5ae1667b8ccb1b)
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 2024 Oxide Computer Company
14 */
15
16/*
17 * AVX512 bit algorithms (BITALG) and vpopcntdq.
18 */
19
20.text
21.align 16
22.globl libdis_test
23.type libdis_test, @function
24libdis_test:
25	vpopcntb	%xmm0, %xmm7
26	vpopcntb	(%edi), %xmm7
27	vpopcntb	0x64(%edx), %xmm6
28	vpopcntb	0x64(%edi,%ebx,4), %xmm1
29	vpopcntb	%xmm4, %xmm5{%k2}
30	vpopcntb	%xmm6, %xmm7{%k3}{z}
31	vpopcntb	0x7777(%eax), %xmm7{%k4}
32	vpopcntb	0x6666(%eax), %xmm0{%k5}{z}
33
34	vpopcntb	%ymm0, %ymm7
35	vpopcntb	(%edi), %ymm7
36	vpopcntb	0x64(%edx), %ymm6
37	vpopcntb	0x64(%edi,%ebx,4), %ymm1
38	vpopcntb	%ymm4, %ymm5{%k2}
39	vpopcntb	%ymm6, %ymm7{%k3}{z}
40	vpopcntb	0x7777(%eax), %ymm7{%k4}
41	vpopcntb	0x6666(%eax), %ymm0{%k5}{z}
42
43	vpopcntb	%zmm0, %zmm7
44	vpopcntb	(%edi), %zmm7
45	vpopcntb	0x64(%edx), %zmm6
46	vpopcntb	0x64(%edi,%ebx,4), %zmm1
47	vpopcntb	%zmm4, %zmm5{%k2}
48	vpopcntb	%zmm6, %zmm7{%k3}{z}
49	vpopcntb	0x7777(%eax), %zmm7{%k4}
50	vpopcntb	0x6666(%eax), %zmm0{%k5}{z}
51
52	vpopcntw	%xmm0, %xmm7
53	vpopcntw	(%edi), %xmm7
54	vpopcntw	0x64(%edx), %xmm6
55	vpopcntw	0x64(%edi,%ebx,4), %xmm1
56	vpopcntw	%xmm4, %xmm5{%k2}
57	vpopcntw	%xmm6, %xmm7{%k3}{z}
58	vpopcntw	0x7777(%eax), %xmm7{%k4}
59	vpopcntw	0x6666(%eax), %xmm0{%k5}{z}
60
61	vpopcntw	%ymm0, %ymm7
62	vpopcntw	(%edi), %ymm7
63	vpopcntw	0x64(%edx), %ymm6
64	vpopcntw	0x64(%edi,%ebx,4), %ymm1
65	vpopcntw	%ymm4, %ymm5{%k2}
66	vpopcntw	%ymm6, %ymm7{%k3}{z}
67	vpopcntw	0x7777(%eax), %ymm7{%k4}
68	vpopcntw	0x6666(%eax), %ymm0{%k5}{z}
69
70	vpopcntw	%zmm0, %zmm7
71	vpopcntw	(%edi), %zmm7
72	vpopcntw	0x64(%edx), %zmm6
73	vpopcntw	0x64(%edi,%ebx,4), %zmm1
74	vpopcntw	%zmm4, %zmm5{%k2}
75	vpopcntw	%zmm6, %zmm7{%k3}{z}
76	vpopcntw	0x7777(%eax), %zmm7{%k4}
77	vpopcntw	0x6666(%eax), %zmm0{%k5}{z}
78
79	vpopcntd	%xmm0, %xmm7
80	vpopcntd	(%edi), %xmm7
81	vpopcntd	0x64(%edx), %xmm6
82	vpopcntd	0x64(%edi,%ebx,4), %xmm1
83	vpopcntd	%xmm4, %xmm5{%k2}
84	vpopcntd	%xmm6, %xmm7{%k3}{z}
85	vpopcntd	0x7777(%eax), %xmm7{%k4}
86	vpopcntd	0x6666(%eax), %xmm0{%k5}{z}
87	vpopcntd	(%ecx){1to4}, %xmm7
88	vpopcntd	0x12345(%ecx){1to4}, %xmm7
89
90	vpopcntd	%ymm0, %ymm7
91	vpopcntd	(%edi), %ymm7
92	vpopcntd	0x64(%edx), %ymm6
93	vpopcntd	0x64(%edi,%ebx,4), %ymm1
94	vpopcntd	%ymm4, %ymm5{%k2}
95	vpopcntd	%ymm6, %ymm7{%k3}{z}
96	vpopcntd	0x7777(%eax), %ymm7{%k4}
97	vpopcntd	0x6666(%eax), %ymm0{%k5}{z}
98	vpopcntd	(%ecx){1to8}, %ymm7
99	vpopcntd	0x54321(%ecx){1to8}, %ymm7
100
101	vpopcntd	%zmm0, %zmm7
102	vpopcntd	(%edi), %zmm7
103	vpopcntd	0x64(%edx), %zmm6
104	vpopcntd	0x64(%edi,%ebx,4), %zmm1
105	vpopcntd	%zmm4, %zmm5{%k2}
106	vpopcntd	%zmm6, %zmm7{%k3}{z}
107	vpopcntd	0x7777(%eax), %zmm7{%k4}
108	vpopcntd	0x6666(%eax), %zmm0{%k5}{z}
109	vpopcntd	(%ecx){1to16}, %zmm7
110	vpopcntd	0x34543(%ecx){1to16}, %zmm7
111
112	vpopcntq	%xmm0, %xmm7
113	vpopcntq	(%edi), %xmm7
114	vpopcntq	0x64(%edx), %xmm6
115	vpopcntq	0x64(%edi,%ebx,4), %xmm1
116	vpopcntq	%xmm4, %xmm5{%k2}
117	vpopcntq	%xmm6, %xmm7{%k3}{z}
118	vpopcntq	0x7777(%eax), %xmm7{%k4}
119	vpopcntq	0x6666(%eax), %xmm0{%k5}{z}
120	vpopcntq	(%ecx){1to2}, %xmm7
121	vpopcntq	0x12345(%ecx){1to2}, %xmm7
122
123	vpopcntq	%ymm0, %ymm7
124	vpopcntq	(%edi), %ymm7
125	vpopcntq	0x64(%edx), %ymm6
126	vpopcntq	0x64(%edi,%ebx,4), %ymm1
127	vpopcntq	%ymm4, %ymm5{%k2}
128	vpopcntq	%ymm6, %ymm7{%k3}{z}
129	vpopcntq	0x7777(%eax), %ymm7{%k4}
130	vpopcntq	0x6666(%eax), %ymm0{%k5}{z}
131	vpopcntq	(%ecx){1to4}, %ymm7
132	vpopcntq	0x54321(%ecx){1to4}, %ymm7
133
134	vpopcntq	%zmm0, %zmm7
135	vpopcntq	(%edi), %zmm7
136	vpopcntq	0x64(%edx), %zmm6
137	vpopcntq	0x64(%edi,%ebx,4), %zmm1
138	vpopcntq	%zmm4, %zmm5{%k2}
139	vpopcntq	%zmm6, %zmm7{%k3}{z}
140	vpopcntq	0x7777(%eax), %zmm7{%k4}
141	vpopcntq	0x6666(%eax), %zmm0{%k5}{z}
142	vpopcntq	(%ecx){1to8}, %zmm7
143	vpopcntq	0x34543(%ecx){1to8}, %zmm7
144
145	vpshufbitqmb	%xmm1, %xmm2, %k3
146	vpshufbitqmb	%xmm3, %xmm4, %k4{%k5}
147	vpshufbitqmb	(%edi), %xmm7, %k0
148	vpshufbitqmb	(%edi), %xmm7, %k0{%k1}
149	vpshufbitqmb	0x167(%edi), %xmm7, %k0
150	vpshufbitqmb	0x761(%edi), %xmm7, %k0{%k1}
151	vpshufbitqmb	0x167(%edi, %esi, 4), %xmm7, %k0
152	vpshufbitqmb	0x761(%edi, %edx, 8), %xmm7, %k0{%k1}
153
154	vpshufbitqmb	%ymm1, %ymm2, %k3
155	vpshufbitqmb	%ymm3, %ymm4, %k4{%k5}
156	vpshufbitqmb	(%edi), %ymm7, %k0
157	vpshufbitqmb	(%edi), %ymm7, %k0{%k1}
158	vpshufbitqmb	0x167(%edi), %ymm7, %k0
159	vpshufbitqmb	0x761(%edi), %ymm7, %k0{%k1}
160	vpshufbitqmb	0x167(%edi, %esi, 4), %ymm7, %k0
161	vpshufbitqmb	0x761(%edi, %edx, 8), %ymm7, %k0{%k1}
162
163	vpshufbitqmb	%zmm1, %zmm2, %k3
164	vpshufbitqmb	%zmm3, %zmm4, %k4{%k5}
165	vpshufbitqmb	(%edi), %zmm7, %k0
166	vpshufbitqmb	(%edi), %zmm7, %k0{%k1}
167	vpshufbitqmb	0x167(%edi), %zmm7, %k0
168	vpshufbitqmb	0x761(%edi), %zmm7, %k0{%k1}
169	vpshufbitqmb	0x167(%edi, %esi, 4), %zmm7, %k0
170	vpshufbitqmb	0x761(%edi, %edx, 8), %zmm7, %k0{%k1}
171.size libdis_test, [.-libdis_test]
172