xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/32.avx2.s (revision 069e6b7e31ba5dcbc5441b98af272714d9a5455c)
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 2016 Joyent, Inc.
14 */
15
16/*
17 * Test AVX2 related instructions
18 */
19
20.text
21.align 16
22.globl libdis_test
23.type libdis_test, @function
24libdis_test:
25	vbroadcasti128	(%eax), %ymm0
26	vextracti128	$0x23, %ymm3, %xmm4
27	vextracti128	$0x23, %ymm3, (%ebx)
28	vinserti128	$0x42, %xmm2, %ymm3, %ymm4
29	vinserti128	$0x42, (%eax), %ymm3, %ymm4
30	vmovntdqa	(%eax), %ymm0
31	vpblendd	$0x42, %xmm2, %xmm3, %xmm4
32	vpblendd	$0x42, (%eax), %xmm3, %xmm4
33	vpblendd	$0x42, %ymm2, %ymm3, %ymm4
34	vpblendd	$0x42, (%eax), %ymm3, %ymm4
35	vpbroadcastb	%xmm0, %xmm1
36	vpbroadcastb	(%eax), %xmm2
37	vpbroadcastb	%xmm0, %ymm1
38	vpbroadcastb	(%eax), %ymm2
39	vpbroadcastd	%xmm0, %xmm1
40	vpbroadcastd	(%eax), %xmm2
41	vpbroadcastd	%xmm0, %ymm1
42	vpbroadcastd	(%eax), %ymm2
43	vpbroadcastq	%xmm0, %xmm1
44	vpbroadcastq	(%eax), %xmm2
45	vpbroadcastq	%xmm0, %ymm1
46	vpbroadcastq	(%eax), %ymm2
47	vpbroadcastw	%xmm0, %xmm1
48	vpbroadcastw	(%eax), %xmm2
49	vpbroadcastw	%xmm0, %ymm1
50	vpbroadcastw	(%eax), %ymm2
51	vperm2i128	$0x42, %ymm2, %ymm3, %ymm4
52	vperm2i128	$0x42, (%eax), %ymm3, %ymm4
53	vpermd		%ymm2, %ymm3, %ymm4
54	vpermd		(%eax), %ymm3, %ymm4
55	vpermpd		$0x42, %ymm2, %ymm3
56	vpermpd		$0x42, (%eax), %ymm3
57	vpermps		%ymm1, %ymm2, %ymm3
58	vpermps		(%eax), %ymm2, %ymm3
59	vpermq		$0x42, %ymm2, %ymm3
60	vpermq		$0x42, (%eax), %ymm3
61	vpmaskmovd	(%eax), %ymm2, %ymm3
62	vpmaskmovq	(%eax), %xmm2, %xmm3
63	vpmaskmovq	(%eax), %ymm2, %ymm3
64	vpsllvd		%xmm1, %xmm2, %xmm3
65	vpsllvd		(%eax), %xmm2, %xmm3
66	vpsllvd		%ymm1, %ymm2, %ymm3
67	vpsllvd		(%eax), %ymm2, %ymm3
68	vpsllvq		%xmm1, %xmm2, %xmm3
69	vpsllvq		(%eax), %xmm2, %xmm3
70	vpsllvq		%ymm1, %ymm2, %ymm3
71	vpsllvq		(%eax), %ymm2, %ymm3
72	vpsravd		%xmm1, %xmm2, %xmm3
73	vpsravd		(%eax), %xmm2, %xmm3
74	vpsravd		%ymm1, %ymm2, %ymm3
75	vpsravd		(%eax), %ymm2, %ymm3
76	vpsrlvd		%xmm1, %xmm2, %xmm3
77	vpsrlvd		(%eax), %xmm2, %xmm3
78	vpsrlvd		%ymm1, %ymm2, %ymm3
79	vpsrlvd		(%eax), %ymm2, %ymm3
80	vpsrlvq		%xmm1, %xmm2, %xmm3
81	vpsrlvq		(%eax), %xmm2, %xmm3
82	vpsrlvq		%ymm1, %ymm2, %ymm3
83	vpsrlvq		(%eax), %ymm2, %ymm3
84.size libdis_test, [.-libdis_test]
85