NASM 2.13rc18
[nasm.git] / test / avx512er.asm
blob2c6a12b463f218ccaf11fe18b0a98faaedeaefa3
1 ;Testname=avx512er; Arguments=-fbin -oavx512er.bin -O0 -DSRC; Files=stdout stderr avx512er.bin
2 ; AVX-512ER testcases from gas
3 ;------------------------
5 ; This file is taken from there
6 ; https://gnu.googlesource.com/binutils/+/master/gas/testsuite/gas/i386/x86-64-avx512er-intel.d
7 ; So the original author is "H.J. Lu" <hongjiu dot lu at intel dot com>
9 ; Jin Kyu Song converted it for the nasm testing suite using gas2nasm.py
11 %macro testcase 2
12 %ifdef BIN
13 db %1
14 %endif
15 %ifdef SRC
17 %endif
18 %endmacro
21 bits 64
23 testcase { 0x62, 0x02, 0x7d, 0x48, 0xc8, 0xf5 }, { vexp2ps zmm30,zmm29 }
24 testcase { 0x62, 0x02, 0x7d, 0x18, 0xc8, 0xf5 }, { vexp2ps zmm30,zmm29,{sae} }
25 testcase { 0x62, 0x62, 0x7d, 0x48, 0xc8, 0x31 }, { vexp2ps zmm30,ZWORD [rcx] }
26 testcase { 0x62, 0x22, 0x7d, 0x48, 0xc8, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vexp2ps zmm30,ZWORD [rax+r14*8+0x123] }
27 testcase { 0x62, 0x62, 0x7d, 0x58, 0xc8, 0x31 }, { vexp2ps zmm30,DWORD [rcx]{1to16} }
28 testcase { 0x62, 0x62, 0x7d, 0x48, 0xc8, 0x72, 0x7f }, { vexp2ps zmm30,ZWORD [rdx+0x1fc0] }
29 testcase { 0x62, 0x62, 0x7d, 0x48, 0xc8, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vexp2ps zmm30,ZWORD [rdx+0x2000] }
30 testcase { 0x62, 0x62, 0x7d, 0x48, 0xc8, 0x72, 0x80 }, { vexp2ps zmm30,ZWORD [rdx-0x2000] }
31 testcase { 0x62, 0x62, 0x7d, 0x48, 0xc8, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vexp2ps zmm30,ZWORD [rdx-0x2040] }
32 testcase { 0x62, 0x62, 0x7d, 0x58, 0xc8, 0x72, 0x7f }, { vexp2ps zmm30,DWORD [rdx+0x1fc]{1to16} }
33 testcase { 0x62, 0x62, 0x7d, 0x58, 0xc8, 0xb2, 0x00, 0x02, 0x00, 0x00 }, { vexp2ps zmm30,DWORD [rdx+0x200]{1to16} }
34 testcase { 0x62, 0x62, 0x7d, 0x58, 0xc8, 0x72, 0x80 }, { vexp2ps zmm30,DWORD [rdx-0x200]{1to16} }
35 testcase { 0x62, 0x62, 0x7d, 0x58, 0xc8, 0xb2, 0xfc, 0xfd, 0xff, 0xff }, { vexp2ps zmm30,DWORD [rdx-0x204]{1to16} }
36 testcase { 0x62, 0x02, 0xfd, 0x48, 0xc8, 0xf5 }, { vexp2pd zmm30,zmm29 }
37 testcase { 0x62, 0x02, 0xfd, 0x18, 0xc8, 0xf5 }, { vexp2pd zmm30,zmm29,{sae} }
38 testcase { 0x62, 0x62, 0xfd, 0x48, 0xc8, 0x31 }, { vexp2pd zmm30,ZWORD [rcx] }
39 testcase { 0x62, 0x22, 0xfd, 0x48, 0xc8, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vexp2pd zmm30,ZWORD [rax+r14*8+0x123] }
40 testcase { 0x62, 0x62, 0xfd, 0x58, 0xc8, 0x31 }, { vexp2pd zmm30,QWORD [rcx]{1to8} }
41 testcase { 0x62, 0x62, 0xfd, 0x48, 0xc8, 0x72, 0x7f }, { vexp2pd zmm30,ZWORD [rdx+0x1fc0] }
42 testcase { 0x62, 0x62, 0xfd, 0x48, 0xc8, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vexp2pd zmm30,ZWORD [rdx+0x2000] }
43 testcase { 0x62, 0x62, 0xfd, 0x48, 0xc8, 0x72, 0x80 }, { vexp2pd zmm30,ZWORD [rdx-0x2000] }
44 testcase { 0x62, 0x62, 0xfd, 0x48, 0xc8, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vexp2pd zmm30,ZWORD [rdx-0x2040] }
45 testcase { 0x62, 0x62, 0xfd, 0x58, 0xc8, 0x72, 0x7f }, { vexp2pd zmm30,QWORD [rdx+0x3f8]{1to8} }
46 testcase { 0x62, 0x62, 0xfd, 0x58, 0xc8, 0xb2, 0x00, 0x04, 0x00, 0x00 }, { vexp2pd zmm30,QWORD [rdx+0x400]{1to8} }
47 testcase { 0x62, 0x62, 0xfd, 0x58, 0xc8, 0x72, 0x80 }, { vexp2pd zmm30,QWORD [rdx-0x400]{1to8} }
48 testcase { 0x62, 0x62, 0xfd, 0x58, 0xc8, 0xb2, 0xf8, 0xfb, 0xff, 0xff }, { vexp2pd zmm30,QWORD [rdx-0x408]{1to8} }
49 testcase { 0x62, 0x02, 0x7d, 0x48, 0xca, 0xf5 }, { vrcp28ps zmm30,zmm29 }
50 testcase { 0x62, 0x02, 0x7d, 0x4f, 0xca, 0xf5 }, { vrcp28ps zmm30{k7},zmm29 }
51 testcase { 0x62, 0x02, 0x7d, 0xcf, 0xca, 0xf5 }, { vrcp28ps zmm30{k7}{z},zmm29 }
52 testcase { 0x62, 0x02, 0x7d, 0x18, 0xca, 0xf5 }, { vrcp28ps zmm30,zmm29,{sae} }
53 testcase { 0x62, 0x62, 0x7d, 0x48, 0xca, 0x31 }, { vrcp28ps zmm30,ZWORD [rcx] }
54 testcase { 0x62, 0x22, 0x7d, 0x48, 0xca, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrcp28ps zmm30,ZWORD [rax+r14*8+0x123] }
55 testcase { 0x62, 0x62, 0x7d, 0x58, 0xca, 0x31 }, { vrcp28ps zmm30,DWORD [rcx]{1to16} }
56 testcase { 0x62, 0x62, 0x7d, 0x48, 0xca, 0x72, 0x7f }, { vrcp28ps zmm30,ZWORD [rdx+0x1fc0] }
57 testcase { 0x62, 0x62, 0x7d, 0x48, 0xca, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vrcp28ps zmm30,ZWORD [rdx+0x2000] }
58 testcase { 0x62, 0x62, 0x7d, 0x48, 0xca, 0x72, 0x80 }, { vrcp28ps zmm30,ZWORD [rdx-0x2000] }
59 testcase { 0x62, 0x62, 0x7d, 0x48, 0xca, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vrcp28ps zmm30,ZWORD [rdx-0x2040] }
60 testcase { 0x62, 0x62, 0x7d, 0x58, 0xca, 0x72, 0x7f }, { vrcp28ps zmm30,DWORD [rdx+0x1fc]{1to16} }
61 testcase { 0x62, 0x62, 0x7d, 0x58, 0xca, 0xb2, 0x00, 0x02, 0x00, 0x00 }, { vrcp28ps zmm30,DWORD [rdx+0x200]{1to16} }
62 testcase { 0x62, 0x62, 0x7d, 0x58, 0xca, 0x72, 0x80 }, { vrcp28ps zmm30,DWORD [rdx-0x200]{1to16} }
63 testcase { 0x62, 0x62, 0x7d, 0x58, 0xca, 0xb2, 0xfc, 0xfd, 0xff, 0xff }, { vrcp28ps zmm30,DWORD [rdx-0x204]{1to16} }
64 testcase { 0x62, 0x02, 0xfd, 0x48, 0xca, 0xf5 }, { vrcp28pd zmm30,zmm29 }
65 testcase { 0x62, 0x02, 0xfd, 0x4f, 0xca, 0xf5 }, { vrcp28pd zmm30{k7},zmm29 }
66 testcase { 0x62, 0x02, 0xfd, 0xcf, 0xca, 0xf5 }, { vrcp28pd zmm30{k7}{z},zmm29 }
67 testcase { 0x62, 0x02, 0xfd, 0x18, 0xca, 0xf5 }, { vrcp28pd zmm30,zmm29,{sae} }
68 testcase { 0x62, 0x62, 0xfd, 0x48, 0xca, 0x31 }, { vrcp28pd zmm30,ZWORD [rcx] }
69 testcase { 0x62, 0x22, 0xfd, 0x48, 0xca, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrcp28pd zmm30,ZWORD [rax+r14*8+0x123] }
70 testcase { 0x62, 0x62, 0xfd, 0x58, 0xca, 0x31 }, { vrcp28pd zmm30,QWORD [rcx]{1to8} }
71 testcase { 0x62, 0x62, 0xfd, 0x48, 0xca, 0x72, 0x7f }, { vrcp28pd zmm30,ZWORD [rdx+0x1fc0] }
72 testcase { 0x62, 0x62, 0xfd, 0x48, 0xca, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vrcp28pd zmm30,ZWORD [rdx+0x2000] }
73 testcase { 0x62, 0x62, 0xfd, 0x48, 0xca, 0x72, 0x80 }, { vrcp28pd zmm30,ZWORD [rdx-0x2000] }
74 testcase { 0x62, 0x62, 0xfd, 0x48, 0xca, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vrcp28pd zmm30,ZWORD [rdx-0x2040] }
75 testcase { 0x62, 0x62, 0xfd, 0x58, 0xca, 0x72, 0x7f }, { vrcp28pd zmm30,QWORD [rdx+0x3f8]{1to8} }
76 testcase { 0x62, 0x62, 0xfd, 0x58, 0xca, 0xb2, 0x00, 0x04, 0x00, 0x00 }, { vrcp28pd zmm30,QWORD [rdx+0x400]{1to8} }
77 testcase { 0x62, 0x62, 0xfd, 0x58, 0xca, 0x72, 0x80 }, { vrcp28pd zmm30,QWORD [rdx-0x400]{1to8} }
78 testcase { 0x62, 0x62, 0xfd, 0x58, 0xca, 0xb2, 0xf8, 0xfb, 0xff, 0xff }, { vrcp28pd zmm30,QWORD [rdx-0x408]{1to8} }
79 testcase { 0x62, 0x02, 0x15, 0x07, 0xcb, 0xf4 }, { vrcp28ss xmm30{k7},xmm29,xmm28 }
80 testcase { 0x62, 0x02, 0x15, 0x87, 0xcb, 0xf4 }, { vrcp28ss xmm30{k7}{z},xmm29,xmm28 }
81 testcase { 0x62, 0x02, 0x15, 0x17, 0xcb, 0xf4 }, { vrcp28ss xmm30{k7},xmm29,xmm28,{sae} }
82 testcase { 0x62, 0x62, 0x15, 0x07, 0xcb, 0x31 }, { vrcp28ss xmm30{k7},xmm29,DWORD [rcx] }
83 testcase { 0x62, 0x22, 0x15, 0x07, 0xcb, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrcp28ss xmm30{k7},xmm29,DWORD [rax+r14*8+0x123] }
84 testcase { 0x62, 0x62, 0x15, 0x07, 0xcb, 0x72, 0x7f }, { vrcp28ss xmm30{k7},xmm29,DWORD [rdx+0x1fc] }
85 testcase { 0x62, 0x62, 0x15, 0x07, 0xcb, 0xb2, 0x00, 0x02, 0x00, 0x00 }, { vrcp28ss xmm30{k7},xmm29,DWORD [rdx+0x200] }
86 testcase { 0x62, 0x62, 0x15, 0x07, 0xcb, 0x72, 0x80 }, { vrcp28ss xmm30{k7},xmm29,DWORD [rdx-0x200] }
87 testcase { 0x62, 0x62, 0x15, 0x07, 0xcb, 0xb2, 0xfc, 0xfd, 0xff, 0xff }, { vrcp28ss xmm30{k7},xmm29,DWORD [rdx-0x204] }
88 testcase { 0x62, 0x02, 0x95, 0x07, 0xcb, 0xf4 }, { vrcp28sd xmm30{k7},xmm29,xmm28 }
89 testcase { 0x62, 0x02, 0x95, 0x87, 0xcb, 0xf4 }, { vrcp28sd xmm30{k7}{z},xmm29,xmm28 }
90 testcase { 0x62, 0x02, 0x95, 0x17, 0xcb, 0xf4 }, { vrcp28sd xmm30{k7},xmm29,xmm28,{sae} }
91 testcase { 0x62, 0x62, 0x95, 0x07, 0xcb, 0x31 }, { vrcp28sd xmm30{k7},xmm29,QWORD [rcx] }
92 testcase { 0x62, 0x22, 0x95, 0x07, 0xcb, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrcp28sd xmm30{k7},xmm29,QWORD [rax+r14*8+0x123] }
93 testcase { 0x62, 0x62, 0x95, 0x07, 0xcb, 0x72, 0x7f }, { vrcp28sd xmm30{k7},xmm29,QWORD [rdx+0x3f8] }
94 testcase { 0x62, 0x62, 0x95, 0x07, 0xcb, 0xb2, 0x00, 0x04, 0x00, 0x00 }, { vrcp28sd xmm30{k7},xmm29,QWORD [rdx+0x400] }
95 testcase { 0x62, 0x62, 0x95, 0x07, 0xcb, 0x72, 0x80 }, { vrcp28sd xmm30{k7},xmm29,QWORD [rdx-0x400] }
96 testcase { 0x62, 0x62, 0x95, 0x07, 0xcb, 0xb2, 0xf8, 0xfb, 0xff, 0xff }, { vrcp28sd xmm30{k7},xmm29,QWORD [rdx-0x408] }
97 testcase { 0x62, 0x02, 0x7d, 0x48, 0xcc, 0xf5 }, { vrsqrt28ps zmm30,zmm29 }
98 testcase { 0x62, 0x02, 0x7d, 0x4f, 0xcc, 0xf5 }, { vrsqrt28ps zmm30{k7},zmm29 }
99 testcase { 0x62, 0x02, 0x7d, 0xcf, 0xcc, 0xf5 }, { vrsqrt28ps zmm30{k7}{z},zmm29 }
100 testcase { 0x62, 0x02, 0x7d, 0x18, 0xcc, 0xf5 }, { vrsqrt28ps zmm30,zmm29,{sae} }
101 testcase { 0x62, 0x62, 0x7d, 0x48, 0xcc, 0x31 }, { vrsqrt28ps zmm30,ZWORD [rcx] }
102 testcase { 0x62, 0x22, 0x7d, 0x48, 0xcc, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrsqrt28ps zmm30,ZWORD [rax+r14*8+0x123] }
103 testcase { 0x62, 0x62, 0x7d, 0x58, 0xcc, 0x31 }, { vrsqrt28ps zmm30,DWORD [rcx]{1to16} }
104 testcase { 0x62, 0x62, 0x7d, 0x48, 0xcc, 0x72, 0x7f }, { vrsqrt28ps zmm30,ZWORD [rdx+0x1fc0] }
105 testcase { 0x62, 0x62, 0x7d, 0x48, 0xcc, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vrsqrt28ps zmm30,ZWORD [rdx+0x2000] }
106 testcase { 0x62, 0x62, 0x7d, 0x48, 0xcc, 0x72, 0x80 }, { vrsqrt28ps zmm30,ZWORD [rdx-0x2000] }
107 testcase { 0x62, 0x62, 0x7d, 0x48, 0xcc, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vrsqrt28ps zmm30,ZWORD [rdx-0x2040] }
108 testcase { 0x62, 0x62, 0x7d, 0x58, 0xcc, 0x72, 0x7f }, { vrsqrt28ps zmm30,DWORD [rdx+0x1fc]{1to16} }
109 testcase { 0x62, 0x62, 0x7d, 0x58, 0xcc, 0xb2, 0x00, 0x02, 0x00, 0x00 }, { vrsqrt28ps zmm30,DWORD [rdx+0x200]{1to16} }
110 testcase { 0x62, 0x62, 0x7d, 0x58, 0xcc, 0x72, 0x80 }, { vrsqrt28ps zmm30,DWORD [rdx-0x200]{1to16} }
111 testcase { 0x62, 0x62, 0x7d, 0x58, 0xcc, 0xb2, 0xfc, 0xfd, 0xff, 0xff }, { vrsqrt28ps zmm30,DWORD [rdx-0x204]{1to16} }
112 testcase { 0x62, 0x02, 0xfd, 0x48, 0xcc, 0xf5 }, { vrsqrt28pd zmm30,zmm29 }
113 testcase { 0x62, 0x02, 0xfd, 0x4f, 0xcc, 0xf5 }, { vrsqrt28pd zmm30{k7},zmm29 }
114 testcase { 0x62, 0x02, 0xfd, 0xcf, 0xcc, 0xf5 }, { vrsqrt28pd zmm30{k7}{z},zmm29 }
115 testcase { 0x62, 0x02, 0xfd, 0x18, 0xcc, 0xf5 }, { vrsqrt28pd zmm30,zmm29,{sae} }
116 testcase { 0x62, 0x62, 0xfd, 0x48, 0xcc, 0x31 }, { vrsqrt28pd zmm30,ZWORD [rcx] }
117 testcase { 0x62, 0x22, 0xfd, 0x48, 0xcc, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrsqrt28pd zmm30,ZWORD [rax+r14*8+0x123] }
118 testcase { 0x62, 0x62, 0xfd, 0x58, 0xcc, 0x31 }, { vrsqrt28pd zmm30,QWORD [rcx]{1to8} }
119 testcase { 0x62, 0x62, 0xfd, 0x48, 0xcc, 0x72, 0x7f }, { vrsqrt28pd zmm30,ZWORD [rdx+0x1fc0] }
120 testcase { 0x62, 0x62, 0xfd, 0x48, 0xcc, 0xb2, 0x00, 0x20, 0x00, 0x00 }, { vrsqrt28pd zmm30,ZWORD [rdx+0x2000] }
121 testcase { 0x62, 0x62, 0xfd, 0x48, 0xcc, 0x72, 0x80 }, { vrsqrt28pd zmm30,ZWORD [rdx-0x2000] }
122 testcase { 0x62, 0x62, 0xfd, 0x48, 0xcc, 0xb2, 0xc0, 0xdf, 0xff, 0xff }, { vrsqrt28pd zmm30,ZWORD [rdx-0x2040] }
123 testcase { 0x62, 0x62, 0xfd, 0x58, 0xcc, 0x72, 0x7f }, { vrsqrt28pd zmm30,QWORD [rdx+0x3f8]{1to8} }
124 testcase { 0x62, 0x62, 0xfd, 0x58, 0xcc, 0xb2, 0x00, 0x04, 0x00, 0x00 }, { vrsqrt28pd zmm30,QWORD [rdx+0x400]{1to8} }
125 testcase { 0x62, 0x62, 0xfd, 0x58, 0xcc, 0x72, 0x80 }, { vrsqrt28pd zmm30,QWORD [rdx-0x400]{1to8} }
126 testcase { 0x62, 0x62, 0xfd, 0x58, 0xcc, 0xb2, 0xf8, 0xfb, 0xff, 0xff }, { vrsqrt28pd zmm30,QWORD [rdx-0x408]{1to8} }
127 testcase { 0x62, 0x02, 0x15, 0x07, 0xcd, 0xf4 }, { vrsqrt28ss xmm30{k7},xmm29,xmm28 }
128 testcase { 0x62, 0x02, 0x15, 0x87, 0xcd, 0xf4 }, { vrsqrt28ss xmm30{k7}{z},xmm29,xmm28 }
129 testcase { 0x62, 0x02, 0x15, 0x17, 0xcd, 0xf4 }, { vrsqrt28ss xmm30{k7},xmm29,xmm28,{sae} }
130 testcase { 0x62, 0x62, 0x15, 0x07, 0xcd, 0x31 }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rcx] }
131 testcase { 0x62, 0x22, 0x15, 0x07, 0xcd, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rax+r14*8+0x123] }
132 testcase { 0x62, 0x62, 0x15, 0x07, 0xcd, 0x72, 0x7f }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rdx+0x1fc] }
133 testcase { 0x62, 0x62, 0x15, 0x07, 0xcd, 0xb2, 0x00, 0x02, 0x00, 0x00 }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rdx+0x200] }
134 testcase { 0x62, 0x62, 0x15, 0x07, 0xcd, 0x72, 0x80 }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rdx-0x200] }
135 testcase { 0x62, 0x62, 0x15, 0x07, 0xcd, 0xb2, 0xfc, 0xfd, 0xff, 0xff }, { vrsqrt28ss xmm30{k7},xmm29,DWORD [rdx-0x204] }
136 testcase { 0x62, 0x02, 0x95, 0x07, 0xcd, 0xf4 }, { vrsqrt28sd xmm30{k7},xmm29,xmm28 }
137 testcase { 0x62, 0x02, 0x95, 0x87, 0xcd, 0xf4 }, { vrsqrt28sd xmm30{k7}{z},xmm29,xmm28 }
138 testcase { 0x62, 0x02, 0x95, 0x17, 0xcd, 0xf4 }, { vrsqrt28sd xmm30{k7},xmm29,xmm28,{sae} }
139 testcase { 0x62, 0x62, 0x95, 0x07, 0xcd, 0x31 }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rcx] }
140 testcase { 0x62, 0x22, 0x95, 0x07, 0xcd, 0xb4, 0xf0, 0x23, 0x01, 0x00, 0x00 }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rax+r14*8+0x123] }
141 testcase { 0x62, 0x62, 0x95, 0x07, 0xcd, 0x72, 0x7f }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rdx+0x3f8] }
142 testcase { 0x62, 0x62, 0x95, 0x07, 0xcd, 0xb2, 0x00, 0x04, 0x00, 0x00 }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rdx+0x400] }
143 testcase { 0x62, 0x62, 0x95, 0x07, 0xcd, 0x72, 0x80 }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rdx-0x400] }
144 testcase { 0x62, 0x62, 0x95, 0x07, 0xcd, 0xb2, 0xf8, 0xfb, 0xff, 0xff }, { vrsqrt28sd xmm30{k7},xmm29,QWORD [rdx-0x408] }