xref: /illumos-gate/usr/src/test/util-tests/tests/dis/i386/64.avx2.s (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
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	(%rax), %ymm0
26	vextracti128	$0x23, %ymm3, %xmm4
27	vextracti128	$0x23, %ymm3, (%rbx)
28	vinserti128	$0x42, %xmm2, %ymm3, %ymm4
29	vinserti128	$0x42, (%rax), %ymm3, %ymm4
30	vmovntdqa	(%rax), %ymm0
31	vpblendd	$0x42, %xmm2, %xmm3, %xmm4
32	vpblendd	$0x42, (%rax), %xmm3, %xmm4
33	vpblendd	$0x42, %ymm2, %ymm3, %ymm4
34	vpblendd	$0x42, (%rax), %ymm3, %ymm4
35	vpbroadcastb	%xmm0, %xmm1
36	vpbroadcastb	(%rax), %xmm2
37	vpbroadcastb	%xmm0, %ymm1
38	vpbroadcastb	(%rax), %ymm2
39	vpbroadcastd	%xmm0, %xmm1
40	vpbroadcastd	(%rax), %xmm2
41	vpbroadcastd	%xmm0, %ymm1
42	vpbroadcastd	(%rax), %ymm2
43	vpbroadcastq	%xmm0, %xmm1
44	vpbroadcastq	(%rax), %xmm2
45	vpbroadcastq	%xmm0, %ymm1
46	vpbroadcastq	(%rax), %ymm2
47	vpbroadcastw	%xmm0, %xmm1
48	vpbroadcastw	(%rax), %xmm2
49	vpbroadcastw	%xmm0, %ymm1
50	vpbroadcastw	(%rax), %ymm2
51	vperm2i128	$0x42, %ymm2, %ymm3, %ymm4
52	vperm2i128	$0x42, (%rax), %ymm3, %ymm4
53	vpermd		%ymm2, %ymm3, %ymm4
54	vpermd		(%rax), %ymm3, %ymm4
55	vpermpd		$0x42, %ymm2, %ymm3
56	vpermpd		$0x42, (%rax), %ymm3
57	vpermps		%ymm1, %ymm2, %ymm3
58	vpermps		(%rax), %ymm2, %ymm3
59	vpermq		$0x42, %ymm2, %ymm3
60	vpermq		$0x42, (%rax), %ymm3
61	vpmaskmovd	(%rax), %ymm2, %ymm3
62	vpmaskmovq	(%rax), %xmm2, %xmm3
63	vpmaskmovq	(%rax), %ymm2, %ymm3
64	vpsllvd		%xmm1, %xmm2, %xmm3
65	vpsllvd		(%rax), %xmm2, %xmm3
66	vpsllvd		%ymm1, %ymm2, %ymm3
67	vpsllvd		(%rax), %ymm2, %ymm3
68	vpsllvq		%xmm1, %xmm2, %xmm3
69	vpsllvq		(%rax), %xmm2, %xmm3
70	vpsllvq		%ymm1, %ymm2, %ymm3
71	vpsllvq		(%rax), %ymm2, %ymm3
72	vpsravd		%xmm1, %xmm2, %xmm3
73	vpsravd		(%rax), %xmm2, %xmm3
74	vpsravd		%ymm1, %ymm2, %ymm3
75	vpsravd		(%rax), %ymm2, %ymm3
76	vpsrlvd		%xmm1, %xmm2, %xmm3
77	vpsrlvd		(%rax), %xmm2, %xmm3
78	vpsrlvd		%ymm1, %ymm2, %ymm3
79	vpsrlvd		(%rax), %ymm2, %ymm3
80	vpsrlvq		%xmm1, %xmm2, %xmm3
81	vpsrlvq		(%rax), %xmm2, %xmm3
82	vpsrlvq		%ymm1, %ymm2, %ymm3
83	vpsrlvq		(%rax), %ymm2, %ymm3
84.size libdis_test, [.-libdis_test]
85