1 /**
2  * Compiler implementation of the
3  * $(LINK2 http://www.dlang.org, D programming language).
4  *
5  * Copyright:   Copyright (C) 1985-1998 by Symantec
6  *              Copyright (C) 2000-2020 by The D Language Foundation, All Rights Reserved
7  * License:     $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source:      $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/backend/ptrntab.d, backend/ptrntab.d)
9  */
10 
11 module dmd.backend.ptrntab;
12 
13 version (SCPP)
14     version = COMPILE;
15 version (MARS)
16     version = COMPILE;
17 
18 version (COMPILE)
19 {
20 
21 import core.stdc.stdio;
22 import core.stdc.string;
23 
24 version (SCPP) extern (C) char* strlwr(return char* s);
25 
26 import dmd.backend.cc;
27 import dmd.backend.cdef;
28 import dmd.backend.code_x86;
29 import dmd.backend.iasm;
30 import dmd.backend.oper;
31 import dmd.backend.code;
32 import dmd.backend.global;
33 import dmd.backend.xmm;
34 
35 import dmd.backend.cdef;
36 import dmd.backend.dlist;
37 import dmd.backend.ty;
38 
39 nothrow:
40 
41 //
42 // NOTE: For 0 operand instructions, the opcode is taken from
43 // the first entry and no subsequent entries are required.
44 // for instructions with operands, a NULL entry is required at the end
45 // as a terminator
46 //
47 // 0 Operand instructions
48 //
49 
50 immutable
51 {
52 
53 template OPTABLE0(opcode_t op, opflag_t mod)
54 {
55     immutable PTRNTAB0[1] OPTABLE0 = [ { op, mod }, ];
56 }
57 
58 alias aptb0AAA = OPTABLE0!(     0x37  ,_i64_bit | _modax);
59 alias aptb0AAD = OPTABLE0!(     0xd50a,_i64_bit | _modax);
60 alias aptb0AAM = OPTABLE0!(     0xd40a,_i64_bit | _modax);
61 alias aptb0AAS = OPTABLE0!(     0x3f,  _i64_bit | _modax);
62 alias aptb0CBW = OPTABLE0!(     0x98,_16_bit | _modax);
63 alias aptb0CWDE = OPTABLE0!(    0x98,_32_bit | _I386 | _modax);
64 alias aptb0CDQE = OPTABLE0!(    0x98,_64_bit | _modax);
65 alias aptb0CLC = OPTABLE0!(     0xf8,0);
66 alias aptb0CLD = OPTABLE0!(     0xfc,0);
67 alias aptb0CLI = OPTABLE0!(     0xfa,0);
68 alias aptb0CLTS = OPTABLE0!(    0x0f06,0);
69 alias aptb0CMC = OPTABLE0!(     0xf5,0);
70 alias aptb0CMPSB = OPTABLE0!(   0xa6,_modsidi);
71 alias aptb0CMPSW = OPTABLE0!(   0xa7,_16_bit | _modsidi);
72 //alias aptb0CMPSD = OPTABLE0!( 0xa7,_32_bit | _I386 | _modsidi);
73 alias aptb0CMPSQ = OPTABLE0!(   0xa7,_64_bit | _modsidi);
74 alias aptb0CWD = OPTABLE0!(     0x99, _16_bit | _modaxdx);
75 alias aptb0CDQ = OPTABLE0!(     0x99,_32_bit | _I386 | _modaxdx);
76 alias aptb0CQO = OPTABLE0!(     0x99, _64_bit | _modaxdx);
77 alias aptb0DAA = OPTABLE0!(     0x27,_i64_bit | _modax );
78 alias aptb0DAS = OPTABLE0!(     0x2f,_i64_bit | _modax );
79 alias aptb0HLT = OPTABLE0!(     0xf4,0);
80 alias aptb0INSB = OPTABLE0!(    0x6c,_I386 | _modsi);
81 alias aptb0INSW = OPTABLE0!(    0x6d,_16_bit | _I386 | _modsi);
82 alias aptb0INSD = OPTABLE0!(    0x6d,_32_bit | _I386 | _modsi);
83 alias aptb0INTO = OPTABLE0!(    0xce,_i64_bit);
84 alias aptb0INVD = OPTABLE0!(    0x0f08,_I386);               // Actually a 486 only instruction
85 alias aptb0IRET = OPTABLE0!(    0xcf,_16_bit);
86 alias aptb0IRETD = OPTABLE0!(   0xcf,_32_bit | _I386);
87 alias aptb0IRETQ = OPTABLE0!(   0xcf,_64_bit | _I386);
88 alias aptb0LAHF = OPTABLE0!(    0x9f,_modax);
89 alias aptb0LEAVE = OPTABLE0!(   0xc9,_I386);
90 alias aptb0LOCK = OPTABLE0!(    0xf0,0);
91 alias aptb0LODSB = OPTABLE0!(   0xac,_modsiax);
92 alias aptb0LODSW = OPTABLE0!(   0xad,_16_bit | _modsiax);
93 alias aptb0LODSD = OPTABLE0!(   0xad,_32_bit | _I386 | _modsiax);
94 alias aptb0LODSQ = OPTABLE0!(   0xad,_64_bit | _modsiax);
95 alias aptb0MOVSB = OPTABLE0!(   0xa4, _modsidi);
96 alias aptb0MOVSW = OPTABLE0!(   0xa5, _16_bit | _modsidi);
97 alias aptb0MOVSQ = OPTABLE0!(   0xa5, _64_bit | _modsidi);
98 alias aptb0NOP = OPTABLE0!(     0x90, 0);
99 alias aptb0OUTSB = OPTABLE0!(   0x6e, _I386 | _modsi);
100 alias aptb0OUTSW = OPTABLE0!(   0x6f, _16_bit | _I386 | _modsi);
101 alias aptb0OUTSD = OPTABLE0!(   0x6f, _32_bit | _I386 | _modsi);
102 alias aptb0POPA = OPTABLE0!(    0x61,_i64_bit | _16_bit | _I386 | _modall);
103 alias aptb0POPAD = OPTABLE0!(   0x61,_i64_bit | _32_bit | _I386 | _modall);
104 alias aptb0POPF = OPTABLE0!(    0x9d,           _16_bit);
105 alias aptb0POPFD = OPTABLE0!(   0x9d,_i64_bit | _32_bit | _I386);
106 alias aptb0POPFQ = OPTABLE0!(   0x9d, _64_bit);
107 alias aptb0PUSHA = OPTABLE0!(   0x60,_i64_bit | _16_bit | _I386);
108 alias aptb0PUSHAD = OPTABLE0!(  0x60,_i64_bit | _32_bit | _I386);
109 alias aptb0PUSHF = OPTABLE0!(   0x9c,           _16_bit);
110 alias aptb0PUSHFD = OPTABLE0!(  0x9c,_i64_bit | _32_bit | _I386);
111 alias aptb0PUSHFQ = OPTABLE0!(  0x9c, _64_bit);                // TODO REX_W override is implicit
112 alias aptb0REP = OPTABLE0!(     0xf3, _modcx);
113 alias aptb0REPNE = OPTABLE0!(   0xf2, _modcx);
114 alias aptb0SAHF = OPTABLE0!(    0x9e, 0);
115 alias aptb0SCASB = OPTABLE0!(   0xAE, _moddi);
116 alias aptb0SCASW = OPTABLE0!(   0xAF, _16_bit | _moddi);
117 alias aptb0SCASD = OPTABLE0!(   0xAF, _32_bit | _I386 | _moddi);
118 alias aptb0SCASQ = OPTABLE0!(   0xAF, _64_bit | _moddi);
119 alias aptb0STC = OPTABLE0!(     0xf9, 0);
120 alias aptb0STD = OPTABLE0!(     0xfd, 0);
121 alias aptb0STI = OPTABLE0!(     0xfb, 0);
122 alias aptb0STOSB = OPTABLE0!(   0xaa, _moddi);
123 alias aptb0STOSW = OPTABLE0!(   0xAB, _16_bit | _moddi);
124 alias aptb0STOSD = OPTABLE0!(   0xAB, _32_bit | _I386 | _moddi);
125 alias aptb0STOSQ = OPTABLE0!(   0xAB, _64_bit | _moddi);
126 alias aptb0WAIT = OPTABLE0!(    0x9B, 0);
127 alias aptb0WBINVD = OPTABLE0!(  0x0f09, _I386);                        // Really a 486 opcode
128 alias aptb0XLATB = OPTABLE0!(   0xd7, _modax);
129 alias aptb0CPUID = OPTABLE0!(   0x0fa2, _I386 | _modall);
130 alias aptb0RDMSR = OPTABLE0!(   0x0f32, _I386 | _modaxdx);
131 alias aptb0RDPMC = OPTABLE0!(   0x0f33, _I386 | _modaxdx);
132 alias aptb0RDTSC = OPTABLE0!(   0x0f31, _I386 | _modaxdx);
133 alias aptb0RDTSCP = OPTABLE0!(  0x0f01f9, _I386 | _modaxdx | _modcx);
134 alias aptb0WRMSR = OPTABLE0!(   0x0f30, _I386);
135 alias aptb0RSM = OPTABLE0!(     0x0faa,_i64_bit | _I386);
136 
137 //
138 // Now come the one operand instructions
139 // These will prove to be a little more challenging than the 0
140 // operand instructions
141 //
142 PTRNTAB1[3] aptb1BSWAP = /* BSWAP */ [
143                                 // Really is a 486 only instruction
144         { 0x0fc8,   _I386, _plus_r | _r32 },
145         { 0x0fc8, _64_bit, _plus_r | _r64 },
146         { ASM_END }
147 ];
148 
149 PTRNTAB1[13] aptb1CALL = /* CALL */ [
150         { 0xe8, _cw| _i64_bit |           _modall,  _rel16  },
151         { 0xff, _2 | _i64_bit | _16_bit | _modall,  _r16 },
152         { 0xff, _2 | _i64_bit |           _modall,  _m16 },
153         { 0x9a, _cd| _i64_bit |           _modall,  _p1616  },
154         { 0xff, _3 |                      _modall,  _m1616  },
155         { 0xe8, _cd|                      _modall,  _rel32  },
156         { 0xff, _2 | _i64_bit | _32_bit | _modall,  _r32  },
157         { 0xff, _2 |            _32_bit | _modall,  _r64  },       // REX_W override is implicit
158         { 0xff, _2 | _i64_bit |           _modall,  _m32  },
159         { 0xff, _2 |            _64_bit | _modall,  _m64  },       // TODO REX_W override is implicit
160         { 0x9a, _cp| _i64_bit |           _modall,  _p1632 },
161         { 0xff, _3 |                      _modall,  _m1632 },
162         { ASM_END }
163 ];
164 
165 PTRNTAB1[7] aptb1DEC = /* DEC */ [
166         { 0xfe, _1,                        _rm8 },
167         { 0x48, _rw | _i64_bit | _16_bit,  _r16 | _plus_r },
168         { 0x48, _rd | _i64_bit | _32_bit,  _r32 | _plus_r },
169         { 0xff, _1  |            _16_bit,  _rm16 },
170         { 0xff, _1  |            _32_bit,  _rm32 },
171         { 0xff, _1  |            _64_bit,  _rm64 },
172         { ASM_END }
173 ];
174 
175 PTRNTAB1[7] aptb1INC = /* INC */ [
176         { 0xfe, _0,                        _rm8 },
177         { 0x40, _rw | _i64_bit | _16_bit,  _r16 | _plus_r },
178         { 0x40, _rd | _i64_bit | _32_bit,  _r32 | _plus_r },
179         { 0xff, _0  |            _16_bit,  _rm16 },
180         { 0xff, _0  |            _32_bit,  _rm32 },
181         { 0xff, _0  |            _64_bit,  _rm64 },
182         { ASM_END }
183 ];
184 // INT and INT 3
185 PTRNTAB1[3] aptb1INT= /* INT */ [
186         { 0xcc, 3,              0 },    // The ulFlags here are meant to
187                                         // be the value of the immediate
188                                         // operand
189         { 0xcd, 0,              _imm8 },
190         { ASM_END }
191 ];
192 PTRNTAB1[2] aptb1INVLPG = /* INVLPG */ [         // 486 only instruction
193         { 0x0f01,       _I386|_7, _m8 | _m16 | _m32 | _m48 },
194         { ASM_END }
195 ];
196 
197 
198 template OPTABLE_J(opcode_t op)
199 {
200     immutable PTRNTAB1[4] OPTABLE_J =
201     [
202         { 0x70|op,   _cb,         _rel8 },
203         { 0x0f80|op, _cw|_i64_bit,_rel16 },
204         { 0x0f80|op, _cd,         _rel32 },
205         { ASM_END }
206     ];
207 }
208 
209 alias aptb1JO   = OPTABLE_J!(0);
210 alias aptb1JNO  = OPTABLE_J!(1);
211 alias aptb1JB   = OPTABLE_J!(2);
212 alias aptb1JNB  = OPTABLE_J!(3);
213 alias aptb1JZ   = OPTABLE_J!(4);
214 alias aptb1JNZ  = OPTABLE_J!(5);
215 alias aptb1JBE  = OPTABLE_J!(6);
216 alias aptb1JNBE = OPTABLE_J!(7);
217 alias aptb1JS   = OPTABLE_J!(8);
218 alias aptb1JNS  = OPTABLE_J!(9);
219 alias aptb1JP   = OPTABLE_J!(0xA);
220 alias aptb1JNP  = OPTABLE_J!(0xB);
221 alias aptb1JL   = OPTABLE_J!(0xC);
222 alias aptb1JNL  = OPTABLE_J!(0xD);
223 alias aptb1JLE  = OPTABLE_J!(0xE);
224 alias aptb1JNLE = OPTABLE_J!(0xF);
225 
226 PTRNTAB1[2] aptb1JCXZ = /* JCXZ */ [
227         { 0xe3, _cb | _i64_bit | _16_bit_addr, _rel8 },
228         { ASM_END }
229 ];
230 PTRNTAB1[2] aptb1JECXZ = /* JECXZ */ [
231         { 0xe3, _cb | _32_bit_addr | _I386,_rel8 },
232         { ASM_END }
233 ];
234 PTRNTAB1[11] aptb1JMP = /* JMP */ [
235         { 0xe9, _cw| _i64_bit,           _rel16 },
236         { 0xe9, _cd,                     _rel32 },
237         { 0xeb, _cb,                     _rel8  },
238         { 0xff, _4 | _i64_bit | _16_bit, _rm16  },
239         { 0xea, _cd| _i64_bit,           _p1616 },
240         { 0xff, _5,                      _m1616 },
241         { 0xff, _4 | _i64_bit | _32_bit, _rm32  },
242         { 0xff, _4 |            _64_bit, _rm64  },       // TODO REX_W override is implicit
243         { 0xea, _cp| _i64_bit,          _p1632  },
244         { 0xff, _5,                     _m1632  },
245         { ASM_END }
246 ];
247 PTRNTAB1[2] aptb1LGDT = /* LGDT */ [
248         { 0x0f01,       _2,     _m48 },
249         { ASM_END }
250 ];
251 PTRNTAB1[2] aptb1LIDT = /* LIDT */ [
252         { 0x0f01,       _3,     _m48 },
253         { ASM_END }
254 ];
255 PTRNTAB1[2] aptb1LLDT = /* LLDT */ [
256         { 0x0f00,       _2|_modnot1,    _rm16 },
257         { ASM_END }
258 ];
259 PTRNTAB1[2] aptb1LMSW = /* LMSW */ [
260         { 0x0f01,       _6|_modnot1,    _rm16 },
261         { ASM_END }
262 ];
263 PTRNTAB1[4] aptb1LODS = /* LODS */ [
264         { 0xac, _modax,_m8 },
265         { 0xad, _16_bit | _modax,_m16 },
266         { 0xad, _32_bit | _I386 | _modax,_m32 },
267         { ASM_END }
268 ];
269 PTRNTAB1[2] aptb1LOOP = /* LOOP */ [
270         { 0xe2, _cb | _modcx,_rel8 },
271         { ASM_END }
272 ];
273 PTRNTAB1[2] aptb1LOOPE = /* LOOPE/LOOPZ */ [
274         { 0xe1, _cb | _modcx,_rel8 },
275         { ASM_END }
276 ];
277 PTRNTAB1[2] aptb1LOOPNE = /* LOOPNE/LOOPNZ */ [
278         { 0xe0, _cb | _modcx,_rel8 },
279         { ASM_END }
280 ];
281 PTRNTAB1[2] aptb1LTR = /* LTR */ [
282         { 0x0f00,       _3|_modnot1,    _rm16 },
283         { ASM_END }
284 ];
285 PTRNTAB1[5] aptb1NEG = /* NEG */ [
286         { 0xf6, _3,     _rm8 },
287         { 0xf7, _3 | _16_bit,   _rm16 },
288         { 0xf7, _3 | _32_bit,   _rm32 },
289         { 0xf7, _3 | _64_bit,   _rm64 },
290         { ASM_END }
291 ];
292 PTRNTAB1[5] aptb1NOT = /* NOT */ [
293         { 0xf6, _2,     _rm8 },
294         { 0xf7, _2 | _16_bit,   _rm16 },
295         { 0xf7, _2 | _32_bit,   _rm32 },
296         { 0xf7, _2 | _64_bit,   _rm64 },
297         { ASM_END }
298 ];
299 PTRNTAB1[12] aptb1POP = /* POP */ [
300         { 0x8f, _0  |            _16_bit, _m16 },
301         { 0x8f, _0  | _i64_bit | _32_bit, _m32 },
302         { 0x8f, _0  |            _64_bit, _m64 },                 // TODO REX_W override is implicit
303         { 0x58, _rw |            _16_bit, _r16 | _plus_r },
304         { 0x58, _rd | _i64_bit | _32_bit, _r32 | _plus_r },
305         { 0x58, _r  |            _32_bit, _r64 | _plus_r },       // REX_W override is implicit
306         { 0x1f,       _i64_bit,            _ds | _seg },
307         { 0x07,       _i64_bit | _modes,   _es | _seg },
308         { 0x17,       _i64_bit,            _ss | _seg },
309         { 0x0fa1,       0,                 _fs | _seg },
310         { 0x0fa9,       0,                 _gs | _seg },
311         { ASM_END }
312 ];
313 PTRNTAB1[18] aptb1PUSH = /* PUSH */ [
314         { 0xff, _6 |            _16_bit,  _m16 },
315         { 0xff, _6 | _i64_bit | _32_bit,  _m32 },
316         { 0xff, _6 |            _64_bit,  _m64 },                // TODO REX_W override is implicit
317         { 0x50, _r |            _16_bit, _r16 | _plus_r },
318         { 0x50, _r | _i64_bit | _32_bit, _r32 | _plus_r },
319         { 0x50, _r |            _32_bit, _r64 | _plus_r },       // REX_W override is implicit
320         { 0x6a,       0,_imm8 },
321         { 0x68, _16_bit,_imm16 },
322         { 0x68, _16_bit,_rel16 },
323         { 0x68, _32_bit,_imm32 },
324         { 0x68, _32_bit,_rel32 },
325         { 0x0e, _i64_bit,_cs | _seg  },
326         { 0x16, _i64_bit,_ss | _seg  },
327         { 0x1e, _i64_bit,_ds | _seg  },
328         { 0x06, _i64_bit,_es | _seg  },
329         { 0x0fa0,      0,_fs | _seg},
330         { 0x0fa8,      0,_gs | _seg},
331         { ASM_END }
332 ];
333 PTRNTAB1[3] aptb1RET = /* RET */ [
334         { 0xc3, 0,      0 },
335         { 0xc2, _iw,    _imm16 },
336         { ASM_END }
337 ];
338 PTRNTAB1[3] aptb1RETF = /* RETF */ [
339         { 0xcb, 0, 0 },
340         { 0xca, _iw, _imm16 },
341         { ASM_END }
342 ];
343 PTRNTAB1[4] aptb1SCAS = /* SCAS */ [
344         { 0xae, _moddi, _m8 },
345         { 0xaf, _16_bit | _moddi, _m16 },
346         { 0xaf, _32_bit | _moddi, _m32 },
347         { ASM_END }
348 ];
349 
350 template OPTABLE_SET(opcode_t op)
351 {
352     immutable PTRNTAB1[2] OPTABLE_SET =
353     [
354         { 0xf90|op, _cb, _rm8 },
355         { ASM_END }
356     ];
357 }
358 
359 alias aptb1SETO   = OPTABLE_SET!(0);
360 alias aptb1SETNO  = OPTABLE_SET!(1);
361 alias aptb1SETB   = OPTABLE_SET!(2);
362 alias aptb1SETNB  = OPTABLE_SET!(3);
363 alias aptb1SETZ   = OPTABLE_SET!(4);
364 alias aptb1SETNZ  = OPTABLE_SET!(5);
365 alias aptb1SETBE  = OPTABLE_SET!(6);
366 alias aptb1SETNBE = OPTABLE_SET!(7);
367 alias aptb1SETS   = OPTABLE_SET!(8);
368 alias aptb1SETNS  = OPTABLE_SET!(9);
369 alias aptb1SETP   = OPTABLE_SET!(0xA);
370 alias aptb1SETNP  = OPTABLE_SET!(0xB);
371 alias aptb1SETL   = OPTABLE_SET!(0xC);
372 alias aptb1SETNL  = OPTABLE_SET!(0xD);
373 alias aptb1SETLE  = OPTABLE_SET!(0xE);
374 alias aptb1SETNLE = OPTABLE_SET!(0xF);
375 
376 
377 PTRNTAB1[2]  aptb1SGDT= /* SGDT */ [
378         { 0xf01, _0, _m48 },
379         { ASM_END }
380 ];
381 PTRNTAB1[2]  aptb1SIDT = /* SIDT */ [
382         { 0xf01, _1, _m48 },
383         { ASM_END }
384 ];
385 PTRNTAB1[2]  aptb1SLDT = /* SLDT */ [
386         { 0xf00, _0, _rm16 },
387         { ASM_END }
388 ];
389 PTRNTAB1[3]  aptb1SMSW = /* SMSW */ [
390         { 0xf01, _4, _rm16 },
391         { 0xf01, _4, _r32 },
392         { ASM_END }
393 ];
394 PTRNTAB1[4]  aptb1STOS = /* STOS */ [
395         { 0xaa, _moddi, _m8 },
396         { 0xab, _16_bit | _moddi, _m16 },
397         { 0xab, _32_bit | _moddi, _m32 },
398         { ASM_END }
399 ];
400 PTRNTAB1[2]  aptb1STR = /* STR */ [
401         { 0xf00, _1, _rm16 },
402         { ASM_END }
403 ];
404 PTRNTAB1[2]  aptb1VERR = /* VERR */ [
405         { 0xf00, _4|_modnot1, _rm16 },
406         { ASM_END }
407 ];
408 PTRNTAB1[2]  aptb1VERW = /* VERW */ [
409         { 0xf00, _5|_modnot1, _rm16 },
410         { ASM_END }
411 ];
412 PTRNTAB1[3]  aptb1XLAT = /* XLAT */ [
413         { 0xd7, _modax, 0 },
414         { 0xd7, _modax, _m8 },
415         { ASM_END }
416 ];
417 PTRNTAB1[2]  aptb1CMPXCH8B = /* CMPXCH8B */ [
418     { 0x0fc7, _1 | _modaxdx | _I386, _m64 },
419         { ASM_END }
420 ];
421 
422 PTRNTAB1[2]  aptb1CMPXCH16B = /* CMPXCH16B */ [
423     { 0x0fc7, _1 | _modaxdx | _64_bit, _m64 },
424         { ASM_END }
425 ];
426 
427 template OPTABLE_ARITH(opcode_t op, uint rr, uint m)
428 {
429     immutable PTRNTAB2[20] OPTABLE_ARITH =
430     [
431         { op+4,  _ib|m,               _al,        _imm8 },
432         { 0x83, rr|_ib|_16_bit|m,     _rm16,      _imm8 },
433         { op+5, _iw|_16_bit|m,        _ax,        _imm16 },
434         { 0x83, rr|_ib|_32_bit|m,     _rm32,      _imm8 },
435         { 0x83, rr|_ib|_64_bit|m,     _rm64,      _imm8 },
436         { op+5, _id|_32_bit|m,        _eax,       _imm32 },
437         { op+5, _id|_64_bit|m,        _rax,       _imm32 },
438         { 0x80, rr|_ib|m,             _rm8,       _imm8 },
439         { 0x81, rr|_iw|_16_bit|m,     _rm16,      _imm16 },
440         { 0x81, rr|_id|_32_bit|m,     _rm32,      _imm32 },
441         { 0x81, rr|_id|_64_bit|m,     _rm64,      _imm32 },
442         { op+0, _r|m,                 _rm8,       _r8 },
443         { op+1, _r|_16_bit|m,         _rm16,      _r16 },
444         { op+1, _r|_32_bit|m,         _rm32,      _r32 },
445         { op+1, _r|_64_bit|m,         _rm64,      _r64 },
446         { op+2, _r|m,                 _r8,        _rm8 },
447         { op+3, _r|_16_bit|m,         _r16,       _rm16 },
448         { op+3, _r|_32_bit|m,         _r32,       _rm32 },
449         { op+3, _r|_64_bit|m,         _r64,       _rm64 },
450         { ASM_END }
451     ];
452 }
453 
454 alias aptb2ADD = OPTABLE_ARITH!(0x00,_0,0);
455 alias aptb2OR  = OPTABLE_ARITH!( 0x08,_1,0);
456 alias aptb2ADC = OPTABLE_ARITH!(0x10,_2,0);
457 alias aptb2SBB = OPTABLE_ARITH!(0x18,_3,0);
458 alias aptb2AND = OPTABLE_ARITH!(0x20,_4,0);
459 alias aptb2SUB = OPTABLE_ARITH!(0x28,_5,0);
460 alias aptb2XOR = OPTABLE_ARITH!(0x30,_6,0);
461 alias aptb2CMP = OPTABLE_ARITH!(0x38,_7,_modnot1);
462 
463 
464 PTRNTAB2[2]  aptb2ARPL = /* ARPL */ [
465         { 0x63, _r|_i64_bit,               _rm16, _r16 },
466         { ASM_END }
467 ];
468 PTRNTAB2[3]  aptb2BOUND = /* BOUND */ [
469         { 0x62, _r|_i64_bit|_16_bit|_modnot1,_r16,_m16 },// Should really b3 _m16_16
470         { 0x62, _r|_i64_bit|_32_bit|_modnot1,_r32,_m32 },// Should really be _m32_32
471         { ASM_END }
472 ];
473 PTRNTAB2[4]  aptb2BSF = /* BSF */ [
474         { 0x0fbc,       _cw | _16_bit,          _r16,   _rm16 },
475         { 0x0fbc,       _cd|_32_bit,            _r32,   _rm32 },
476         { 0x0fbc,       _cq|_64_bit,            _r64,   _rm64 },
477         { ASM_END }
478 ];
479 PTRNTAB2[4]  aptb2BSR = /* BSR */ [
480         { 0x0fbd,       _cw|_16_bit,            _r16,   _rm16 },
481         { 0x0fbd,       _cd|_32_bit,            _r32,   _rm32 },
482         { 0x0fbd,       _cq|_64_bit,            _r64,   _rm64 },
483         { ASM_END }
484 ];
485 PTRNTAB2[7]  aptb2BT = /* BT */ [
486         { 0x0fa3,       _cw|_16_bit|_modnot1,           _rm16,  _r16 },
487         { 0x0fa3,       _cd|_32_bit|_modnot1,           _rm32,  _r32 },
488         { 0x0fa3,       _cq|_64_bit|_modnot1,           _rm64,  _r64 },
489         { 0x0fba,       _4|_ib|_16_bit|_modnot1,        _rm16,  _imm8 },
490         { 0x0fba,       _4|_ib|_32_bit|_modnot1,        _rm32,  _imm8 },
491         { 0x0fba,       _4|_ib|_64_bit|_modnot1,        _rm64,  _imm8 },
492         { ASM_END }
493 ];
494 PTRNTAB2[7]  aptb2BTC = /* BTC */ [
495         { 0x0fbb,       _cw|_16_bit,            _rm16,  _r16 },
496         { 0x0fbb,       _cd|_32_bit,            _rm32,  _r32 },
497         { 0x0fbb,       _cq|_64_bit,            _rm64,  _r64 },
498         { 0x0fba,       _7|_ib|_16_bit, _rm16,  _imm8 },
499         { 0x0fba,       _7|_ib|_32_bit, _rm32,  _imm8 },
500         { 0x0fba,       _7|_ib|_64_bit, _rm64,  _imm8 },
501         { ASM_END }
502 ];
503 PTRNTAB2[7]  aptb2BTR = /* BTR */ [
504         { 0x0fb3,       _cw|_16_bit,            _rm16,  _r16 },
505         { 0x0fb3,       _cd|_32_bit,            _rm32,  _r32 },
506         { 0x0fb3,       _cq|_64_bit,            _rm64,  _r64 },
507         { 0x0fba,       _6|_ib|_16_bit,         _rm16,  _imm8 },
508         { 0x0fba,       _6|_ib|_32_bit,         _rm32,  _imm8 },
509         { 0x0fba,       _6|_ib|_64_bit,         _rm64,  _imm8 },
510         { ASM_END }
511 ];
512 PTRNTAB2[7]  aptb2BTS = /* BTS */ [
513         { 0x0fab,       _cw|_16_bit,            _rm16,  _r16 },
514         { 0x0fab,       _cd|_32_bit,            _rm32,  _r32 },
515         { 0x0fab,       _cq|_64_bit,            _rm64,  _r64 },
516         { 0x0fba,       _5|_ib|_16_bit,         _rm16,  _imm8 },
517         { 0x0fba,       _5|_ib|_32_bit,         _rm32,  _imm8 },
518         { 0x0fba,       _5|_ib|_64_bit,         _rm64,  _imm8 },
519         { ASM_END }
520 ];
521 PTRNTAB2[4]  aptb2CMPS = /* CMPS */ [
522         { 0xa6, _modsidi,               _m8,    _m8 },
523         { 0xa7, _modsidi,       _m16,   _m16 },
524         { 0xa7, _modsidi,       _m32,   _m32 },
525         { ASM_END }
526 ];
527 PTRNTAB2[5]  aptb2CMPXCHG = /* CMPXCHG */ [
528         { 0xfb0, _I386 | _cb|_mod2,     _rm8,   _r8 },
529                                                 // This is really a 486 only
530                                                 // instruction
531         { 0xfb1, _I386 | _cw | _16_bit|_mod2,   _rm16,  _r16 },
532         { 0xfb1, _I386 | _cd | _32_bit|_mod2,   _rm32,  _r32 },
533         { 0xfb1, _I386 | _cq | _64_bit|_mod2,   _rm64,  _r64 },
534         { ASM_END }
535 ];
536 PTRNTAB2[9]  aptb2DIV = /* DIV */ [
537         { 0xf6, _6,                             _al,            _rm8 },
538         { 0xf7, _6 | _16_bit | _moddx,          _ax,            _rm16 },
539         { 0xf7, _6 | _32_bit | _moddx,          _eax,           _rm32 },
540         { 0xf7, _6 | _64_bit | _moddx,          _rax,           _rm64 },
541         { 0xf6, _6 | _modax,                    _rm8,           0 },
542         { 0xf7, _6 | _16_bit | _modaxdx,        _rm16,          0 },
543         { 0xf7, _6 | _32_bit | _modaxdx,        _rm32,          0 },
544         { 0xf7, _6 | _64_bit | _modaxdx,        _rm64,          0 },
545         { ASM_END }
546 ];
547 PTRNTAB2[2]  aptb2ENTER = /* ENTER */ [
548         { 0xc8, _iw|_ib,        _imm16, _imm8 },
549         { ASM_END }
550 ];
551 PTRNTAB2[9]  aptb2IDIV = /* IDIV */ [
552         { 0xf6, _7,                     _al,            _rm8 },
553         { 0xf7, _7|_16_bit|_moddx,      _ax,            _rm16 },
554         { 0xf7, _7|_32_bit|_moddx,      _eax,           _rm32 },
555         { 0xf7, _7|_64_bit|_moddx,      _rax,           _rm64 },
556         { 0xf6, _7 | _modax,            _rm8,           0 },
557         { 0xf7, _7|_16_bit|_modaxdx,    _rm16,          0 },
558         { 0xf7, _7|_32_bit|_modaxdx,    _rm32,          0 },
559         { 0xf7, _7|_64_bit|_modaxdx,    _rm64,          0 },
560         { ASM_END }
561 ];
562 PTRNTAB2[7]  aptb2IN = /* IN */ [
563         { 0xe4, _ib,        _al,                _imm8 },
564         { 0xe5, _ib|_16_bit,_ax,                _imm8 },
565         { 0xe5, _ib|_32_bit,_eax,       _imm8 },
566         { 0xec, 0,          _al,                _dx },
567         { 0xed, _16_bit,    _ax,                _dx },
568         { 0xed, _32_bit,    _eax,       _dx },
569         { ASM_END }
570 ];
571 PTRNTAB2[4]  aptb2INS = /* INS */ [
572         { 0x6c, _modsi, _rm8, _dx },
573         { 0x6d, _modsi|_16_bit, _rm16, _dx },
574         { 0x6d, _32_bit|_modsi, _rm32, _dx },
575         { ASM_END }
576 ];
577 
578 PTRNTAB2[3]  aptb2LAR = /* LAR */ [
579         { 0x0f02,       _r|_16_bit,                     _r16,   _rm16 },
580         { 0x0f02,       _r|_32_bit,                     _r32,   _rm32 },
581         { ASM_END }
582 ];
583 PTRNTAB2[3]  aptb2LDS = /* LDS */ [
584         { 0xc5, _r|_i64_bit|_16_bit,                    _r16,   _m32 },
585         { 0xc5, _r|_i64_bit|_32_bit,                    _r32,   _m48 },
586         { ASM_END }
587 ];
588 
589 PTRNTAB2[7]  aptb2LEA = /* LEA */ [
590         { 0x8d, _r|_16_bit,             _r16,   _m8 | _m16 | _m32 | _m48 },
591         { 0x8d, _r|_32_bit,             _r32,   _m8 | _m16 | _m32 | _m48 },
592         { 0x8d, _r|_64_bit,             _r64,   _m8 | _m16 | _m32 | _m48 | _m64 },
593         { 0x8d, _r|_16_bit,             _r16,   _rel16 },
594         { 0x8d, _r|_32_bit,             _r32,   _rel32 },
595         { 0x8d, _r|_64_bit,             _r64,   _rel32 },
596         { ASM_END }
597 ];
598 PTRNTAB2[3]  aptb2LES = /* LES */ [
599         { 0xc4, _r|_i64_bit|_16_bit|_modes,             _r16,   _m32 },
600         { 0xc4, _r|_i64_bit|_32_bit|_modes,             _r32,   _m48 },
601         { ASM_END }
602 ];
603 PTRNTAB2[3]  aptb2LFS = /* LFS */ [
604         { 0x0fb4,       _r|_16_bit,                     _r16,   _m32 },
605         { 0x0fb4,       _r|_32_bit,                     _r32,   _m48 },
606         { ASM_END }
607 ];
608 PTRNTAB2[3]  aptb2LGS = /* LGS */ [
609         { 0x0fb5,       _r|_16_bit,                     _r16,   _m32  },
610         { 0x0fb5,       _r|_32_bit,                     _r32,   _m48 },
611         { ASM_END }
612 ];
613 PTRNTAB2[3]  aptb2LSS = /* LSS */ [
614         { 0x0fb2,       _r|_16_bit,                     _r16,   _m32 },
615         { 0x0fb2,       _r|_32_bit,                     _r32,   _m48 },
616         { ASM_END }
617 ];
618 PTRNTAB2[3]  aptb2LSL = /* LSL */ [
619         { 0x0f03,       _r|_16_bit,                     _r16,   _rm16 },
620         { 0x0f03,       _r|_32_bit,                     _r32,   _rm32 },
621         { ASM_END }
622 ];
623 
624 PTRNTAB2[26] aptb2MOV = /* MOV */ [
625 /+ // Let pinholeopt() do this
626         { 0xa0, 0,              _al,            _moffs8         },
627         { 0xa1, _16_bit,        _ax,            _moffs16        },
628         { 0xa1, _32_bit,        _eax,           _moffs32        },
629         { 0xa2, 0,              _moffs8,        _al             },
630         { 0xa3, _16_bit,        _moffs16,       _ax             },
631         { 0xa3, _32_bit,        _moffs32,       _eax            },
632 +/
633         { 0x88, _r,             _rm8,           _r8             },
634         { 0x89, _r|_16_bit,     _rm16,          _r16            },
635         { 0x89, _r|_32_bit,     _rm32,          _r32            },
636         { 0x89, _r|_64_bit,     _rm64,          _r64            },
637         { 0x8a, _r,             _r8,            _rm8            },
638         { 0x8b, _r|_16_bit,     _r16,           _rm16           },
639         { 0x8b, _r|_32_bit,     _r32,           _rm32           },
640         { 0x8b, _r|_64_bit,     _r64,           _rm64           },
641         { 0x8c, _r,             _rm16,          _seg|_ds|_es| _ss | _fs | _gs | _cs },
642         { 0x8e, _r,             _seg|_ds|_es|_ss|_fs|_gs|_cs,   _rm16 },
643         { 0xb0, _rb,            _r8 | _plus_r,  _imm8           },
644         { 0xb8, _rw | _16_bit,  _r16 | _plus_r, _imm16          },
645         { 0xb8, _rd|_32_bit,    _r32 | _plus_r, _imm32          },
646         { 0xb8, _rd|_64_bit,    _r64 | _plus_r, _imm64          },
647         { 0xc6, _cb,            _rm8,           _imm8           },
648         { 0xc7, _cw|_16_bit,    _rm16,          _imm16          },
649         { 0xc7, _cd|_32_bit,    _rm32,          _imm32          },
650 /+ // Let pinholeopt() do this
651         { 0xc6, _cb,            _moffs8,        _imm8           },
652         { 0xc7, _cw|_16_bit,    _moffs16,       _imm16          },
653         { 0xc7, _cd|_32_bit,    _moffs32,       _imm32          },
654 +/
655         { 0x0f20,       _r,     _r32,           _special | _crn },
656         { 0x0f22,       _r,     _special|_crn,  _r32            },
657         { 0x0f20,       _r,     _r64,           _special | _crn },
658         { 0x0f22,       _r,     _special|_crn,  _r64            },
659         { 0x0f21,       _r,     _r32,           _special | _drn },
660         { 0x0f23,       _r,     _special|_drn,  _r32            },
661         { 0x0f24,       _r,     _r32,           _special | _trn },
662         { 0x0f26,       _r,     _special|_trn,  _r32            },
663         { ASM_END }
664 ];
665 
666 PTRNTAB2[4]  aptb2MOVS = /* MOVS */ [
667         { 0xa4, _modsidi ,              _m8,    _m8 },
668         { 0xa5, _modsidi | _16_bit,     _m16,   _m16 },
669         { 0xa5, _modsidi | _32_bit,     _m32,   _m32 },
670         { ASM_END }
671 ];
672 PTRNTAB2[7]  aptb2MOVSX = /* MOVSX */ [
673         { 0x0fbe,       _r|_16_bit,             _r16,   _rm8 },
674         { 0x0fbe,       _r|_32_bit,             _r32,   _rm8 },
675         { 0x0fbe,       _r|_64_bit,             _r64,   _rm8 },  // TODO: REX_W override is implicit
676         { 0x0fbf,       _r|_16_bit,             _r16,   _rm16 },
677         { 0x0fbf,       _r|_32_bit,             _r32,   _rm16 },
678         { 0x0fbf,       _r|_64_bit,             _r64,   _rm16 }, // TODO: REX_W override is implicit
679         { ASM_END }
680 ];
681 PTRNTAB2[2]  aptb2MOVSXD = /* MOVSXD */ [
682         { 0x63,         _r|_64_bit,             _r64,   _rm32 }, // TODO: REX_W override is implicit
683         { ASM_END }
684 ];
685 PTRNTAB2[7]  aptb2MOVZX = /* MOVZX */ [
686         { 0x0fb6,       _r|_16_bit,             _r16,   _rm8 },
687         { 0x0fb6,       _r|_32_bit,             _r32,   _rm8 },
688         { 0x0fb6,       _r|_64_bit,             _r64,   _rm8 },  // TODO: REX_W override is implicit
689         { 0x0fb7,       _r|_16_bit,             _r16,   _rm16 },
690         { 0x0fb7,       _r|_32_bit,             _r32,   _rm16 },
691         { 0x0fb7,       _r|_64_bit,             _r64,   _rm16 }, // TODO: REX_W override is implicit
692         { ASM_END }
693 ];
694 PTRNTAB2[9]  aptb2MUL = /* MUL */ [
695         { 0xf6, _4,                     _al,    _rm8 },
696         { 0xf7, _4|_16_bit|_moddx,      _ax,    _rm16 },
697         { 0xf7, _4|_32_bit|_moddx,      _eax,   _rm32 },
698         { 0xf7, _4|_64_bit|_moddx,      _rax,   _rm64 },
699         { 0xf6, _4|_modax,              _rm8,   0 },
700         { 0xf7, _4|_16_bit|_modaxdx,    _rm16,  0 },
701         { 0xf7, _4|_32_bit|_modaxdx,    _rm32,  0 },
702         { 0xf7, _4|_64_bit|_modaxdx,    _rm64,  0 },
703         { ASM_END }
704 ];
705 PTRNTAB2[4]  aptb2TZCNT = /* TZCNT */ [
706         { 0xf30fbc,       _cw|_16_bit,            _r16,   _rm16 },
707         { 0xf30fbc,       _cd|_32_bit,            _r32,   _rm32 },
708         { 0xf30fbc,       _cq|_64_bit,            _r64,   _rm64 },
709         { ASM_END }
710 ];
711 PTRNTAB2[4]  aptb2LZCNT = /* LZCNT */ [
712         { 0xf30fbd,       _cw|_16_bit,            _r16,   _rm16 },
713         { 0xf30fbd,       _cd|_32_bit,            _r32,   _rm32 },
714         { 0xf30fbd,       _cq|_64_bit,            _r64,   _rm64 },
715         { ASM_END }
716 ];
717 PTRNTAB2[7]  aptb2OUT = /* OUT */ [
718         { 0xe6, _ib,            _imm8,  _al },
719         { 0xe7, _ib|_16_bit,            _imm8,  _ax },
720         { 0xe7, _ib|_32_bit,            _imm8,  _eax },
721         { 0xee, _modnot1,               _dx,            _al },
722         { 0xef, _16_bit|_modnot1,               _dx,            _ax },
723         { 0xef, _32_bit|_modnot1,               _dx,            _eax },
724         { ASM_END }
725 ];
726 PTRNTAB2[4]  aptb2OUTS = /* OUTS */ [
727         { 0x6e, _modsinot1,             _dx,            _rm8 },
728         { 0x6f, _16_bit | _I386 |_modsinot1,    _dx,            _rm16 },
729         { 0x6f, _32_bit | _I386| _modsinot1,    _dx,            _rm32 },
730         { ASM_END }
731 ];
732 
733 
734 template OPTABLE_SHIFT(opcode_t op)
735 {
736     immutable PTRNTAB2[9] OPTABLE_SHIFT =
737     [
738         { 0xd2, op,             _rm8,   _cl },
739         { 0xc0, op|_ib,         _rm8,   _imm8 },
740         { 0xd3, op|_16_bit,     _rm16,  _cl },
741         { 0xc1, op|_ib|_16_bit, _rm16,  _imm8 },
742         { 0xd3, op|_32_bit,     _rm32,  _cl },
743         { 0xc1, op|_ib|_32_bit, _rm32,  _imm8, },
744         { 0xd3, op|_64_bit,     _rm64,  _cl },
745         { 0xc1, op|_ib|_64_bit, _rm64,  _imm8, },
746         { ASM_END }
747     ];
748 }
749 
750 alias aptb2ROL = OPTABLE_SHIFT!(_0);
751 alias aptb2ROR = OPTABLE_SHIFT!(_1);
752 alias aptb2RCL = OPTABLE_SHIFT!(_2);
753 alias aptb2RCR = OPTABLE_SHIFT!(_3);
754 alias aptb2SHL = OPTABLE_SHIFT!(_4);
755 alias aptb2SHR = OPTABLE_SHIFT!(_5);
756 alias aptb2SAR = OPTABLE_SHIFT!(_7);
757 
758 
759 PTRNTAB2[13]  aptb2TEST = /* TEST */ [
760         { 0xa8, _ib|_modnot1,           _al,    _imm8 },
761         { 0xa9, _iw|_16_bit|_modnot1,   _ax,    _imm16 },
762         { 0xa9, _id|_32_bit|_modnot1,   _eax,   _imm32 },
763         { 0xa9, _id|_64_bit|_modnot1,   _rax,   _imm32 },
764         { 0xf6, _0|_modnot1,            _rm8,   _imm8 },
765         { 0xf7, _0|_16_bit|_modnot1,    _rm16,  _imm16 },
766         { 0xf7, _0|_32_bit|_modnot1,    _rm32,  _imm32 },
767         { 0xf7, _0|_64_bit|_modnot1,    _rm64,  _imm32 },
768         { 0x84, _r|_modnot1,            _rm8,   _r8 },
769         { 0x85, _r|_16_bit|_modnot1,    _rm16,  _r16 },
770         { 0x85, _r|_32_bit|_modnot1,    _rm32,  _r32 },
771         { 0x85, _r|_64_bit|_modnot1,    _rm64,  _r64 },
772         { ASM_END }
773 ];
774 PTRNTAB2[5]  aptb2XADD = /* XADD */ [                    // 486 only instruction
775 //      { 0x0fc0,       _ib | _I386|_mod2, _rm8, _r8 },
776 //      { 0x0fc1,       _iw | _I386|_16_bit|_mod2, _rm16, _r16 },
777 //      { 0x0fc1,       _id | _I386|_32_bit|_mod2, _rm32, _r32 },
778         { 0x0fc0,       _r | _I386|_mod2, _rm8, _r8 },
779         { 0x0fc1,       _r | _I386|_16_bit|_mod2, _rm16, _r16 },
780         { 0x0fc1,       _r | _I386|_32_bit|_mod2, _rm32, _r32 },
781         { 0x0fc1,       _r | _64_bit|_mod2, _rm64, _r64 },
782         { ASM_END }
783 ];
784 PTRNTAB2[13]  aptb2XCHG = /* XCHG */ [
785         { 0x90, _r|_16_bit|_mod2,       _ax ,   _r16 | _plus_r },
786         { 0x90, _r|_16_bit|_mod2,       _r16 | _plus_r, _ax  },
787         { 0x90, _r|_32_bit|_mod2,       _eax,   _r32 | _plus_r },
788         { 0x90, _r|_32_bit|_mod2,       _r32 | _plus_r, _eax },
789         { 0x86, _r|_mod2,               _rm8,   _r8 },
790         { 0x86, _r|_mod2,               _r8,    _rm8 },
791         { 0x87, _r|_16_bit|_mod2,               _rm16,  _r16 },
792         { 0x87, _r|_16_bit|_mod2,               _r16, _rm16 },
793         { 0x87, _r|_32_bit|_mod2,               _rm32,  _r32 },
794         { 0x87, _r|_32_bit|_mod2,               _r32, _rm32 },
795         { 0x87, _r|_64_bit|_mod2,               _rm64,  _r64 },
796         { 0x87, _r|_64_bit|_mod2,               _r64, _rm64 },
797         { ASM_END }
798 ];
799 
800 
801 template OPTABLE_CMOV(opcode_t op)
802 {
803     immutable PTRNTAB2[4] OPTABLE_CMOV =
804     [
805         { 0x0F40|op, _r|_16_bit,   _r16,   _rm16 },
806         { 0x0F40|op, _r|_32_bit,   _r32,   _rm32 },
807         { 0x0F40|op, _r|_64_bit,   _r64,   _rm64 },
808         { ASM_END }
809     ];
810 }
811 
812 alias aptb2CMOVO   = OPTABLE_CMOV!(0);
813 alias aptb2CMOVNO  = OPTABLE_CMOV!(1);
814 alias aptb2CMOVB   = OPTABLE_CMOV!(2);
815 alias aptb2CMOVNB  = OPTABLE_CMOV!(3);
816 alias aptb2CMOVZ   = OPTABLE_CMOV!(4);
817 alias aptb2CMOVNZ  = OPTABLE_CMOV!(5);
818 alias aptb2CMOVBE  = OPTABLE_CMOV!(6);
819 alias aptb2CMOVNBE = OPTABLE_CMOV!(7);
820 alias aptb2CMOVS   = OPTABLE_CMOV!(8);
821 alias aptb2CMOVNS  = OPTABLE_CMOV!(9);
822 alias aptb2CMOVP   = OPTABLE_CMOV!(0xA);
823 alias aptb2CMOVNP  = OPTABLE_CMOV!(0xB);
824 alias aptb2CMOVL   = OPTABLE_CMOV!(0xC);
825 alias aptb2CMOVNL  = OPTABLE_CMOV!(0xD);
826 alias aptb2CMOVLE  = OPTABLE_CMOV!(0xE);
827 alias aptb2CMOVNLE = OPTABLE_CMOV!(0xF);
828 
829 
830 PTRNTAB3[19]  aptb3IMUL = /* IMUL */ [
831         { 0x0faf,       _r|_16_bit,             _r16,   _rm16, 0 },
832         { 0x0faf,       _r|_32_bit,             _r32,   _rm32, 0 },
833         { 0x0faf,       _r|_64_bit,             _r64,   _rm64, 0 },
834         { 0xf6, _5|_modax,                      _rm8,   0, 0 },
835         { 0xf7, _5|_16_bit|_modaxdx,            _rm16,  0, 0 },
836         { 0xf7, _5|_32_bit|_modaxdx,            _rm32,  0, 0 },
837         { 0xf7, _5|_64_bit|_modaxdx,            _rm64,  0, 0 },
838         { 0x6b, _r|_ib|_16_bit,         _r16,   _imm8, 0 },
839         { 0x6b, _r|_ib|_32_bit,         _r32,   _imm8, 0 },
840         { 0x69, _r|_iw|_16_bit,         _r16,   _imm16, 0 },
841         { 0x69, _r|_id|_32_bit,         _r32,   _imm32, 0 },
842         { 0x69, _r|_id|_64_bit,         _r64,   _imm32, 0 },
843         { 0x6b, _r|_ib|_16_bit,         _r16,   _rm16,  _imm8 },
844         { 0x6b, _r|_ib|_32_bit,         _r32,   _rm32,  _imm8 },
845         { 0x6b, _r|_ib|_64_bit,         _r64,   _rm64,  _imm8 },
846         { 0x69, _r|_iw|_16_bit,         _r16,   _rm16,  _imm16 },
847         { 0x69, _r|_id|_32_bit,         _r32,   _rm32,  _imm32 },
848         { 0x69, _r|_id|_64_bit,         _r64,   _rm64,  _imm32 },
849         { ASM_END }
850 ];
851 PTRNTAB3[7]  aptb3SHLD = /* SHLD */ [
852         { 0x0fa4,       _cw|_16_bit, _rm16, _r16, _imm8 },
853         { 0x0fa4,       _cd|_32_bit, _rm32, _r32, _imm8 },
854         { 0x0fa4,       _cq|_64_bit, _rm64, _r64, _imm8 },
855         { 0x0fa5,       _cw|_16_bit, _rm16, _r16, _cl },
856         { 0x0fa5,       _cd|_32_bit, _rm32, _r32, _cl },
857         { 0x0fa5,       _cq|_64_bit, _rm64, _r64, _cl },
858         { ASM_END }
859 ];
860 PTRNTAB3[7]  aptb3SHRD = /* SHRD */ [
861         { 0x0fac,       _cw|_16_bit, _rm16, _r16, _imm8 },
862         { 0x0fac,       _cd|_32_bit, _rm32, _r32, _imm8 },
863         { 0x0fac,       _cq|_64_bit, _rm64, _r64, _imm8 },
864         { 0x0fad,       _cw|_16_bit, _rm16, _r16, _cl },
865         { 0x0fad,       _cd|_32_bit, _rm32, _r32, _cl },
866         { 0x0fad,       _cq|_64_bit, _rm64, _r64, _cl },
867         { ASM_END }
868 ];
869 //
870 // Floating point instructions which have entirely different flag
871 // interpretations
872 //
873 
874 alias aptb0F2XM1 = OPTABLE0!(    0xd9f0,0);
875 alias aptb0FABS = OPTABLE0!(     0xd9e1,0);
876 alias aptb0FCHS = OPTABLE0!(     0xd9e0,0);
877 alias aptb0FCLEX = OPTABLE0!(    0xdbe2,_fwait);
878 alias aptb0FNCLEX = OPTABLE0!(   0xdbe2, _nfwait);
879 alias aptb0FCOMPP = OPTABLE0!(   0xded9, 0);
880 alias aptb0FCOS = OPTABLE0!(     0xd9ff, 0);
881 alias aptb0FUCOMPP = OPTABLE0!(  0xdae9, 0);
882 alias aptb0FDECSTP = OPTABLE0!(  0xd9f6, 0);
883 alias aptb0FINCSTP = OPTABLE0!(  0xd9f7, 0);
884 alias aptb0FINIT = OPTABLE0!(    0xdbe3, _fwait);
885 alias aptb0FNINIT = OPTABLE0!(   0xdbe3, _nfwait);
886 alias aptb0FENI = OPTABLE0!(     0xdbe0, _fwait);
887 alias aptb0FNENI = OPTABLE0!(    0xdbe0, _nfwait);
888 alias aptb0FDISI = OPTABLE0!(    0xdbe1, _fwait);
889 alias aptb0FNDISI = OPTABLE0!(   0xdbe1, _nfwait);
890 alias aptb0FLD1 = OPTABLE0!(     0xd9e8, 0);
891 alias aptb0FLDL2T = OPTABLE0!(   0xd9e9, 0);
892 alias aptb0FLDL2E = OPTABLE0!(   0xd9ea, 0);
893 alias aptb0FLDPI = OPTABLE0!(    0xd9eb, 0);
894 alias aptb0FLDLG2 = OPTABLE0!(   0xd9ec, 0);
895 alias aptb0FLDLN2 = OPTABLE0!(   0xd9ed, 0);
896 alias aptb0FLDZ = OPTABLE0!(     0xd9ee, 0);
897 alias aptb0FNOP = OPTABLE0!(     0xd9d0, 0);
898 alias aptb0FPATAN = OPTABLE0!(   0xd9f3, 0);
899 alias aptb0FPREM = OPTABLE0!(    0xd9f8, 0);
900 alias aptb0FPREM1 = OPTABLE0!(   0xd9f5, 0);
901 alias aptb0FPTAN = OPTABLE0!(    0xd9f2, 0);
902 alias aptb0FRNDINT = OPTABLE0!(  0xd9fc, 0);
903 alias aptb0FSCALE = OPTABLE0!(   0xd9fd, 0);
904 alias aptb0FSETPM = OPTABLE0!(   0xdbe4, 0);
905 alias aptb0FSIN = OPTABLE0!(     0xd9fe, 0);
906 alias aptb0FSINCOS = OPTABLE0!(  0xd9fb, 0);
907 alias aptb0FSQRT = OPTABLE0!(    0xd9fa, 0);
908 alias aptb0FTST = OPTABLE0!(     0xd9e4, 0);
909 alias aptb0FWAIT = OPTABLE0!(    0x9b, 0);
910 alias aptb0FXAM = OPTABLE0!(     0xd9e5, 0);
911 alias aptb0FXTRACT = OPTABLE0!(  0xd9f4, 0);
912 alias aptb0FYL2X = OPTABLE0!(    0xd9f1, 0);
913 alias aptb0FYL2XP1 = OPTABLE0!(  0xd9f9, 0);
914 //
915 // Floating point instructions which have entirely different flag
916 // interpretations but they overlap, only asm_determine_operator
917 // flags needs to know the difference
918 //      1 operand floating point instructions follow
919 //
920 PTRNTAB1[2]  aptb1FBLD = /* FBLD */ [
921         { 0xdf, _4, _fm80 },
922         { ASM_END }
923 ];
924 
925 PTRNTAB1[2]  aptb1FBSTP = /* FBSTP */ [
926         { 0xdf, _6, _fm80 },
927         { ASM_END }
928 ];
929 PTRNTAB2[3]  aptb2FCMOVB = /* FCMOVB */ [
930         { 0xdac0, 0, _st, _sti | _plus_r },
931         { 0xdac1, 0, 0 },
932         { ASM_END }
933 ];
934 PTRNTAB2[3]  aptb2FCMOVE = /* FCMOVE */ [
935         { 0xdac8, 0, _st, _sti | _plus_r },
936         { 0xdac9, 0, 0 },
937         { ASM_END }
938 ];
939 PTRNTAB2[3]  aptb2FCMOVBE = /* FCMOVBE */ [
940         { 0xdad0, 0, _st, _sti | _plus_r },
941         { 0xdad1, 0, 0 },
942         { ASM_END }
943 ];
944 PTRNTAB2[3]  aptb2FCMOVU = /* FCMOVU */ [
945         { 0xdad8, 0, _st, _sti | _plus_r },
946         { 0xdad9, 0, 0 },
947         { ASM_END }
948 ];
949 PTRNTAB2[3]  aptb2FCMOVNB = /* FCMOVNB */ [
950         { 0xdbc0, 0, _st, _sti | _plus_r },
951         { 0xdbc1, 0, 0 },
952         { ASM_END }
953 ];
954 PTRNTAB2[3]  aptb2FCMOVNE = /* FCMOVNE */ [
955         { 0xdbc8, 0, _st, _sti | _plus_r },
956         { 0xdbc9, 0, 0 },
957         { ASM_END }
958 ];
959 PTRNTAB2[3]  aptb2FCMOVNBE = /* FCMOVNBE */ [
960         { 0xdbd0, 0, _st, _sti | _plus_r },
961         { 0xdbd1, 0, 0 },
962         { ASM_END }
963 ];
964 PTRNTAB2[3]  aptb2FCMOVNU = /* FCMOVNU */ [
965         { 0xdbd8, 0, _st, _sti | _plus_r },
966         { 0xdbd9, 0, 0 },
967         { ASM_END }
968 ];
969 PTRNTAB1[5]  aptb1FCOM = /* FCOM */ [
970         { 0xd8, _2, _m32 },
971         { 0xdc, _2, _fm64 },
972         { 0xd8d0, 0, _sti | _plus_r },
973         { 0xd8d1, 0, 0 },
974         { ASM_END }
975 ];
976 
977 PTRNTAB2[4]  aptb2FCOMI = /* FCOMI */ [
978         { 0xdbf0, 0, _st, _sti | _plus_r },
979         { 0xdbf0, 0, _sti | _plus_r, 0 },
980         { 0xdbf1, 0, 0, 0 },
981         { ASM_END }
982 ];
983 PTRNTAB2[4]  aptb2FCOMIP = /* FCOMIP */ [
984         { 0xdff0, 0, _st, _sti | _plus_r },
985         { 0xdff0, 0, _sti | _plus_r, 0 },
986         { 0xdff1, 0, 0, 0 },
987         { ASM_END }
988 ];
989 PTRNTAB2[4]  aptb2FUCOMI = /* FUCOMI */ [
990         { 0xdbe8, 0, _st, _sti | _plus_r },
991         { 0xdbe8, 0, _sti | _plus_r, 0 },
992         { 0xdbe9, 0, 0, 0 },
993         { ASM_END }
994 ];
995 PTRNTAB2[4]  aptb2FUCOMIP = /* FUCOMIP */ [
996         { 0xdfe8, 0, _st, _sti | _plus_r },
997         { 0xdfe8, 0, _sti | _plus_r, 0 },
998         { 0xdfe9, 0, 0, 0 },
999         { ASM_END }
1000 ];
1001 
1002 PTRNTAB1[5]  aptb1FCOMP = /* FCOMP */ [
1003         { 0xd8, _3, _m32 },
1004         { 0xdc, _3, _fm64 },
1005         { 0xd8d8, 0, _sti | _plus_r },
1006         { 0xd8d9, 0, 0 },
1007         { ASM_END }
1008 ];
1009 PTRNTAB1[2]  aptb1FFREE = /* FFREE */ [
1010         { 0xddc0,       0,      _sti | _plus_r },
1011         { ASM_END }
1012 ];
1013 PTRNTAB1[3]  aptb1FICOM = /* FICOM */ [
1014         { 0xde, _2, _m16 },
1015         { 0xda, _2, _m32 },
1016         { ASM_END }
1017 ];
1018 PTRNTAB1[3]  aptb1FICOMP = /* FICOMP */ [
1019         { 0xde, _3, _m16 },
1020         { 0xda, _3, _m32 },
1021         { ASM_END }
1022 ];
1023 PTRNTAB1[4]  aptb1FILD = /* FILD */ [
1024         { 0xdf, _0, _m16 },
1025         { 0xdb, _0, _m32 },
1026         { 0xdf, _5, _fm64 },
1027         { ASM_END }
1028 ];
1029 PTRNTAB1[3]  aptb1FIST = /* FIST */ [
1030         { 0xdf, _2, _m16 },
1031         { 0xdb, _2, _m32 },
1032         { ASM_END }
1033 ];
1034 PTRNTAB1[4]  aptb1FISTP = /* FISTP */ [
1035         { 0xdf, _3, _m16 },
1036         { 0xdb, _3, _m32 },
1037         { 0xdf, _7, _fm64 },
1038         { ASM_END }
1039 ];
1040 PTRNTAB1[5]  aptb1FLD = /* FLD */ [
1041         { 0xd9, _0, _m32 },
1042         { 0xdd, _0, _fm64 },
1043         { 0xdb, _5, _fm80 },
1044         { 0xd9c0, 0, _sti | _plus_r },
1045         { ASM_END }
1046 ];
1047 PTRNTAB1[2]  aptb1FLDCW = /* FLDCW */ [
1048         { 0xd9, _5, _m16 },
1049         { ASM_END }
1050 ];
1051 PTRNTAB1[2]  aptb1FLDENV = /* FLDENV */ [
1052         { 0xd9, _4, _m112 | _m224 },
1053         { ASM_END }
1054 ];
1055 PTRNTAB1[2]  aptb1FRSTOR = /* FRSTOR */ [
1056         { 0xdd, _4, _m112 | _m224 },
1057         { ASM_END }
1058 ];
1059 PTRNTAB1[2]  aptb1FSAVE = /* FSAVE */ [
1060         { 0xdd, _6 | _fwait, _m112 | _m224 },
1061         { ASM_END }
1062 ];
1063 PTRNTAB1[2]  aptb1FNSAVE = /* FNSAVE */ [
1064         { 0xdd, _6 | _nfwait, _m112 | _m224 },
1065         { ASM_END }
1066 ];
1067 PTRNTAB1[4]  aptb1FST = /* FST */ [
1068         { 0xd9, _2, _m32 },
1069         { 0xdd, _2, _fm64 },
1070         { 0xddd0, 0, _sti | _plus_r },
1071         { ASM_END }
1072 ];
1073 
1074 PTRNTAB1[5]  aptb1FSTP = /* FSTP */ [
1075         { 0xd9, _3, _m32 },
1076         { 0xdd, _3, _fm64 },
1077         { 0xdb, _7, _fm80 },
1078         { 0xddd8, 0, _sti | _plus_r },
1079         { ASM_END }
1080 ];
1081 PTRNTAB1[2]  aptb1FSTCW = /* FSTCW */ [
1082         { 0xd9, _7 | _fwait , _m16 },
1083         { ASM_END }
1084 ];
1085 PTRNTAB1[2]  aptb1FNSTCW = /* FNSTCW */ [
1086         { 0xd9, _7 | _nfwait , _m16 },
1087         { ASM_END }
1088 ];
1089 PTRNTAB1[2]  aptb1FSTENV = /* FSTENV */ [
1090         { 0xd9, _6 | _fwait, _m112 | _m224 },
1091         { ASM_END }
1092 ];
1093 PTRNTAB1[2]  aptb1FNSTENV = /* FNSTENV */ [
1094         { 0xd9, _6 | _nfwait, _m112 | _m224 },
1095         { ASM_END }
1096 ];
1097 PTRNTAB1[3]  aptb1FSTSW = /* FSTSW */ [
1098         { 0xdd, _7 | _fwait, _m16 },
1099         { 0xdfe0, _fwait | _modax, _ax },
1100         { ASM_END }
1101 ];
1102 PTRNTAB1[3]  aptb1FNSTSW = /* FNSTSW */ [
1103         { 0xdd, _7 | _nfwait, _m16 },
1104         { 0xdfe0, _nfwait | _modax, _ax },
1105         { ASM_END }
1106 ];
1107 PTRNTAB1[3]  aptb1FUCOM = /* FUCOM */ [
1108         { 0xdde0, 0, _sti | _plus_r },
1109         { 0xdde1, 0, 0 },
1110         { ASM_END }
1111 ];
1112 PTRNTAB1[3]  aptb1FUCOMP = /* FUCOMP */ [
1113         { 0xdde8, 0, _sti | _plus_r },
1114         { 0xdde9, 0, 0 },
1115         { ASM_END }
1116 ];
1117 PTRNTAB1[3]  aptb1FXCH = /* FXCH */ [
1118         { 0xd9c8, 0, _sti | _plus_r },
1119         { 0xd9c9, 0, 0 },
1120         { ASM_END }
1121 ];
1122 //
1123 // Floating point instructions which have entirely different flag
1124 // interpretations but they overlap, only asm_determine_operator
1125 // flags needs to know the difference
1126 //      2 operand floating point instructions follow
1127 //
1128 PTRNTAB2[6]  aptb2FADD = /* FADD */ [
1129         { 0xd8, _0, _m32, 0 },
1130         { 0xdc, _0, _fm64, 0 },
1131         { 0xd8c0, 0, _st, _sti | _plus_r },
1132         { 0xdcc0, 0, _sti | _plus_r, _st },
1133         { 0xdec1, 0, 0, 0 },
1134         { ASM_END }
1135 ];
1136 
1137 PTRNTAB2[3]  aptb2FADDP = /* FADDP */ [
1138         { 0xdec0, 0, _sti | _plus_r, _st },
1139         { 0xdec1, 0, 0, 0 },
1140         { ASM_END }
1141 ];
1142 PTRNTAB2[3]  aptb2FIADD = /* FIADD */ [
1143         { 0xda, _0, _m32, 0 },
1144         { 0xde, _0, _m16, 0 },
1145         { ASM_END }
1146 ];
1147 PTRNTAB2[6]  aptb2FDIV = /* FDIV */ [
1148         { 0xd8, _6, _m32, 0 },
1149         { 0xdc, _6, _fm64, 0 },
1150         { 0xd8f0, 0, _st, _sti | _plus_r },
1151         { 0xdcf8, 0, _sti | _plus_r, _st },
1152         { 0xdef9, 0, 0, 0 },
1153         { ASM_END }
1154 ];
1155 PTRNTAB2[3]  aptb2FDIVP = /* FDIVP */ [
1156         { 0xdef9, 0, 0, 0 },
1157         { 0xdef8, 0, _sti | _plus_r, _st },
1158         { ASM_END }
1159 ];
1160 PTRNTAB2[3]  aptb2FIDIV = /* FIDIV */ [
1161         { 0xda, _6,  _m32, 0 },
1162         { 0xde, _6,  _m16, 0 },
1163         { ASM_END }
1164 ];
1165 PTRNTAB2[6]  aptb2FDIVR = /* FDIVR */ [
1166         { 0xd8, _7, _m32, 0 },
1167         { 0xdc, _7, _fm64, 0 },
1168         { 0xd8f8, 0, _st, _sti | _plus_r },
1169         { 0xdcf0, 0, _sti | _plus_r, _st },
1170         { 0xdef1, 0, 0, 0 },
1171         { ASM_END }
1172 ];
1173 PTRNTAB2[3]  aptb2FDIVRP = /* FDIVRP */ [
1174         { 0xdef1, 0, 0, 0 },
1175         { 0xdef0, 0, _sti | _plus_r, _st },
1176         { ASM_END }
1177 ];
1178 PTRNTAB2[3]  aptb2FIDIVR = /* FIDIVR */ [
1179         { 0xda, _7,  _m32, 0 },
1180         { 0xde, _7,  _m16, 0 },
1181         { ASM_END }
1182 ];
1183 PTRNTAB2[6]  aptb2FMUL = /* FMUL */ [
1184         { 0xd8, _1, _m32, 0 },
1185         { 0xdc, _1, _fm64, 0 },
1186         { 0xd8c8, 0, _st, _sti | _plus_r },
1187         { 0xdcc8, 0, _sti | _plus_r, _st },
1188         { 0xdec9, 0, 0, 0 },
1189         { ASM_END }
1190 ];
1191 PTRNTAB2[3]  aptb2FMULP = /* FMULP */ [
1192         { 0xdec8, 0, _sti | _plus_r, _st },
1193         { 0xdec9, 0, 0, 0 },
1194         { ASM_END }
1195 ];
1196 PTRNTAB2[3]  aptb2FIMUL = /* FIMUL */ [
1197         { 0xda, _1, _m32, 0 },
1198         { 0xde, _1, _m16, 0 },
1199         { ASM_END }
1200 ];
1201 PTRNTAB2[6]  aptb2FSUB = /* FSUB */ [
1202         { 0xd8, _4, _m32, 0 },
1203         { 0xdc, _4, _fm64, 0 },
1204         { 0xd8e0, 0, _st, _sti | _plus_r },
1205         { 0xdce8, 0, _sti | _plus_r, _st },
1206         { 0xdee9, 0, 0, 0 },
1207         { ASM_END }
1208 ];
1209 PTRNTAB2[3]  aptb2FSUBP = /* FSUBP */ [
1210         { 0xdee8, 0, _sti | _plus_r, _st },
1211         { 0xdee9, 0, 0, 0 },
1212         { ASM_END }
1213 ];
1214 PTRNTAB2[3]  aptb2FISUB = /* FISUB */ [
1215         { 0xda, _4, _m32, 0 },
1216         { 0xde, _4, _m16, 0 },
1217         { ASM_END }
1218 ];
1219 PTRNTAB2[6]  aptb2FSUBR = /* FSUBR */ [
1220         { 0xd8, _5, _m32, 0 },
1221         { 0xdc, _5, _fm64, 0 },
1222         { 0xd8e8, 0, _st, _sti | _plus_r },
1223         { 0xdce0, 0, _sti | _plus_r, _st },
1224         { 0xdee1, 0, 0, 0 },
1225         { ASM_END }
1226 ];
1227 PTRNTAB2[3]  aptb2FSUBRP = /* FSUBRP */ [
1228         { 0xdee0, 0, _sti | _plus_r, _st },
1229         { 0xdee1, 0, 0, 0 },
1230         { ASM_END }
1231 ];
1232 PTRNTAB2[3]  aptb2FISUBR = /* FISUBR */ [
1233         { 0xda, _5, _m32, 0 },
1234         { 0xde, _5, _m16, 0 },
1235         { ASM_END }
1236 ];
1237 
1238 ///////////////////////////// MMX Extensions /////////////////////////
1239 
1240 PTRNTAB0[1] aptb0EMMS = /* EMMS */ [
1241         { 0x0F77, 0 }
1242 ];
1243 
1244 PTRNTAB2[5] aptb2MOVD = /* MOVD */ [
1245         { 0x0F6E,_r,_mm,_rm32 },
1246         { 0x0F7E,_r,_rm32,_mm },
1247         { LODD,_r,_xmm,_rm32 },
1248         { STOD,_r,_rm32,_xmm },
1249         { ASM_END }
1250 ];
1251 
1252 PTRNTAB2[3] aptb2VMOVD = /* VMOVD */ [
1253         { VEX_128_WIG(LODD), _r, _xmm, _rm32 },
1254         { VEX_128_WIG(STOD), _r, _rm32, _xmm },
1255         { ASM_END }
1256 ];
1257 
1258 PTRNTAB2[9] aptb2MOVQ = /* MOVQ */ [
1259         { 0x0F6F,_r,_mm,_mmm64 },
1260         { 0x0F7F,_r,_mmm64,_mm },
1261         { LODQ,_r,_xmm,_xmm_m64 },
1262         { STOQ,_r,_xmm_m64,_xmm },
1263         { 0x0F6E,  _r|_64_bit,_mm,  _rm64 },
1264         { 0x0F7E,  _r|_64_bit,_rm64,_mm   },
1265         { LODD,_r|_64_bit,_xmm, _rm64 },
1266         { STOD,_r|_64_bit,_rm64,_xmm  },
1267         { ASM_END }
1268 ];
1269 
1270 PTRNTAB2[3] aptb2VMOVQ = /* VMOVQ */ [
1271         { VEX_128_W1(LODD), _r, _xmm, _rm64 },
1272         { VEX_128_W1(STOD), _r, _rm64, _xmm },
1273         { ASM_END }
1274 ];
1275 
1276 PTRNTAB2[3] aptb2PACKSSDW = /* PACKSSDW */ [
1277         { 0x0F6B, _r,_mm,_mmm64 },
1278         { PACKSSDW, _r,_xmm,_xmm_m128 },
1279         { ASM_END }
1280 ];
1281 
1282 PTRNTAB3[2] aptb3VPACKSSDW = /* VPACKSSDW */ [
1283         { VEX_NDS_128_WIG(PACKSSDW), _r,_xmm,_xmm,_xmm_m128 },
1284         { ASM_END }
1285 ];
1286 
1287 PTRNTAB2[3] aptb2PACKSSWB = /* PACKSSWB */ [
1288         { 0x0F63, _r,_mm,_mmm64 },
1289         { PACKSSWB, _r,_xmm,_xmm_m128 },
1290         { ASM_END }
1291 ];
1292 
1293 PTRNTAB3[2] aptb3VPACKSSWB = /* VPACKSSWB */ [
1294         { VEX_NDS_128_WIG(PACKSSWB), _r,_xmm,_xmm,_xmm_m128 },
1295         { ASM_END }
1296 ];
1297 
1298 PTRNTAB2[3] aptb2PACKUSWB = /* PACKUSWB */ [
1299         { 0x0F67, _r,_mm,_mmm64 },
1300         { PACKUSWB, _r,_xmm,_xmm_m128 },
1301         { ASM_END }
1302 ];
1303 
1304 PTRNTAB3[2] aptb3VPACKUSWB = /* VPACKUSWB */ [
1305         { VEX_NDS_128_WIG(PACKUSWB), _r,_xmm,_xmm,_xmm_m128 },
1306         { ASM_END }
1307 ];
1308 
1309 PTRNTAB2[3] aptb2PADDB = /* PADDB */ [
1310         { 0x0FFC, _r,_mm,_mmm64 },
1311         { PADDB, _r,_xmm,_xmm_m128 },
1312         { ASM_END }
1313 ];
1314 
1315 PTRNTAB3[2] aptb3VPADDB = /* VPADDB */ [
1316         { VEX_NDS_128_WIG(PADDB), _r, _xmm, _xmm, _xmm_m128 },
1317         { ASM_END }
1318 ];
1319 
1320 PTRNTAB2[3] aptb2PADDD = /* PADDD */ [
1321         { 0x0FFE, _r,_mm,_mmm64 },
1322         { PADDD, _r,_xmm,_xmm_m128 },
1323         { ASM_END }
1324 ];
1325 
1326 PTRNTAB3[2] aptb3VPADDD = /* VPADDD */ [
1327         { VEX_NDS_128_WIG(PADDD), _r, _xmm, _xmm, _xmm_m128 },
1328         { ASM_END }
1329 ];
1330 
1331 PTRNTAB2[3] aptb2PADDSB = /* PADDSB */ [
1332         { 0x0FEC, _r,_mm,_mmm64 },
1333         { PADDSB, _r,_xmm,_xmm_m128 },
1334         { ASM_END }
1335 ];
1336 
1337 PTRNTAB3[2] aptb3VPADDSB = /* VPADDSB */ [
1338         { VEX_NDS_128_WIG(PADDSB), _r, _xmm, _xmm, _xmm_m128 },
1339         { ASM_END }
1340 ];
1341 
1342 PTRNTAB2[3] aptb2PADDSW = /* PADDSW */ [
1343         { 0x0FED, _r,_mm,_mmm64 },
1344         { PADDSW, _r,_xmm,_xmm_m128 },
1345         { ASM_END }
1346 ];
1347 
1348 PTRNTAB3[2] aptb3VPADDSW = /* VPADDSW */ [
1349         { VEX_NDS_128_WIG(PADDSW), _r, _xmm, _xmm, _xmm_m128 },
1350         { ASM_END }
1351 ];
1352 
1353 PTRNTAB2[3] aptb2PADDUSB = /* PADDUSB */ [
1354         { 0x0FDC, _r,_mm,_mmm64 },
1355         { PADDUSB, _r,_xmm,_xmm_m128 },
1356         { ASM_END }
1357 ];
1358 
1359 PTRNTAB3[2] aptb3VPADDUSB = /* VPADDUSB */ [
1360         { VEX_NDS_128_WIG(PADDUSB), _r, _xmm, _xmm, _xmm_m128 },
1361         { ASM_END }
1362 ];
1363 
1364 PTRNTAB2[3] aptb2PADDUSW = /* PADDUSW */ [
1365         { 0x0FDD, _r,_mm,_mmm64 },
1366         { PADDUSW, _r,_xmm,_xmm_m128 },
1367         { ASM_END }
1368 ];
1369 
1370 PTRNTAB3[2] aptb3VPADDUSW = /* VPADDUSW */ [
1371         { VEX_NDS_128_WIG(PADDUSW), _r, _xmm, _xmm, _xmm_m128 },
1372         { ASM_END }
1373 ];
1374 
1375 PTRNTAB2[3] aptb2PADDW = /* PADDW */ [
1376         { 0x0FFD, _r,_mm,_mmm64 },
1377         { PADDW, _r,_xmm,_xmm_m128 },
1378         { ASM_END }
1379 ];
1380 
1381 PTRNTAB3[2] aptb3VPADDW = /* VPADDW */ [
1382         { VEX_NDS_128_WIG(PADDW), _r, _xmm, _xmm, _xmm_m128 },
1383         { ASM_END }
1384 ];
1385 
1386 PTRNTAB2[3] aptb2PAND = /* PAND */ [
1387         { 0x0FDB, _r,_mm,_mmm64 },
1388         { PAND, _r,_xmm,_xmm_m128 },
1389         { ASM_END }
1390 ];
1391 
1392 PTRNTAB3[2] aptb3VPAND = /* VPAND */ [
1393         { VEX_NDS_128_WIG(PAND), _r,_xmm,_xmm,_xmm_m128 },
1394         { ASM_END }
1395 ];
1396 
1397 PTRNTAB2[3] aptb2PANDN = /* PANDN */ [
1398         { 0x0FDF, _r,_mm,_mmm64 },
1399         { PANDN, _r,_xmm,_xmm_m128 },
1400         { ASM_END }
1401 ];
1402 
1403 PTRNTAB3[2] aptb3VPANDN = /* VPANDN */ [
1404         { VEX_NDS_128_WIG(PANDN), _r,_xmm,_xmm,_xmm_m128 },
1405         { ASM_END }
1406 ];
1407 
1408 PTRNTAB2[3] aptb2PCMPEQB = /* PCMPEQB */ [
1409         { 0x0F74, _r,_mm,_mmm64 },
1410         { PCMPEQB, _r,_xmm,_xmm_m128 },
1411         { ASM_END }
1412 ];
1413 
1414 PTRNTAB3[2] aptb3VPCMPEQB = /* VPCMPEQB */ [
1415         { VEX_NDS_128_WIG(PCMPEQB), _r, _xmm, _xmm, _xmm_m128 },
1416         { ASM_END }
1417 ];
1418 
1419 PTRNTAB2[3] aptb2PCMPEQD = /* PCMPEQD */ [
1420         { 0x0F76, _r,_mm,_mmm64 },
1421         { PCMPEQD, _r,_xmm,_xmm_m128 },
1422         { ASM_END }
1423 ];
1424 
1425 PTRNTAB3[2] aptb3VPCMPEQD = /* VPCMPEQD */ [
1426         { VEX_NDS_128_WIG(PCMPEQD), _r, _xmm, _xmm, _xmm_m128 },
1427         { ASM_END }
1428 ];
1429 
1430 PTRNTAB2[3] aptb2PCMPEQW = /* PCMPEQW */ [
1431         { 0x0F75, _r,_mm,_mmm64 },
1432         { PCMPEQW, _r,_xmm,_xmm_m128 },
1433         { ASM_END }
1434 ];
1435 
1436 PTRNTAB3[2] aptb3VPCMPEQW = /* VPCMPEQW */ [
1437         { VEX_NDS_128_WIG(PCMPEQW), _r, _xmm, _xmm, _xmm_m128 },
1438         { ASM_END }
1439 ];
1440 
1441 PTRNTAB2[3] aptb2PCMPGTB = /* PCMPGTB */ [
1442         { 0x0F64, _r,_mm,_mmm64 },
1443         { PCMPGTB, _r,_xmm,_xmm_m128 },
1444         { ASM_END }
1445 ];
1446 
1447 PTRNTAB3[2] aptb3VPCMPGTB = /* VPCMPGTB */ [
1448         { VEX_NDS_128_WIG(PCMPGTB), _r, _xmm, _xmm, _xmm_m128 },
1449         { ASM_END }
1450 ];
1451 
1452 PTRNTAB2[3] aptb2PCMPGTD = /* PCMPGTD */ [
1453         { 0x0F66, _r,_mm,_mmm64 },
1454         { PCMPGTD, _r,_xmm,_xmm_m128 },
1455         { ASM_END }
1456 ];
1457 
1458 PTRNTAB3[2] aptb3VPCMPGTD = /* VPCMPGTD */ [
1459         { VEX_NDS_128_WIG(PCMPGTD), _r, _xmm, _xmm, _xmm_m128 },
1460         { ASM_END }
1461 ];
1462 
1463 PTRNTAB2[3] aptb2PCMPGTW = /* PCMPGTW */ [
1464         { 0x0F65, _r,_mm,_mmm64 },
1465         { PCMPGTW, _r,_xmm,_xmm_m128 },
1466         { ASM_END }
1467 ];
1468 
1469 PTRNTAB3[2] aptb3VPCMPGTW = /* VPCMPGTW */ [
1470         { VEX_NDS_128_WIG(PCMPGTW), _r, _xmm, _xmm, _xmm_m128 },
1471         { ASM_END }
1472 ];
1473 
1474 PTRNTAB2[3] aptb2PMADDWD = /* PMADDWD */ [
1475         { 0x0FF5, _r,_mm,_mmm64 },
1476         { PMADDWD, _r,_xmm,_xmm_m128 },
1477         { ASM_END }
1478 ];
1479 
1480 PTRNTAB3[2] aptb3VPMADDWD = /* VPMADDWD */ [
1481         { VEX_NDS_128_WIG(PMADDWD), _r, _xmm, _xmm, _xmm_m128 },
1482         { ASM_END }
1483 ];
1484 
1485 PTRNTAB2[5] aptb2PSLLW = /* PSLLW */ [
1486         { 0x0FF1, _r,_mm,_mmm64 },
1487         { 0x0F71, _6,_mm,_imm8 },
1488         { PSLLW, _r,_xmm,_xmm_m128 },
1489         { 0x660F71, _6,_xmm,_imm8 },
1490         { ASM_END }
1491 ];
1492 
1493 PTRNTAB3[3] aptb3VPSLLW = /* VPSLLW */ [
1494         { VEX_NDS_128_WIG(PSLLW), _r, _xmm, _xmm, _xmm_m128 },
1495         { VEX_NDD_128_WIG(0x660F71), _6, _xmm, _xmm, _imm8 },
1496         { ASM_END }
1497 ];
1498 
1499 PTRNTAB2[5] aptb2PSLLD = /* PSLLD */ [
1500         { 0x0FF2, _r,_mm,_mmm64 },
1501         { 0x0F72, _6,_mm,_imm8 },
1502         { PSLLD, _r,_xmm,_xmm_m128 },
1503         { 0x660F72, _6,_xmm,_imm8 },
1504         { ASM_END }
1505 ];
1506 
1507 PTRNTAB3[3] aptb3VPSLLD = /* VPSLLD */ [
1508         { VEX_NDS_128_WIG(PSLLD), _r, _xmm, _xmm, _xmm_m128 },
1509         { VEX_NDD_128_WIG(0x660F72), _6, _xmm, _xmm, _imm8 },
1510         { ASM_END }
1511 ];
1512 
1513 PTRNTAB2[5] aptb2PSLLQ = /* PSLLQ */ [
1514         { 0x0FF3, _r,_mm,_mmm64 },
1515         { 0x0F73, _6,_mm,_imm8 },
1516         { PSLLQ, _r,_xmm,_xmm_m128 },
1517         { PSLLDQ & 0xFFFFFF, _6,_xmm,_imm8 },
1518         { ASM_END }
1519 ];
1520 
1521 PTRNTAB3[3] aptb3VPSLLQ = /* VPSLLQ */ [
1522         { VEX_NDS_128_WIG(PSLLQ), _r, _xmm, _xmm, _xmm_m128 },
1523         { VEX_NDD_128_WIG((PSLLDQ & 0xFFFFFF)), _6, _xmm, _xmm, _imm8 },
1524         { ASM_END }
1525 ];
1526 
1527 PTRNTAB2[5] aptb2PSRAW = /* PSRAW */ [
1528         { 0x0FE1, _r,_mm,_mmm64 },
1529         { 0x0F71, _4,_mm,_imm8 },
1530         { PSRAW, _r,_xmm,_xmm_m128 },
1531         { 0x660F71, _4,_xmm,_imm8 },
1532         { ASM_END }
1533 ];
1534 
1535 PTRNTAB3[3] aptb3VPSRAW = /* VPSRAW */ [
1536         { VEX_NDS_128_WIG(PSRAW), _r, _xmm, _xmm, _xmm_m128 },
1537         { VEX_NDD_128_WIG(0x660F71), _4, _xmm, _xmm, _imm8 },
1538         { ASM_END }
1539 ];
1540 
1541 PTRNTAB2[5] aptb2PSRAD = /* PSRAD */ [
1542         { 0x0FE2, _r,_mm,_mmm64 },
1543         { 0x0F72, _4,_mm,_imm8 },
1544         { PSRAD, _r,_xmm,_xmm_m128 },
1545         { 0x660F72, _4,_xmm,_imm8 },
1546         { ASM_END }
1547 ];
1548 
1549 PTRNTAB3[3] aptb3VPSRAD = /* VPSRAD */ [
1550         { VEX_NDS_128_WIG(PSRAD), _r, _xmm, _xmm, _xmm_m128 },
1551         { VEX_NDD_128_WIG(0x660F72), _4, _xmm, _xmm, _imm8 },
1552         { ASM_END }
1553 ];
1554 
1555 PTRNTAB2[5] aptb2PSRLW = /* PSRLW */ [
1556         { 0x0FD1, _r,_mm,_mmm64 },
1557         { 0x0F71, _2,_mm,_imm8 },
1558         { PSRLW, _r,_xmm,_xmm_m128 },
1559         { 0x660F71, _2,_xmm,_imm8 },
1560         { ASM_END }
1561 ];
1562 
1563 PTRNTAB3[3] aptb3VPSRLW = /* VPSRLW */ [
1564         { VEX_NDS_128_WIG(PSRLW), _r, _xmm, _xmm, _xmm_m128 },
1565         { VEX_NDD_128_WIG(0x660F71), _2, _xmm, _xmm, _imm8 },
1566         { ASM_END }
1567 ];
1568 
1569 PTRNTAB2[5] aptb2PSRLD = /* PSRLD */ [
1570         { 0x0FD2, _r,_mm,_mmm64 },
1571         { 0x0F72, _2,_mm,_imm8 },
1572         { PSRLD, _r,_xmm,_xmm_m128 },
1573         { 0x660F72, _2,_xmm,_imm8 },
1574         { ASM_END }
1575 ];
1576 
1577 PTRNTAB3[3] aptb3VPSRLD = /* VPSRLD */ [
1578         { VEX_NDS_128_WIG(PSRLD), _r, _xmm, _xmm, _xmm_m128 },
1579         { VEX_NDD_128_WIG(0x660F72), _2, _xmm, _xmm, _imm8 },
1580         { ASM_END }
1581 ];
1582 
1583 PTRNTAB2[5] aptb2PSRLQ = /* PSRLQ */ [
1584         { 0x0FD3, _r,_mm,_mmm64 },
1585         { 0x0F73, _2,_mm,_imm8 },
1586         { PSRLQ, _r,_xmm,_xmm_m128 },
1587         { (PSLLDQ & 0xFFFFFF), _2,_xmm,_imm8 },
1588         { ASM_END }
1589 ];
1590 
1591 PTRNTAB3[3] aptb3VPSRLQ = /* VPSRLQ */ [
1592         { VEX_NDS_128_WIG(PSRLQ), _r, _xmm, _xmm, _xmm_m128 },
1593         { VEX_NDD_128_WIG((PSLLDQ & 0xFFFFFF)), _2, _xmm, _xmm, _imm8 },
1594         { ASM_END }
1595 ];
1596 
1597 PTRNTAB2[3] aptb2PSUBB = /* PSUBB */ [
1598         { 0x0FF8, _r,_mm,_mmm64 },
1599         { PSUBB, _r,_xmm,_xmm_m128 },
1600         { ASM_END }
1601 ];
1602 
1603 PTRNTAB3[2] aptb3VPSUBB = /* VPSUBB */ [
1604         { VEX_NDS_128_WIG(PSUBB), _r, _xmm, _xmm, _xmm_m128 },
1605         { ASM_END }
1606 ];
1607 
1608 PTRNTAB2[3] aptb2PSUBD = /* PSUBD */ [
1609         { 0x0FFA, _r,_mm,_mmm64 },
1610         { PSUBD, _r,_xmm,_xmm_m128 },
1611         { ASM_END }
1612 ];
1613 
1614 PTRNTAB3[2] aptb3VPSUBD = /* VPSUBD */ [
1615         { VEX_NDS_128_WIG(PSUBD), _r, _xmm, _xmm, _xmm_m128 },
1616         { ASM_END }
1617 ];
1618 
1619 PTRNTAB2[3] aptb2PSUBSB = /* PSUBSB */ [
1620         { 0x0FE8, _r,_mm,_mmm64 },
1621         { PSUBSB, _r,_xmm,_xmm_m128 },
1622         { ASM_END }
1623 ];
1624 
1625 PTRNTAB3[2] aptb3VPSUBSB  = /* VPSUBSB  */ [
1626         { VEX_NDS_128_WIG(PSUBSB), _r, _xmm, _xmm, _xmm_m128 },
1627         { ASM_END }
1628 ];
1629 
1630 PTRNTAB2[3] aptb2PSUBSW = /* PSUBSW */ [
1631         { 0x0FE9, _r,_mm,_mmm64 },
1632         { PSUBSW, _r,_xmm,_xmm_m128 },
1633         { ASM_END }
1634 ];
1635 
1636 PTRNTAB3[2] aptb3VPSUBSW = /* VPSUBSW */ [
1637         { VEX_NDS_128_WIG(PSUBSW), _r, _xmm, _xmm, _xmm_m128 },
1638         { ASM_END }
1639 ];
1640 
1641 PTRNTAB2[3] aptb2PSUBUSB = /* PSUBUSB */ [
1642         { 0x0FD8, _r,_mm,_mmm64 },
1643         { PSUBUSB, _r,_xmm,_xmm_m128 },
1644         { ASM_END }
1645 ];
1646 
1647 PTRNTAB3[2] aptb3VPSUBUSB = /* VPSUBUSB */ [
1648         { VEX_NDS_128_WIG(PSUBUSB), _r, _xmm, _xmm, _xmm_m128 },
1649         { ASM_END }
1650 ];
1651 
1652 PTRNTAB2[3] aptb2PSUBUSW = /* PSUBUSW */ [
1653         { 0x0FD9, _r,_mm,_mmm64 },
1654         { PSUBUSW, _r,_xmm,_xmm_m128 },
1655         { ASM_END }
1656 ];
1657 
1658 PTRNTAB3[2] aptb3VPSUBUSW = /* VPSUBUSW */ [
1659         { VEX_NDS_128_WIG(PSUBUSW), _r, _xmm, _xmm, _xmm_m128 },
1660         { ASM_END }
1661 ];
1662 
1663 
1664 PTRNTAB2[3] aptb2PSUBW = /* PSUBW */ [
1665         { 0x0FF9, _r,_mm,_mmm64 },
1666         { PSUBW, _r,_xmm,_xmm_m128 },
1667         { ASM_END }
1668 ];
1669 
1670 PTRNTAB3[2] aptb3VPSUBW = /* VPSUBW */ [
1671         { VEX_NDS_128_WIG(PSUBW), _r, _xmm, _xmm, _xmm_m128 },
1672         { ASM_END }
1673 ];
1674 
1675 PTRNTAB2[3] aptb2PUNPCKHBW = /* PUNPCKHBW */ [
1676         { 0x0F68, _r,_mm,_mmm64 },
1677         { PUNPCKHBW, _r,_xmm,_xmm_m128 },
1678         { ASM_END }
1679 ];
1680 
1681 PTRNTAB3[2] aptb3VPUNPCKHBW = /* VPUNPCKHBW */ [
1682         { VEX_NDS_128_WIG(PUNPCKHBW), _r,_xmm,_xmm,_xmm_m128 },
1683         { ASM_END }
1684 ];
1685 
1686 PTRNTAB2[3] aptb2PUNPCKHDQ = /* PUNPCKHDQ */ [
1687         { 0x0F6A, _r,_mm,_mmm64 },
1688         { PUNPCKHDQ, _r,_xmm,_xmm_m128 },
1689         { ASM_END }
1690 ];
1691 
1692 PTRNTAB3[2] aptb3VPUNPCKHDQ = /* VPUNPCKHDQ */ [
1693         { VEX_NDS_128_WIG(PUNPCKHDQ), _r,_xmm,_xmm,_xmm_m128 },
1694         { ASM_END }
1695 ];
1696 
1697 PTRNTAB2[3] aptb2PUNPCKHWD = /* PUNPCKHWD */ [
1698         { 0x0F69, _r,_mm,_mmm64 },
1699         { PUNPCKHWD, _r,_xmm,_xmm_m128 },
1700         { ASM_END }
1701 ];
1702 
1703 PTRNTAB3[2] aptb3VPUNPCKHWD = /* VPUNPCKHWD */ [
1704         { VEX_NDS_128_WIG(PUNPCKHWD), _r,_xmm,_xmm,_xmm_m128 },
1705         { ASM_END }
1706 ];
1707 
1708 PTRNTAB2[3] aptb2PUNPCKLBW = /* PUNPCKLBW */ [
1709         { 0x0F60, _r,_mm,_mmm64 },
1710         { PUNPCKLBW, _r,_xmm,_xmm_m128 },
1711         { ASM_END }
1712 ];
1713 
1714 PTRNTAB3[2] aptb3VPUNPCKLBW = /* VPUNPCKLBW */ [
1715         { VEX_NDS_128_WIG(PUNPCKLBW), _r,_xmm,_xmm,_xmm_m128 },
1716         { ASM_END }
1717 ];
1718 
1719 PTRNTAB2[3] aptb2PUNPCKLDQ = /* PUNPCKLDQ */ [
1720         { 0x0F62, _r,_mm,_mmm64 },
1721         { PUNPCKLDQ, _r,_xmm,_xmm_m128 },
1722         { ASM_END }
1723 ];
1724 
1725 PTRNTAB3[2] aptb3VPUNPCKLDQ = /* VPUNPCKLDQ */ [
1726         { VEX_NDS_128_WIG(PUNPCKLDQ), _r,_xmm,_xmm,_xmm_m128 },
1727         { ASM_END }
1728 ];
1729 
1730 PTRNTAB2[3] aptb2PUNPCKLWD = /* PUNPCKLWD */ [
1731         { 0x0F61, _r,_mm,_mmm64 },
1732         { PUNPCKLWD, _r,_xmm,_xmm_m128 },
1733         { ASM_END }
1734 ];
1735 
1736 PTRNTAB3[2] aptb3VPUNPCKLWD = /* VPUNPCKLWD */ [
1737         { VEX_NDS_128_WIG(PUNPCKLWD), _r,_xmm,_xmm,_xmm_m128 },
1738         { ASM_END }
1739 ];
1740 
1741 PTRNTAB2[3] aptb2PXOR = /* PXOR */ [
1742         { 0x0FEF, _r,_mm,_mmm64 },
1743         { PXOR, _r,_xmm,_xmm_m128 },
1744         { ASM_END }
1745 ];
1746 
1747 PTRNTAB3[2] aptb3VPXOR = /* VPXOR */ [
1748         { VEX_NDS_128_WIG(PXOR), _r,_xmm,_xmm,_xmm_m128 },
1749         { ASM_END }
1750 ];
1751 
1752 ////////////////////// New Opcodes /////////////////////////////
1753 
1754 static if (0) // Use REP NOP instead
1755 {
1756 PTRNTAB0[1] aptb0PAUSE =  /* PAUSE */ [
1757         { 0xf390, 0 }
1758 ];
1759 }
1760 
1761 PTRNTAB0[1] aptb0SYSCALL =  /* SYSCALL */ [
1762         { 0x0f05, _modcxr11 }
1763 ];
1764 
1765 PTRNTAB0[1] aptb0SYSRET =  /* SYSRET */ [
1766         { 0x0f07, 0 }
1767 ];
1768 
1769 PTRNTAB0[1] aptb0SYSENTER =  /* SYSENTER */ [
1770         { 0x0f34, 0 }
1771 ];
1772 
1773 PTRNTAB0[1] aptb0SYSEXIT =  /* SYSEXIT */ [
1774         { 0x0f35, 0 }
1775 ];
1776 
1777 PTRNTAB0[1] aptb0UD2 =  /* UD2 */ [
1778         { 0x0f0b, 0 }
1779 ];
1780 
1781 PTRNTAB0[1] aptb0LFENCE = /* LFENCE */ [
1782         { 0x0FAEE8,     0 }
1783 ];
1784 
1785 PTRNTAB0[1] aptb0MFENCE = /* MFENCE */ [
1786         { 0x0FAEF0,     0 }
1787 ];
1788 
1789 PTRNTAB0[1] aptb0SFENCE = /* SFENCE */ [
1790         { 0x0FAEF8,     0 }
1791 ];
1792 
1793 PTRNTAB1[2]  aptb1FXSAVE = /* FXSAVE */ [
1794         { 0x0FAE, _0, _m512 },
1795         { ASM_END }
1796 ];
1797 
1798 PTRNTAB1[2]  aptb1FXRSTOR = /* FXRSTOR */ [
1799         { 0x0FAE, _1, _m512 },
1800         { ASM_END }
1801 ];
1802 
1803 PTRNTAB1[2]  aptb1LDMXCSR = /* LDMXCSR */ [
1804         { 0x0FAE, _2, _m32 },
1805         { ASM_END }
1806 ];
1807 
1808 PTRNTAB1[2]  aptb1VLDMXCSR = /* VLDMXCSR */ [
1809         { VEX_128_WIG(0x0FAE), _2, _m32 },
1810         { ASM_END }
1811 ];
1812 
1813 PTRNTAB1[2]  aptb1STMXCSR = /* STMXCSR */ [
1814         { 0x0FAE, _3, _m32 },
1815         { ASM_END }
1816 ];
1817 
1818 PTRNTAB1[2]  aptb1VSTMXCSR = /* VSTMXCSR */ [
1819         { VEX_128_WIG(0x0FAE), _3, _m32 },
1820         { ASM_END }
1821 ];
1822 
1823 PTRNTAB1[2]  aptb1CLFLUSH = /* CLFLUSH */ [
1824         { 0x0FAE, _7, _m8 },
1825         { ASM_END }
1826 ];
1827 
1828 PTRNTAB2[2] aptb2ADDPS = /* ADDPS */ [
1829         { ADDPS, _r,_xmm,_xmm_m128 },
1830         { ASM_END }
1831 ];
1832 
1833 PTRNTAB3[3] aptb3VADDPS = /* VADDPS */ [
1834         { VEX_NDS_128_WIG(ADDPS), _r, _xmm, _xmm, _xmm_m128, },
1835         { VEX_NDS_256_WIG(ADDPS), _r, _ymm, _ymm, _ymm_m256, },
1836         { ASM_END }
1837 ];
1838 
1839 PTRNTAB2[2] aptb2ADDPD = /* ADDPD */ [
1840         { ADDPD, _r,_xmm,_xmm_m128 },
1841         { ASM_END }
1842 ];
1843 
1844 PTRNTAB3[3] aptb3VADDPD = /* VADDPD */ [
1845         { VEX_NDS_128_WIG(ADDPD), _r, _xmm, _xmm, _xmm_m128 },
1846         { VEX_NDS_256_WIG(ADDPD), _r, _ymm, _ymm, _ymm_m256 },
1847         { ASM_END }
1848 ];
1849 
1850 PTRNTAB2[2] aptb2ADDSD = /* ADDSD */ [
1851         { ADDSD, _r,_xmm,_xmm_m64 },
1852         { ASM_END }
1853 ];
1854 
1855 PTRNTAB3[2] aptb3VADDSD = /* VADDSD */ [
1856         { VEX_NDS_128_WIG(ADDSD), _r, _xmm, _xmm, _xmm_m64, },
1857         { ASM_END }
1858 ];
1859 
1860 PTRNTAB2[2] aptb2ADDSS = /* ADDSS */ [
1861         { ADDSS, _r,_xmm,_xmm_m32 },
1862         { ASM_END }
1863 ];
1864 
1865 PTRNTAB3[2] aptb3VADDSS = /* VADDSS */ [
1866         { VEX_NDS_128_WIG(ADDSS), _r, _xmm, _xmm, _xmm_m32, },
1867         { ASM_END }
1868 ];
1869 
1870 PTRNTAB2[2] aptb2ANDPD = /* ANDPD */ [
1871         { ANDPD, _r,_xmm,_xmm_m128 },
1872         { ASM_END }
1873 ];
1874 
1875 PTRNTAB3[3] aptb3VANDPD = /* VANDPD */ [
1876         { VEX_NDS_128_WIG(ANDPD), _r,_xmm,_xmm,_xmm_m128 },
1877         { VEX_NDS_256_WIG(ANDPD), _r,_ymm,_ymm,_ymm_m256 },
1878         { ASM_END }
1879 ];
1880 
1881 PTRNTAB2[2] aptb2ANDPS = /* ANDPS */ [
1882         { ANDPS, _r,_xmm,_xmm_m128 },
1883         { ASM_END }
1884 ];
1885 
1886 PTRNTAB3[3] aptb3VANDPS = /* VANDPS */ [
1887         { VEX_NDS_128_WIG(ANDPS), _r,_xmm,_xmm,_xmm_m128 },
1888         { VEX_NDS_256_WIG(ANDPS), _r,_ymm,_ymm,_ymm_m256 },
1889         { ASM_END }
1890 ];
1891 
1892 PTRNTAB2[2] aptb2ANDNPD = /* ANDNPD */ [
1893         { ANDNPD, _r,_xmm,_xmm_m128 },
1894         { ASM_END }
1895 ];
1896 
1897 PTRNTAB3[3] aptb3VANDNPD = /* VANDNPD */ [
1898         { VEX_NDS_128_WIG(ANDNPD), _r,_xmm,_xmm,_xmm_m128 },
1899         { VEX_NDS_256_WIG(ANDNPD), _r,_ymm,_ymm,_ymm_m256 },
1900         { ASM_END }
1901 ];
1902 
1903 PTRNTAB2[2] aptb2ANDNPS = /* ANDNPS */ [
1904         { ANDNPS, _r,_xmm,_xmm_m128 },
1905         { ASM_END }
1906 ];
1907 
1908 PTRNTAB3[3] aptb3VANDNPS = /* VANDNPS */ [
1909         { VEX_NDS_128_WIG(ANDNPS), _r,_xmm,_xmm,_xmm_m128 },
1910         { VEX_NDS_256_WIG(ANDNPS), _r,_ymm,_ymm,_ymm_m256 },
1911         { ASM_END }
1912 ];
1913 
1914 PTRNTAB3[2] aptb3CMPPS = /* CMPPS */ [
1915         { CMPPS, _r,_xmm,_xmm_m128,_imm8 },
1916         { ASM_END }
1917 ];
1918 
1919 PTRNTAB4[3] aptb4VCMPPS = /* VCMPPS */ [
1920         { VEX_NDS_128_WIG(CMPPS), _r, _xmm, _xmm, _xmm_m128, _imm8 },
1921         { VEX_NDS_256_WIG(CMPPS), _r, _ymm, _ymm, _ymm_m256, _imm8 },
1922         { ASM_END }
1923 ];
1924 
1925 PTRNTAB3[2] aptb3CMPPD = /* CMPPD */ [
1926         { CMPPD, _r,_xmm,_xmm_m128,_imm8 },
1927         { ASM_END }
1928 ];
1929 
1930 PTRNTAB4[3] aptb4VCMPPD = /* VCMPPD */ [
1931         { VEX_NDS_128_WIG(CMPPD), _r, _xmm, _xmm, _xmm_m128, _imm8 },
1932         { VEX_NDS_256_WIG(CMPPD), _r, _ymm, _ymm, _ymm_m256, _imm8 },
1933         { ASM_END }
1934 ];
1935 
1936 PTRNTAB3[3] aptb3CMPSD = /* CMPSD */ [
1937         { 0xa7, _32_bit | _I386 | _modsidi },
1938         { CMPSD, _r,_xmm,_xmm_m64,_imm8 },
1939         { ASM_END }
1940 ];
1941 
1942 PTRNTAB4[2] aptb4VCMPSD = /* VCMPSD */ [
1943         { VEX_NDS_128_WIG(CMPSD), _r, _xmm, _xmm, _xmm_m64, _imm8 },
1944         { ASM_END }
1945 ];
1946 
1947 PTRNTAB3[2] aptb3CMPSS = /* CMPSS */ [
1948         { CMPSS, _r,_xmm,_xmm_m32,_imm8 },
1949         { ASM_END }
1950 ];
1951 
1952 PTRNTAB4[2] aptb4VCMPSS = /* VCMPSS */ [
1953         { VEX_NDS_128_WIG(CMPSS), _r, _xmm, _xmm, _xmm_m32, _imm8 },
1954         { ASM_END }
1955 ];
1956 
1957 PTRNTAB2[2] aptb2COMISD = /* COMISD */ [
1958         { COMISD, _r,_xmm,_xmm_m64 },
1959         { ASM_END }
1960 ];
1961 
1962 PTRNTAB2[2] aptb2VCOMISD = /* VCOMISD */ [
1963         { VEX_128_WIG(COMISD), _r, _xmm, _xmm_m64 },
1964         { ASM_END }
1965 ];
1966 
1967 PTRNTAB2[2] aptb2COMISS = /* COMISS */ [
1968         { COMISS, _r,_xmm,_xmm_m32 },
1969         { ASM_END }
1970 ];
1971 
1972 PTRNTAB2[2] aptb2VCOMISS = /* VCOMISS */ [
1973         { VEX_128_WIG(COMISS), _r, _xmm, _xmm_m32 },
1974         { ASM_END }
1975 ];
1976 
1977 PTRNTAB2[2] aptb2CVTDQ2PD = /* CVTDQ2PD */ [
1978         { CVTDQ2PD, _r,_xmm,_xmm_m64 },
1979         { ASM_END }
1980 ];
1981 
1982 PTRNTAB2[3] aptb2VCVTDQ2PD = /* VCVTDQ2PD */ [
1983         { VEX_128_WIG(CVTDQ2PD), _r, _xmm, _xmm_m128 },
1984         { VEX_256_WIG(CVTDQ2PD), _r, _ymm, _xmm_m128 },
1985         { ASM_END }
1986 ];
1987 
1988 PTRNTAB2[2] aptb2CVTDQ2PS = /* CVTDQ2PS */ [
1989         { CVTDQ2PS, _r,_xmm,_xmm_m128 },
1990         { ASM_END }
1991 ];
1992 
1993 PTRNTAB2[3] aptb2VCVTDQ2PS = /* VCVTDQ2PS */ [
1994         { VEX_128_WIG(CVTDQ2PS), _r, _xmm, _xmm_m128 },
1995         { VEX_256_WIG(CVTDQ2PS), _r, _ymm, _ymm_m256 },
1996         { ASM_END }
1997 ];
1998 
1999 PTRNTAB2[2] aptb2CVTPD2DQ = /* CVTPD2DQ */ [
2000         { CVTPD2DQ, _r,_xmm,_xmm_m128 },
2001         { ASM_END }
2002 ];
2003 
2004 PTRNTAB2[3] aptb2VCVTPD2DQ = /* VCVTPD2DQ */ [
2005         { VEX_128_WIG(CVTPD2DQ), _r, _xmm, _xmm_m128 },
2006         { VEX_256_WIG(CVTPD2DQ), _r, _xmm, _ymm_m256 },
2007         { ASM_END }
2008 ];
2009 
2010 PTRNTAB2[2] aptb2CVTPD2PI = /* CVTPD2PI */ [
2011         { CVTPD2PI, _r,_mm,_xmm_m128 },
2012         { ASM_END }
2013 ];
2014 
2015 PTRNTAB2[2] aptb2CVTPD2PS = /* CVTPD2PS */ [
2016         { CVTPD2PS, _r,_xmm,_xmm_m128 },
2017         { ASM_END }
2018 ];
2019 
2020 PTRNTAB2[3] aptb2VCVTPD2PS = /* VCVTPD2PS */ [
2021         { VEX_128_WIG(CVTPD2PS), _r, _xmm, _xmm_m128 },
2022         { VEX_256_WIG(CVTPD2PS), _r, _xmm, _ymm_m256 },
2023         { ASM_END }
2024 ];
2025 
2026 PTRNTAB2[2] aptb2CVTPI2PD = /* CVTPI2PD */ [
2027         { CVTPI2PD, _r,_xmm,_mmm64 },
2028         { ASM_END }
2029 ];
2030 
2031 PTRNTAB2[2] aptb2CVTPI2PS = /* CVTPI2PS */ [
2032         { CVTPI2PS, _r,_xmm,_mmm64 },
2033         { ASM_END }
2034 ];
2035 
2036 PTRNTAB2[2] aptb2CVTPS2DQ = /* CVTPS2DQ */ [
2037         { CVTPS2DQ, _r,_xmm,_xmm_m128 },
2038         { ASM_END }
2039 ];
2040 
2041 PTRNTAB2[3] aptb2VCVTPS2DQ = /* VCVTPS2DQ */ [
2042         { VEX_128_WIG(CVTPS2DQ), _r, _xmm, _xmm_m128 },
2043         { VEX_256_WIG(CVTPS2DQ), _r, _ymm, _ymm_m256 },
2044         { ASM_END }
2045 ];
2046 
2047 PTRNTAB2[2] aptb2CVTPS2PD = /* CVTPS2PD */ [
2048         { CVTPS2PD, _r,_xmm,_xmm_m64 },
2049         { ASM_END }
2050 ];
2051 
2052 PTRNTAB2[3] aptb2VCVTPS2PD = /* VCVTPS2PD */ [
2053         { VEX_128_WIG(CVTPS2PD), _r, _xmm, _xmm_m128 },
2054         { VEX_256_WIG(CVTPS2PD), _r, _ymm, _xmm_m128 },
2055         { ASM_END }
2056 ];
2057 
2058 PTRNTAB2[2] aptb2CVTPS2PI = /* CVTPS2PI */ [
2059         { CVTPS2PI, _r,_mm,_xmm_m64 },
2060         { ASM_END }
2061 ];
2062 
2063 PTRNTAB2[2] aptb2CVTSD2SI = /* CVTSD2SI */ [
2064         { CVTSD2SI, _r,_r32,_xmm_m64 },
2065         { ASM_END }
2066 ];
2067 
2068 PTRNTAB2[3] aptb2VCVTSD2SI = /* VCVTSD2SI */ [
2069         { VEX_128_WIG(CVTSD2SI), _r, _r32, _xmm_m64 },
2070         { VEX_128_W1(CVTSD2SI), _r, _r64, _xmm_m64 },
2071         { ASM_END }
2072 ];
2073 
2074 PTRNTAB2[2] aptb2CVTSD2SS = /* CVTSD2SS */ [
2075         { CVTSD2SS, _r,_xmm,_xmm_m64 },
2076         { ASM_END }
2077 ];
2078 
2079 PTRNTAB3[2] aptb3VCVTSD2SS = /* VCVTSD2SS */ [
2080         { VEX_NDS_128_WIG(CVTSD2SS), _r, _xmm, _xmm, _xmm_m64 },
2081         { ASM_END }
2082 ];
2083 
2084 PTRNTAB2[2] aptb2CVTSI2SD = /* CVTSI2SD */ [
2085         { CVTSI2SD, _r,_xmm,_rm32 },
2086         { ASM_END }
2087 ];
2088 
2089 PTRNTAB3[3] aptb3VCVTSI2SD = /* VCVTSI2SD */ [
2090         { VEX_NDS_128_WIG(CVTSI2SD), _r, _xmm, _xmm, _rm32 },
2091         { VEX_NDS_128_W1(CVTSI2SD), _r, _xmm, _xmm, _rm64 }, // implicit REX_W
2092         { ASM_END }
2093 ];
2094 
2095 PTRNTAB2[2] aptb2CVTSI2SS = /* CVTSI2SS */ [
2096         { CVTSI2SS, _r,_xmm,_rm32 },
2097         { ASM_END }
2098 ];
2099 
2100 PTRNTAB3[3] aptb3VCVTSI2SS = /* VCVTSI2SS */ [
2101         { VEX_NDS_128_WIG(CVTSI2SS), _r, _xmm, _xmm, _rm32 },
2102         { VEX_NDS_128_W1(CVTSI2SS), _r, _xmm, _xmm, _rm64 },
2103         { ASM_END }
2104 ];
2105 
2106 PTRNTAB2[2] aptb2CVTSS2SD = /* CVTSS2SD */ [
2107         { CVTSS2SD, _r,_xmm,_xmm_m32 },
2108         { ASM_END }
2109 ];
2110 
2111 PTRNTAB3[2] aptb3VCVTSS2SD = /* VCVTSS2SD */ [
2112         { VEX_NDS_128_WIG(CVTSS2SD), _r, _xmm, _xmm, _xmm_m32 },
2113         { ASM_END }
2114 ];
2115 
2116 PTRNTAB2[2] aptb2CVTSS2SI = /* CVTSS2SI */ [
2117         { CVTSS2SI, _r,_r32,_xmm_m32 },
2118         { ASM_END }
2119 ];
2120 
2121 PTRNTAB2[3] aptb2VCVTSS2SI = /* VCVTSS2SI */ [
2122         { VEX_128_WIG(CVTSS2SI), _r, _r32, _xmm_m32 },
2123         { VEX_128_W1(CVTSS2SI), _r, _r64, _xmm_m32 }, // implicit REX_W
2124         { ASM_END }
2125 ];
2126 
2127 PTRNTAB2[2] aptb2CVTTPD2PI = /* CVTTPD2PI */ [
2128         { CVTTPD2PI, _r,_mm,_xmm_m128 },
2129         { ASM_END }
2130 ];
2131 
2132 PTRNTAB2[2] aptb2CVTTPD2DQ = /* CVTTPD2DQ */ [
2133         { CVTTPD2DQ, _r,_xmm,_xmm_m128 },
2134         { ASM_END }
2135 ];
2136 
2137 PTRNTAB2[3] aptb2VCVTTPD2DQ = /* VCVTTPD2DQ */ [
2138         { VEX_128_WIG(CVTTPD2DQ), _r, _xmm, _xmm_m128 },
2139         { VEX_256_WIG(CVTTPD2DQ), _r, _xmm, _ymm_m256 },
2140         { ASM_END }
2141 ];
2142 
2143 PTRNTAB2[2] aptb2CVTTPS2DQ = /* CVTTPS2DQ */ [
2144         { CVTTPS2DQ, _r,_xmm,_xmm_m128 },
2145         { ASM_END }
2146 ];
2147 
2148 PTRNTAB2[3] aptb2VCVTTPS2DQ = /* VCVTTPS2DQ */ [
2149         { VEX_128_WIG(CVTTPS2DQ), _r, _xmm, _xmm_m128 },
2150         { VEX_256_WIG(CVTTPS2DQ), _r, _ymm, _ymm_m256 },
2151         { ASM_END }
2152 ];
2153 
2154 PTRNTAB2[2] aptb2CVTTPS2PI = /* CVTTPS2PI */ [
2155         { CVTTPS2PI, _r,_mm,_xmm_m64 },
2156         { ASM_END }
2157 ];
2158 
2159 PTRNTAB2[2] aptb2CVTTSD2SI = /* CVTTSD2SI */ [
2160         { CVTTSD2SI, _r,_r32,_xmm_m64 },
2161         { ASM_END }
2162 ];
2163 
2164 PTRNTAB2[3] aptb2VCVTTSD2SI = /* VCVTTSD2SI */ [
2165         { VEX_128_WIG(CVTTSD2SI), _r, _r32, _xmm_m64 },
2166         { VEX_128_W1(CVTTSD2SI), _r, _r64, _xmm_m64 }, // implicit REX_W
2167         { ASM_END }
2168 ];
2169 
2170 PTRNTAB2[2] aptb2CVTTSS2SI = /* CVTTSS2SI */ [
2171         { CVTTSS2SI, _r,_r32,_xmm_m32 },
2172         { ASM_END }
2173 ];
2174 
2175 PTRNTAB2[3] aptb2VCVTTSS2SI = /* VCVTTSS2SI */ [
2176         { VEX_128_WIG(CVTTSS2SI), _r, _r32, _xmm_m64 },
2177         { VEX_128_W1(CVTTSS2SI), _r, _r64, _xmm_m64 }, // implicit REX_W
2178         { ASM_END }
2179 ];
2180 
2181 PTRNTAB2[2] aptb2DIVPD = /* DIVPD */ [
2182         { DIVPD, _r,_xmm,_xmm_m128 },
2183         { ASM_END }
2184 ];
2185 
2186 PTRNTAB3[3] aptb3VDIVPD  = /* VDIVPD  */ [
2187         { VEX_NDS_128_WIG(DIVPD), _r, _xmm, _xmm, _xmm_m128, },
2188         { VEX_NDS_256_WIG(DIVPD), _r, _ymm, _ymm, _ymm_m256, },
2189         { ASM_END }
2190 ];
2191 
2192 PTRNTAB2[2] aptb2DIVPS = /* DIVPS */ [
2193         { DIVPS, _r,_xmm,_xmm_m128 },
2194         { ASM_END }
2195 ];
2196 
2197 PTRNTAB3[3] aptb3VDIVPS  = /* VDIVPS  */ [
2198         { VEX_NDS_128_WIG(DIVPS), _r, _xmm, _xmm, _xmm_m128, },
2199         { VEX_NDS_256_WIG(DIVPS), _r, _ymm, _ymm, _ymm_m256, },
2200         { ASM_END }
2201 ];
2202 
2203 PTRNTAB2[2] aptb2DIVSD = /* DIVSD */ [
2204         { DIVSD, _r,_xmm,_xmm_m64 },
2205         { ASM_END }
2206 ];
2207 
2208 PTRNTAB3[2] aptb3VDIVSD  = /* VDIVSD  */ [
2209         { VEX_NDS_128_WIG(DIVSD), _r, _xmm, _xmm, _xmm_m64, },
2210         { ASM_END }
2211 ];
2212 
2213 PTRNTAB2[2] aptb2DIVSS = /* DIVSS */ [
2214         { DIVSS, _r,_xmm,_xmm_m32 },
2215         { ASM_END }
2216 ];
2217 
2218 PTRNTAB3[2] aptb3VDIVSS  = /* VDIVSS  */ [
2219         { VEX_NDS_128_WIG(DIVSS), _r, _xmm, _xmm, _xmm_m32, },
2220         { ASM_END }
2221 ];
2222 
2223 PTRNTAB2[2] aptb2MASKMOVDQU = /* MASKMOVDQU */ [
2224         { MASKMOVDQU, _r,_xmm,_xmm },
2225         { ASM_END }
2226 ];
2227 
2228 PTRNTAB2[2] aptb2VMASKMOVDQU = /* VMASKMOVDQU */ [
2229         { VEX_128_WIG(MASKMOVDQU), _r, _xmm, _xmm },
2230         { ASM_END }
2231 ];
2232 
2233 PTRNTAB2[2] aptb2MASKMOVQ = /* MASKMOVQ */ [
2234         { MASKMOVQ, _r,_mm,_mm },
2235         { ASM_END }
2236 ];
2237 
2238 PTRNTAB2[2] aptb2MAXPD = /* MAXPD */ [
2239         { MAXPD, _r,_xmm,_xmm_m128 },
2240         { ASM_END }
2241 ];
2242 
2243 PTRNTAB3[3] aptb3VMAXPD = /* VMAXPD */ [
2244         { VEX_NDS_128_WIG(MAXPD), _r, _xmm, _xmm, _xmm_m128 },
2245         { VEX_NDS_256_WIG(MAXPD), _r, _ymm, _ymm, _ymm_m256 },
2246         { ASM_END }
2247 ];
2248 
2249 PTRNTAB2[2] aptb2MAXPS = /* MAXPS */ [
2250         { MAXPS, _r,_xmm,_xmm_m128 },
2251         { ASM_END }
2252 ];
2253 
2254 PTRNTAB3[3] aptb3VMAXPS = /* VMAXPS */ [
2255         { VEX_NDS_128_WIG(MAXPS), _r, _xmm, _xmm, _xmm_m128 },
2256         { VEX_NDS_256_WIG(MAXPS), _r, _ymm, _ymm, _ymm_m256 },
2257         { ASM_END }
2258 ];
2259 
2260 PTRNTAB2[2] aptb2MAXSD = /* MAXSD */ [
2261         { MAXSD, _r,_xmm,_xmm_m64 },
2262         { ASM_END }
2263 ];
2264 
2265 PTRNTAB3[2] aptb3VMAXSD = /* VMAXSD */ [
2266         { VEX_NDS_128_WIG(MAXSD), _r, _xmm, _xmm, _xmm_m64 },
2267         { ASM_END }
2268 ];
2269 
2270 PTRNTAB2[2] aptb2MAXSS = /* MAXSS */ [
2271         { MAXSS, _r,_xmm,_xmm_m32 },
2272         { ASM_END }
2273 ];
2274 
2275 PTRNTAB3[2] aptb3VMAXSS = /* VMAXSS */ [
2276         { VEX_NDS_128_WIG(MAXSS), _r, _xmm, _xmm, _xmm_m32 },
2277         { ASM_END }
2278 ];
2279 
2280 PTRNTAB2[2] aptb2MINPD = /* MINPD */ [
2281         { MINPD, _r,_xmm,_xmm_m128 },
2282         { ASM_END }
2283 ];
2284 
2285 PTRNTAB3[3] aptb3VMINPD = /* VMINPD */ [
2286         { VEX_NDS_128_WIG(MINPD), _r, _xmm, _xmm, _xmm_m128 },
2287         { VEX_NDS_256_WIG(MINPD), _r, _ymm, _ymm, _ymm_m256 },
2288         { ASM_END }
2289 ];
2290 
2291 PTRNTAB2[2] aptb2MINPS = /* MINPS */ [
2292         { MINPS, _r,_xmm,_xmm_m128 },
2293         { ASM_END }
2294 ];
2295 
2296 PTRNTAB3[3] aptb3VMINPS = /* VMINPS */ [
2297         { VEX_NDS_128_WIG(MINPS), _r, _xmm, _xmm, _xmm_m128 },
2298         { VEX_NDS_256_WIG(MINPS), _r, _ymm, _ymm, _ymm_m256 },
2299         { ASM_END }
2300 ];
2301 
2302 PTRNTAB2[2] aptb2MINSD = /* MINSD */ [
2303         { MINSD, _r,_xmm,_xmm_m64 },
2304         { ASM_END }
2305 ];
2306 
2307 PTRNTAB3[2] aptb3VMINSD = /* VMINSD */ [
2308         { VEX_NDS_128_WIG(MINSD), _r, _xmm, _xmm, _xmm_m64 },
2309         { ASM_END }
2310 ];
2311 
2312 PTRNTAB2[2] aptb2MINSS = /* MINSS */ [
2313         { MINSS, _r,_xmm,_xmm_m32 },
2314         { ASM_END }
2315 ];
2316 
2317 PTRNTAB3[2] aptb3VMINSS = /* VMINSS */ [
2318         { VEX_NDS_128_WIG(MINSS), _r, _xmm, _xmm, _xmm_m32 },
2319         { ASM_END }
2320 ];
2321 
2322 PTRNTAB2[3] aptb2MOVAPD = /* MOVAPD */ [
2323         { LODAPD, _r,_xmm,_xmm_m128 },
2324         { STOAPD, _r,_xmm_m128,_xmm },
2325         { ASM_END }
2326 ];
2327 
2328 PTRNTAB2[5] aptb2VMOVAPD = /* VMOVAPD */ [
2329         { VEX_128_WIG(LODAPD), _r, _xmm, _xmm_m128 },
2330         { VEX_128_WIG(STOAPD), _r, _xmm_m128, _xmm },
2331         { VEX_256_WIG(LODAPD), _r, _ymm, _ymm_m256 },
2332         { VEX_256_WIG(STOAPD), _r, _ymm_m256, _ymm },
2333         { ASM_END }
2334 ];
2335 
2336 PTRNTAB2[3] aptb2MOVAPS = /* MOVAPS */ [
2337         { LODAPS, _r,_xmm,_xmm_m128 },
2338         { STOAPS, _r,_xmm_m128,_xmm },
2339         { ASM_END }
2340 ];
2341 
2342 PTRNTAB2[5] aptb2VMOVAPS  = /* VMOVAPS */ [
2343         { VEX_128_WIG(LODAPS), _r, _xmm, _xmm_m128, },
2344         { VEX_128_WIG(STOAPS), _r, _xmm_m128, _xmm, },
2345         { VEX_256_WIG(LODAPS), _r, _ymm, _ymm_m256, },
2346         { VEX_256_WIG(STOAPS), _r, _ymm_m256, _ymm, },
2347         { ASM_END },
2348 ];
2349 
2350 PTRNTAB2[3] aptb2MOVDQA = /* MOVDQA */ [
2351         { LODDQA, _r,_xmm,_xmm_m128 },
2352         { STODQA, _r,_xmm_m128,_xmm },
2353         { ASM_END }
2354 ];
2355 
2356 PTRNTAB2[5] aptb2VMOVDQA = /* VMOVDQA */ [
2357         { VEX_128_WIG(LODDQA), _r, _xmm, _xmm_m128 },
2358         { VEX_128_WIG(STODQA), _r, _xmm_m128, _xmm },
2359         { VEX_256_WIG(LODDQA), _r, _ymm, _ymm_m256 },
2360         { VEX_256_WIG(STODQA), _r, _ymm_m256, _ymm },
2361         { ASM_END }
2362 ];
2363 
2364 PTRNTAB2[3] aptb2MOVDQU = /* MOVDQU */ [
2365         { LODDQU, _r,_xmm,_xmm_m128 },
2366         { STODQU, _r,_xmm_m128,_xmm },
2367         { ASM_END }
2368 ];
2369 
2370 PTRNTAB2[5] aptb2VMOVDQU = /* VMOVDQU */ [
2371         { VEX_128_WIG(LODDQU), _r, _xmm, _xmm_m128 },
2372         { VEX_128_WIG(STODQU), _r, _xmm_m128, _xmm },
2373         { VEX_256_WIG(LODDQU), _r, _ymm, _ymm_m256 },
2374         { VEX_256_WIG(STODQU), _r, _ymm_m256, _ymm },
2375         { ASM_END }
2376 ];
2377 
2378 PTRNTAB2[2] aptb2MOVDQ2Q = /* MOVDQ2Q */ [
2379         { MOVDQ2Q, _r,_mm,_xmm },
2380         { ASM_END }
2381 ];
2382 
2383 PTRNTAB2[2] aptb2MOVHLPS = /* MOVHLPS */ [
2384         { MOVHLPS, _r,_xmm,_xmm },
2385         { ASM_END }
2386 ];
2387 
2388 PTRNTAB3[2] aptb3VMOVHLPS = /* VMOVHLPS */ [
2389         { VEX_NDS_128_WIG(MOVHLPS), _r, _xmm, _xmm, _xmm },
2390         { ASM_END }
2391 ];
2392 
2393 PTRNTAB2[3] aptb2MOVHPD = /* MOVHPD */ [
2394         { LODHPD, _r,_xmm,_xmm_m64 },
2395         { STOHPD, _r,_xmm_m64,_xmm },
2396         { ASM_END }
2397 ];
2398 
2399 PTRNTAB3[3] aptb3VMOVHPD = /* VMOVHPD */ [
2400         { VEX_NDS_128_WIG(LODHPD), _r, _xmm, _xmm, _m64 },
2401         { VEX_128_WIG(STOHPD), _r, _m64, _xmm, 0 },
2402         { ASM_END }
2403 ];
2404 
2405 PTRNTAB2[3] aptb2MOVHPS = /* MOVHPS */ [
2406         { LODHPS, _r,_xmm,_xmm_m64 },
2407         { STOHPS, _r,_xmm_m64,_xmm },
2408         { ASM_END }
2409 ];
2410 
2411 PTRNTAB3[3] aptb3VMOVHPS = /* VMOVHPS */ [
2412         { VEX_NDS_128_WIG(LODHPS), _r, _xmm, _xmm, _m64 },
2413         { VEX_128_WIG(STOHPS), _r, _m64, _xmm, 0 },
2414         { ASM_END }
2415 ];
2416 
2417 PTRNTAB2[2] aptb2MOVLHPS = /* MOVLHPS */ [
2418         { MOVLHPS, _r,_xmm,_xmm },
2419         { ASM_END }
2420 ];
2421 
2422 PTRNTAB3[2] aptb3VMOVLHPS = /* VMOVLHPS */ [
2423         { VEX_NDS_128_WIG(MOVLHPS), _r, _xmm, _xmm, _xmm },
2424         { ASM_END }
2425 ];
2426 
2427 PTRNTAB2[3] aptb2MOVLPD = /* MOVLPD */ [
2428         { LODLPD, _r,_xmm,_xmm_m64 },
2429         { STOLPD, _r,_xmm_m64,_xmm },
2430         { ASM_END }
2431 ];
2432 
2433 PTRNTAB3[3] aptb3VMOVLPD = /* VMOVLPD */ [
2434         { VEX_NDS_128_WIG(LODLPD), _r, _xmm, _xmm, _m64 },
2435         { VEX_128_WIG(STOLPD), _r, _m64, _xmm, 0 },
2436         { ASM_END }
2437 ];
2438 
2439 PTRNTAB2[3] aptb2MOVLPS = /* MOVLPS */ [
2440         { LODLPS, _r,_xmm,_xmm_m64 },
2441         { STOLPS, _r,_xmm_m64,_xmm },
2442         { ASM_END }
2443 ];
2444 
2445 PTRNTAB3[3] aptb3VMOVLPS = /* VMOVLPS */ [
2446         { VEX_NDS_128_WIG(LODLPS), _r, _xmm, _xmm, _m64 },
2447         { VEX_128_WIG(STOLPS), _r, _m64, _xmm, 0 },
2448         { ASM_END }
2449 ];
2450 
2451 PTRNTAB2[2] aptb2MOVMSKPD = /* MOVMSKPD */ [
2452         { MOVMSKPD, _r,_r32,_xmm },
2453         { ASM_END }
2454 ];
2455 
2456 PTRNTAB2[3] aptb2VMOVMSKPD  = /* VMOVMSKPD */ [
2457         { VEX_128_WIG(MOVMSKPD), _r, _r32, _xmm },
2458         { VEX_256_WIG(MOVMSKPD), _r, _r32, _ymm },
2459         { ASM_END }
2460 ];
2461 
2462 PTRNTAB2[2] aptb2MOVMSKPS = /* MOVMSKPS */ [
2463         { MOVMSKPS, _r,_r32,_xmm },
2464         { ASM_END }
2465 ];
2466 
2467 PTRNTAB2[3] aptb2VMOVMSKPS  = /* VMOVMSKPS */ [
2468         { VEX_128_WIG(MOVMSKPS), _r, _r32, _xmm },
2469         { VEX_256_WIG(MOVMSKPS), _r, _r32, _ymm },
2470         { ASM_END }
2471 ];
2472 
2473 PTRNTAB2[2] aptb2MOVNTDQ = /* MOVNTDQ */ [
2474         { MOVNTDQ, _r,_m128,_xmm },
2475         { ASM_END }
2476 ];
2477 
2478 PTRNTAB2[3] aptb2VMOVNTDQ = /* VMOVNTDQ */ [
2479         { VEX_128_WIG(MOVNTDQ), _r, _m128, _xmm },
2480         { VEX_256_WIG(MOVNTDQ), _r, _m256, _ymm },
2481         { ASM_END }
2482 ];
2483 
2484 PTRNTAB2[2] aptb2MOVNTI = /* MOVNTI */ [
2485         { MOVNTI, _r,_m32,_r32 },
2486         { ASM_END }
2487 ];
2488 
2489 PTRNTAB2[2] aptb2MOVNTPD = /* MOVNTPD */ [
2490         { MOVNTPD, _r,_m128,_xmm },
2491         { ASM_END }
2492 ];
2493 
2494 PTRNTAB2[3] aptb2VMOVNTPD = /* VMOVNTPD */ [
2495         { VEX_128_WIG(MOVNTPD), _r, _m128, _xmm },
2496         { VEX_256_WIG(MOVNTPD), _r, _m256, _ymm },
2497         { ASM_END }
2498 ];
2499 
2500 PTRNTAB2[2] aptb2MOVNTPS = /* MOVNTPS */ [
2501         { MOVNTPS, _r,_m128,_xmm },
2502         { ASM_END }
2503 ];
2504 
2505 PTRNTAB2[3] aptb2VMOVNTPS = /* VMOVNTPS */ [
2506         { VEX_128_WIG(MOVNTPS), _r, _m128, _xmm },
2507         { VEX_256_WIG(MOVNTPS), _r, _m256, _ymm },
2508         { ASM_END }
2509 ];
2510 
2511 PTRNTAB2[2] aptb2MOVNTQ = /* MOVNTQ */ [
2512         { MOVNTQ, _r,_m64,_mm },
2513         { ASM_END }
2514 ];
2515 
2516 PTRNTAB2[2] aptb2MOVQ2DQ = /* MOVQ2DQ */ [
2517         { MOVQ2DQ, _r,_xmm,_mm },
2518         { ASM_END }
2519 ];
2520 
2521 PTRNTAB2[4] aptb2MOVSD =  /* MOVSD */ [
2522         { 0xa5, _32_bit | _I386 | _modsidi },
2523         { LODSD, _r, _xmm, _xmm_m64 },
2524         { STOSD, _r, _xmm_m64, _xmm },
2525         { ASM_END }
2526 ];
2527 
2528 PTRNTAB3[3] aptb3VMOVSD = /* VMOVSD */ [
2529         { VEX_NDS_128_WIG(LODSD), _r, _xmm, _xmm, _xmm },
2530         { VEX_128_WIG(STOSD), _r, _m64, _xmm, 0 },
2531         { ASM_END }
2532 ];
2533 
2534 PTRNTAB2[3] aptb2MOVSS =  /* MOVSS */ [
2535         { LODSS, _r,_xmm,_xmm_m32 },
2536         { STOSS, _r,_xmm_m32,_xmm },
2537         { ASM_END }
2538 ];
2539 
2540 PTRNTAB3[3] aptb3VMOVSS = /* VMOVSS */ [
2541         { VEX_NDS_128_WIG(LODSS), _r, _xmm, _xmm, _xmm },
2542         { VEX_128_WIG(STOSS), _r, _m32, _xmm, 0 },
2543         { ASM_END }
2544 ];
2545 
2546 PTRNTAB2[3] aptb2MOVUPD = /* MOVUPD */ [
2547         { LODUPD, _r,_xmm,_xmm_m128 },
2548         { STOUPD, _r,_xmm_m128,_xmm },
2549         { ASM_END }
2550 ];
2551 
2552 PTRNTAB2[5] aptb2VMOVUPD = /* VMOVUPD */ [
2553         { VEX_128_WIG(LODUPD), _r, _xmm, _xmm_m128 },
2554         { VEX_128_WIG(STOUPD), _r, _xmm_m128, _xmm },
2555         { VEX_256_WIG(LODUPD), _r, _ymm, _ymm_m256 },
2556         { VEX_256_WIG(STOUPD), _r, _ymm_m256, _ymm },
2557         { ASM_END }
2558 ];
2559 
2560 PTRNTAB2[3] aptb2MOVUPS = /* MOVUPS */ [
2561         { LODUPS, _r,_xmm,_xmm_m128 },
2562         { STOUPS, _r,_xmm_m128,_xmm },
2563         { ASM_END }
2564 ];
2565 
2566 PTRNTAB2[5] aptb2VMOVUPS  = /* VMOVUPS */ [
2567         { VEX_128_WIG(LODUPS), _r, _xmm, _xmm_m128, },
2568         { VEX_128_WIG(STOUPS), _r, _xmm_m128, _xmm, },
2569         { VEX_256_WIG(LODUPS), _r, _ymm, _ymm_m256, },
2570         { VEX_256_WIG(STOUPS), _r, _ymm_m256, _ymm, },
2571         { ASM_END }
2572 ];
2573 
2574 PTRNTAB2[2] aptb2MULPD = /* MULPD */ [
2575         { MULPD, _r,_xmm,_xmm_m128 },
2576         { ASM_END }
2577 ];
2578 
2579 PTRNTAB3[3] aptb3VMULPD  = /* VMULPD  */ [
2580         { VEX_NDS_128_WIG(MULPD), _r, _xmm, _xmm, _xmm_m128, },
2581         { VEX_NDS_256_WIG(MULPD), _r, _ymm, _ymm, _ymm_m256, },
2582         { ASM_END }
2583 ];
2584 
2585 PTRNTAB2[2] aptb2MULPS = /* MULPS */ [
2586         { MULPS, _r,_xmm,_xmm_m128 },
2587         { ASM_END }
2588 ];
2589 
2590 PTRNTAB3[3] aptb3VMULPS  = /* VMULPS  */ [
2591         { VEX_NDS_128_WIG(MULPS), _r, _xmm, _xmm, _xmm_m128, },
2592         { VEX_NDS_256_WIG(MULPS), _r, _ymm, _ymm, _ymm_m256, },
2593         { ASM_END }
2594 ];
2595 
2596 PTRNTAB2[2] aptb2MULSD = /* MULSD */ [
2597         { MULSD, _r,_xmm,_xmm_m64 },
2598         { ASM_END }
2599 ];
2600 
2601 PTRNTAB3[2] aptb3VMULSD  = /* VMULSD  */ [
2602         { VEX_NDS_128_WIG(MULSD), _r, _xmm, _xmm, _xmm_m64, },
2603         { ASM_END }
2604 ];
2605 
2606 PTRNTAB2[2] aptb2MULSS = /* MULSS */ [
2607         { MULSS, _r,_xmm,_xmm_m32 },
2608         { ASM_END }
2609 ];
2610 
2611 PTRNTAB3[2] aptb3VMULSS  = /* VMULSS  */ [
2612         { VEX_NDS_128_WIG(MULSS), _r, _xmm, _xmm, _xmm_m32, },
2613         { ASM_END }
2614 ];
2615 
2616 PTRNTAB2[2] aptb2ORPD = /* ORPD */ [
2617         { ORPD, _r,_xmm,_xmm_m128 },
2618         { ASM_END }
2619 ];
2620 
2621 PTRNTAB3[3] aptb3VORPD = /* VORPD */ [
2622         { VEX_NDS_128_WIG(ORPD), _r,_xmm,_xmm,_xmm_m128 },
2623         { VEX_NDS_256_WIG(ORPD), _r,_ymm,_ymm,_ymm_m256 },
2624         { ASM_END }
2625 ];
2626 
2627 PTRNTAB2[2] aptb2ORPS = /* ORPS */ [
2628         { ORPS, _r,_xmm,_xmm_m128 },
2629         { ASM_END }
2630 ];
2631 
2632 PTRNTAB3[3] aptb3VORPS = /* VORPS */ [
2633         { VEX_NDS_128_WIG(ORPS), _r,_xmm,_xmm,_xmm_m128 },
2634         { VEX_NDS_256_WIG(ORPS), _r,_ymm,_ymm,_ymm_m256 },
2635         { ASM_END }
2636 ];
2637 
2638 PTRNTAB2[3] aptb2PADDQ = /* PADDQ */ [
2639         { 0x0FD4, _r,_mm,_mmm64 },
2640         { PADDQ, _r,_xmm,_xmm_m128 },
2641         { ASM_END }
2642 ];
2643 
2644 PTRNTAB3[2] aptb3VPADDQ = /* VPADDQ */ [
2645         { VEX_NDS_128_WIG(PADDQ), _r, _xmm, _xmm, _xmm_m128 },
2646         { ASM_END }
2647 ];
2648 
2649 PTRNTAB2[3] aptb2PAVGB = /* PAVGB */ [
2650         { 0x0FE0, _r,_mm,_mmm64 },
2651         { PAVGB, _r,_xmm,_xmm_m128 },
2652         { ASM_END }
2653 ];
2654 
2655 PTRNTAB3[2] aptb3VPAVGB = /* VPAVGB */ [
2656         { VEX_NDS_128_WIG(PAVGB), _r, _xmm, _xmm, _xmm_m128 },
2657         { ASM_END }
2658 ];
2659 
2660 PTRNTAB2[3] aptb2PAVGW = /* PAVGW */ [
2661         { 0x0FE3, _r,_mm,_mmm64 },
2662         { PAVGW, _r,_xmm,_xmm_m128 },
2663         { ASM_END }
2664 ];
2665 
2666 PTRNTAB3[2] aptb3VPAVGW = /* VPAVGW */ [
2667         { VEX_NDS_128_WIG(PAVGW), _r, _xmm, _xmm, _xmm_m128 },
2668         { ASM_END }
2669 ];
2670 
2671 PTRNTAB3[6] aptb3PEXTRW = /* PEXTRW */ [
2672         { 0x0FC5, _r,_r32,_mm,_imm8 },
2673         { 0x0FC5, _r,_r64,_mm,_imm8 },
2674         { 0x660FC5, _r,_r32,_xmm,_imm8 },
2675         { 0x660FC5, _r,_r64,_xmm,_imm8 },
2676         { 0x660F3A15, _r,_m16,_xmm,_imm8 },    // synonym for r32/r64
2677         { ASM_END }
2678 ];
2679 
2680 PTRNTAB3[4] aptb3VPEXTRW = /* VPEXTRW */ [
2681         { VEX_128_WIG(0x660FC5), _r,_r32,_xmm,_imm8 },
2682         { VEX_128_WIG(0x660FC5), _r,_r64,_xmm,_imm8 },
2683         { VEX_128_WIG(0x660F3A15), _r,_m16,_xmm,_imm8 },    // synonym for r32/r64
2684         { ASM_END }
2685 ];
2686 
2687 PTRNTAB3[3] aptb3PINSRW = /* PINSRW */ [
2688         { 0x0FC4, _r,_mm,_r32m16,_imm8 },
2689         { PINSRW, _r,_xmm,_r32m16,_imm8 },
2690         { ASM_END }
2691 ];
2692 
2693 PTRNTAB4[2] aptb4VPINSRW = /* VPINSRW */ [
2694         { VEX_NDS_128_WIG(PINSRW), _r, _xmm, _xmm, _r32m16, _imm8 },
2695         { ASM_END }
2696 ];
2697 
2698 PTRNTAB2[3] aptb2PMAXSW = /* PMAXSW */ [
2699         { 0x0FEE, _r,_mm,_mmm64 },
2700         { PMAXSW, _r,_xmm,_xmm_m128 },
2701         { ASM_END }
2702 ];
2703 
2704 PTRNTAB3[2] aptb3VPMAXSW = /* VPMAXSW */ [
2705         { VEX_NDS_128_WIG(PMAXSW), _r, _xmm, _xmm, _xmm_m128 },
2706         { ASM_END }
2707 ];
2708 
2709 PTRNTAB2[3] aptb2PMAXUB = /* PMAXUB */ [
2710         { 0x0FDE, _r,_mm,_mmm64 },
2711         { PMAXUB, _r,_xmm,_xmm_m128 },
2712         { ASM_END }
2713 ];
2714 
2715 PTRNTAB3[2] aptb3VPMAXUB = /* VPMAXUB */ [
2716         { VEX_NDS_128_WIG(PMAXUB), _r, _xmm, _xmm, _xmm_m128 },
2717         { ASM_END }
2718 ];
2719 
2720 PTRNTAB2[3] aptb2PMINSW = /* PMINSW */ [
2721         { 0x0FEA, _r,_mm,_mmm64 },
2722         { PMINSW, _r,_xmm,_xmm_m128 },
2723         { ASM_END }
2724 ];
2725 
2726 PTRNTAB3[2] aptb3VPMINSW = /* VPMINSW */ [
2727         { VEX_NDS_128_WIG(PMINSW), _r, _xmm, _xmm, _xmm_m128 },
2728         { ASM_END }
2729 ];
2730 
2731 PTRNTAB2[3] aptb2PMINUB = /* PMINUB */ [
2732         { 0x0FDA, _r,_mm,_mmm64 },
2733         { PMINUB, _r,_xmm,_xmm_m128 },
2734         { ASM_END }
2735 ];
2736 
2737 PTRNTAB3[2] aptb3VPMINUB = /* VPMINUB */ [
2738         { VEX_NDS_128_WIG(PMINUB), _r, _xmm, _xmm, _xmm_m128 },
2739         { ASM_END }
2740 ];
2741 
2742 PTRNTAB2[4] aptb2PMOVMSKB = /* PMOVMSKB */ [
2743         { 0x0FD7, _r,_r32,_mm },
2744         { PMOVMSKB, _r, _r32, _xmm },
2745         { PMOVMSKB, _r|_64_bit, _r64, _xmm },
2746         { ASM_END }
2747 ];
2748 
2749 PTRNTAB2[2] aptb2VPMOVMSKB = /* VPMOVMSKB */ [
2750         { VEX_128_WIG(PMOVMSKB), _r, _r32, _xmm },
2751         { ASM_END }
2752 ];
2753 
2754 PTRNTAB2[3] aptb2PMULHUW = /* PMULHUW */ [
2755         { 0x0FE4, _r,_mm,_mmm64 },
2756         { PMULHUW, _r,_xmm,_xmm_m128 },
2757         { ASM_END }
2758 ];
2759 
2760 PTRNTAB3[2] aptb3VPMULHUW = /* VPMULHUW */ [
2761         { VEX_NDS_128_WIG(PMULHUW), _r, _xmm, _xmm, _xmm_m128 },
2762         { ASM_END }
2763 ];
2764 
2765 PTRNTAB2[3] aptb2PMULHW = /* PMULHW */ [
2766         { 0x0FE5, _r,_mm,_mmm64 },
2767         { PMULHW, _r,_xmm,_xmm_m128 },
2768         { ASM_END }
2769 ];
2770 
2771 PTRNTAB3[2] aptb3VPMULHW = /* VPMULHW */ [
2772         { VEX_NDS_128_WIG(PMULHW), _r, _xmm, _xmm, _xmm_m128 },
2773         { ASM_END }
2774 ];
2775 
2776 PTRNTAB2[3] aptb2PMULLW = /* PMULLW */ [
2777         { 0x0FD5, _r,_mm,_mmm64 },
2778         { PMULLW, _r,_xmm,_xmm_m128 },
2779         { ASM_END }
2780 ];
2781 
2782 PTRNTAB3[2] aptb3VPMULLW = /* VPMULLW */ [
2783         { VEX_NDS_128_WIG(PMULLW), _r, _xmm, _xmm, _xmm_m128 },
2784         { ASM_END }
2785 ];
2786 
2787 PTRNTAB2[3] aptb2PMULUDQ = /* PMULUDQ */ [
2788         { 0x0FF4, _r,_mm,_mmm64 },
2789         { PMULUDQ, _r,_xmm,_xmm_m128 },
2790         { ASM_END }
2791 ];
2792 
2793 PTRNTAB3[2] aptb3VPMULUDQ = /* VPMULUDQ */ [
2794         { VEX_NDS_128_WIG(PMULUDQ), _r, _xmm, _xmm, _xmm_m128 },
2795         { ASM_END }
2796 ];
2797 
2798 PTRNTAB2[3] aptb2POR = /* POR */ [
2799         { 0x0FEB, _r,_mm,_mmm64 },
2800         { POR, _r,_xmm,_xmm_m128 },
2801         { ASM_END }
2802 ];
2803 
2804 PTRNTAB3[2] aptb3VPOR = /* VPOR */ [
2805         { VEX_NDS_128_WIG(POR), _r,_xmm,_xmm,_xmm_m128 },
2806         { ASM_END }
2807 ];
2808 
2809 PTRNTAB1[2] aptb1PREFETCHNTA = /* PREFETCHNTA */ [
2810         { PREFETCH, _0,_m8 },
2811         { ASM_END }
2812 ];
2813 
2814 PTRNTAB1[2] aptb1PREFETCHT0 = /* PREFETCHT0 */ [
2815         { PREFETCH, _1,_m8 },
2816         { ASM_END }
2817 ];
2818 
2819 PTRNTAB1[2] aptb1PREFETCHT1 = /* PREFETCHT1 */ [
2820         { PREFETCH, _2,_m8 },
2821         { ASM_END }
2822 ];
2823 
2824 PTRNTAB1[2] aptb1PREFETCHT2 = /* PREFETCHT2 */ [
2825         { PREFETCH, _3,_m8 },
2826         { ASM_END }
2827 ];
2828 
2829 PTRNTAB1[2] aptb1PREFETCHW = /* PREFETCHW */ [
2830         { 0x0F0D, _1,_m8 },
2831         { ASM_END }
2832 ];
2833 
2834 PTRNTAB1[2] aptb1PREFETCHWT1 = /* PREFETCHWT1 */ [
2835         { 0x0F0D, _2,_m8 },
2836         { ASM_END }
2837 ];
2838 
2839 PTRNTAB2[3] aptb2PSADBW = /* PSADBW */ [
2840         { 0x0FF6, _r,_mm,_mmm64 },
2841         { PSADBW, _r,_xmm,_xmm_m128 },
2842         { ASM_END }
2843 ];
2844 
2845 PTRNTAB3[2] aptb3VPSADBW = /* VPSADBW */ [
2846         { VEX_NDS_128_WIG(PSADBW), _r, _xmm, _xmm, _xmm_m128 },
2847         { ASM_END }
2848 ];
2849 
2850 
2851 PTRNTAB3[2] aptb3PSHUFD = /* PSHUFD */ [
2852         { PSHUFD, _r,_xmm,_xmm_m128,_imm8 },
2853         { ASM_END }
2854 ];
2855 
2856 PTRNTAB3[2] aptb3VPSHUFD = /* VPSHUFD */ [
2857         { VEX_128_WIG(PSHUFD), _r,_xmm,_xmm_m128,_imm8 },
2858         { ASM_END }
2859 ];
2860 
2861 PTRNTAB3[2] aptb3PSHUFHW = /* PSHUFHW */ [
2862         { PSHUFHW, _r,_xmm,_xmm_m128,_imm8 },
2863         { ASM_END }
2864 ];
2865 
2866 PTRNTAB3[2] aptb3VPSHUFHW = /* VPSHUFHW */ [
2867         { VEX_128_WIG(PSHUFHW), _r,_xmm,_xmm_m128,_imm8 },
2868         { ASM_END }
2869 ];
2870 
2871 PTRNTAB3[2] aptb3PSHUFLW = /* PSHUFLW */ [
2872         { PSHUFLW, _r,_xmm,_xmm_m128,_imm8 },
2873         { ASM_END }
2874 ];
2875 
2876 PTRNTAB3[2] aptb3VPSHUFLW = /* VPSHUFLW */ [
2877         { VEX_128_WIG(PSHUFLW), _r,_xmm,_xmm_m128,_imm8 },
2878         { ASM_END }
2879 ];
2880 
2881 PTRNTAB3[2] aptb3PSHUFW = /* PSHUFW */ [
2882         { PSHUFW, _r,_mm,_mmm64,_imm8 },
2883         { ASM_END }
2884 ];
2885 
2886 PTRNTAB2[2] aptb2PSLLDQ = /* PSLLDQ */ [
2887         { (PSLLDQ & 0xFFFFFF), _7,_xmm,_imm8 },
2888         { ASM_END }
2889 ];
2890 
2891 PTRNTAB3[2] aptb3VPSLLDQ = /* VPSLLDQ */ [
2892         { VEX_NDD_128_WIG((PSLLDQ & 0xFFFFFF)), _7, _xmm, _xmm, _imm8 },
2893         { ASM_END }
2894 ];
2895 
2896 PTRNTAB2[2] aptb2PSRLDQ = /* PSRLDQ */ [
2897         { PSRLDQ & 0xFFFFFF, _3,_xmm,_imm8 },
2898         { ASM_END }
2899 ];
2900 
2901 PTRNTAB3[2] aptb3VPSRLDQ = /* VPSRLDQ */ [
2902         { VEX_NDD_128_WIG((PSRLDQ & 0xFFFFFF)), _3, _xmm, _xmm, _imm8 },
2903         { ASM_END }
2904 ];
2905 
2906 PTRNTAB2[3] aptb2PSUBQ = /* PSUBQ */ [
2907         { 0x0FFB, _r,_mm,_mmm64 },
2908         { PSUBQ, _r,_xmm,_xmm_m128 },
2909         { ASM_END }
2910 ];
2911 
2912 PTRNTAB3[2] aptb3VPSUBQ = /* VPSUBQ */ [
2913         { VEX_NDS_128_WIG(PSUBQ), _r, _xmm, _xmm, _xmm_m128 },
2914         { ASM_END }
2915 ];
2916 
2917 PTRNTAB2[2] aptb2PUNPCKHQDQ = /* PUNPCKHQDQ */ [
2918         { PUNPCKHQDQ, _r,_xmm,_xmm_m128 },
2919         { ASM_END }
2920 ];
2921 
2922 PTRNTAB3[2] aptb3VPUNPCKHQDQ = /* VPUNPCKHQDQ */ [
2923         { VEX_NDS_128_WIG(PUNPCKHQDQ), _r,_xmm,_xmm,_xmm_m128 },
2924         { ASM_END }
2925 ];
2926 
2927 PTRNTAB2[2] aptb2PUNPCKLQDQ = /* PUNPCKLQDQ */ [
2928         { PUNPCKLQDQ, _r,_xmm,_xmm_m128 },
2929         { ASM_END }
2930 ];
2931 
2932 PTRNTAB3[2] aptb3VPUNPCKLQDQ = /* VPUNPCKLQDQ */ [
2933         { VEX_NDS_128_WIG(PUNPCKLQDQ), _r,_xmm,_xmm,_xmm_m128 },
2934         { ASM_END }
2935 ];
2936 
2937 PTRNTAB2[2] aptb2RCPPS = /* RCPPS */ [
2938         { RCPPS, _r,_xmm,_xmm_m128 },
2939         { ASM_END }
2940 ];
2941 
2942 PTRNTAB2[3] aptb2VRCPPS = /* VRCPPS */ [
2943         { VEX_128_WIG(RCPPS), _r, _xmm, _xmm_m128 },
2944         { VEX_256_WIG(RCPPS), _r, _ymm, _ymm_m256 },
2945         { ASM_END }
2946 ];
2947 
2948 PTRNTAB2[2] aptb2RCPSS = /* RCPSS */ [
2949         { RCPSS, _r,_xmm,_xmm_m32 },
2950         { ASM_END }
2951 ];
2952 
2953 PTRNTAB3[2] aptb3VRCPSS = /* VRCPSS */ [
2954         { VEX_NDS_128_WIG(RCPSS), _r, _xmm, _xmm, _xmm_m32 },
2955         { ASM_END }
2956 ];
2957 
2958 PTRNTAB2[2] aptb2RSQRTPS = /* RSQRTPS */ [
2959         { RSQRTPS, _r,_xmm,_xmm_m128 },
2960         { ASM_END }
2961 ];
2962 
2963 PTRNTAB2[2] aptb2RSQRTSS = /* RSQRTSS */ [
2964         { RSQRTSS, _r,_xmm,_xmm_m32 },
2965         { ASM_END }
2966 ];
2967 
2968 PTRNTAB3[2] aptb3SHUFPD = /* SHUFPD */ [
2969         { SHUFPD, _r,_xmm,_xmm_m128,_imm8 },
2970         { ASM_END }
2971 ];
2972 
2973 PTRNTAB4[3] aptb4VSHUFPD = /* VSHUFPD */ [
2974         { VEX_NDS_128_WIG(SHUFPD), _r,_xmm,_xmm,_xmm_m128,_imm8 },
2975         { VEX_NDS_256_WIG(SHUFPD), _r,_ymm,_ymm,_ymm_m256,_imm8 },
2976         { ASM_END }
2977 ];
2978 
2979 PTRNTAB3[2] aptb3SHUFPS = /* SHUFPS */ [
2980         { SHUFPS, _r,_xmm,_xmm_m128,_imm8 },
2981         { ASM_END }
2982 ];
2983 
2984 PTRNTAB4[3] aptb4VSHUFPS = /* VSHUFPS */ [
2985         { VEX_NDS_128_WIG(SHUFPS), _r,_xmm,_xmm,_xmm_m128,_imm8 },
2986         { VEX_NDS_256_WIG(SHUFPS), _r,_ymm,_ymm,_ymm_m256,_imm8 },
2987         { ASM_END }
2988 ];
2989 
2990 PTRNTAB2[2] aptb2SQRTPD = /* SQRTPD */ [
2991         { SQRTPD, _r,_xmm,_xmm_m128 },
2992         { ASM_END }
2993 ];
2994 
2995 PTRNTAB2[3] aptb2VSQRTPD = /* VSQRTPD */ [
2996         { VEX_128_WIG(SQRTPD), _r, _xmm, _xmm_m128 },
2997         { VEX_256_WIG(SQRTPD), _r, _ymm, _ymm_m256 },
2998         { ASM_END }
2999 ];
3000 
3001 PTRNTAB2[2] aptb2SQRTPS = /* SQRTPS */ [
3002         { SQRTPS, _r,_xmm,_xmm_m128 },
3003         { ASM_END }
3004 ];
3005 
3006 PTRNTAB2[3] aptb2VSQRTPS = /* VSQRTPS */ [
3007         { VEX_128_WIG(SQRTPS), _r, _xmm, _xmm_m128 },
3008         { VEX_256_WIG(SQRTPS), _r, _ymm, _ymm_m256 },
3009         { ASM_END }
3010 ];
3011 
3012 PTRNTAB2[2] aptb2SQRTSD = /* SQRTSD */ [
3013         { SQRTSD, _r,_xmm,_xmm_m64 },
3014         { ASM_END }
3015 ];
3016 
3017 PTRNTAB3[2] aptb3VSQRTSD = /* VSQRTSD */ [
3018         { VEX_NDS_128_WIG(SQRTSD), _r, _xmm, _xmm, _xmm_m64 },
3019         { ASM_END }
3020 ];
3021 
3022 PTRNTAB2[2] aptb2SQRTSS = /* SQRTSS */ [
3023         { SQRTSS, _r,_xmm,_xmm_m32 },
3024         { ASM_END }
3025 ];
3026 
3027 PTRNTAB3[2] aptb3VSQRTSS = /* VSQRTSS */ [
3028         { VEX_NDS_128_WIG(SQRTSS), _r, _xmm, _xmm, _xmm_m32 },
3029         { ASM_END }
3030 ];
3031 
3032 PTRNTAB2[2] aptb2SUBPD = /* SUBPD */ [
3033         { SUBPD, _r,_xmm,_xmm_m128 },
3034         { ASM_END }
3035 ];
3036 
3037 PTRNTAB3[3] aptb3VSUBPD  = /* VSUBPD  */ [
3038         { VEX_NDS_128_WIG(SUBPD), _r, _xmm, _xmm, _xmm_m128, },
3039         { VEX_NDS_256_WIG(SUBPD), _r, _ymm, _ymm, _ymm_m256, },
3040         { ASM_END }
3041 ];
3042 
3043 PTRNTAB2[2] aptb2SUBPS = /* SUBPS */ [
3044         { SUBPS, _r,_xmm,_xmm_m128 },
3045         { ASM_END }
3046 ];
3047 
3048 PTRNTAB3[3] aptb3VSUBPS  = /* VSUBPS  */ [
3049         { VEX_NDS_128_WIG(SUBPS), _r, _xmm, _xmm, _xmm_m128, },
3050         { VEX_NDS_256_WIG(SUBPS), _r, _ymm, _ymm, _ymm_m256, },
3051         { ASM_END }
3052 ];
3053 
3054 PTRNTAB2[2] aptb2SUBSD = /* SUBSD */ [
3055         { SUBSD, _r,_xmm,_xmm_m64 },
3056         { ASM_END }
3057 ];
3058 
3059 PTRNTAB3[2] aptb3VSUBSD = /* VSUBSD */ [
3060         { VEX_NDS_128_WIG(SUBSD), _r, _xmm, _xmm, _xmm_m64, },
3061         { ASM_END }
3062 ];
3063 
3064 PTRNTAB2[2] aptb2SUBSS = /* SUBSS */ [
3065         { SUBSS, _r,_xmm,_xmm_m32 },
3066         { ASM_END }
3067 ];
3068 
3069 PTRNTAB3[2] aptb3VSUBSS = /* VSUBSS */ [
3070         { VEX_NDS_128_WIG(SUBSS), _r, _xmm, _xmm, _xmm_m32, },
3071         { ASM_END }
3072 ];
3073 
3074 PTRNTAB2[2] aptb2UCOMISD = /* UCOMISD */ [
3075         { UCOMISD, _r,_xmm,_xmm_m64 },
3076         { ASM_END }
3077 ];
3078 
3079 PTRNTAB2[2] aptb2VUCOMISD = /* VUCOMISD */ [
3080         { VEX_128_WIG(UCOMISD), _r,_xmm,_xmm_m64 },
3081         { ASM_END }
3082 ];
3083 
3084 PTRNTAB2[2] aptb2UCOMISS = /* UCOMISS */ [
3085         { UCOMISS, _r,_xmm,_xmm_m32 },
3086         { ASM_END }
3087 ];
3088 
3089 PTRNTAB2[2] aptb2VUCOMISS = /* VUCOMISS */ [
3090         { VEX_128_WIG(UCOMISS), _r,_xmm,_xmm_m32 },
3091         { ASM_END }
3092 ];
3093 
3094 PTRNTAB2[2] aptb2UNPCKHPD = /* UNPCKHPD */ [
3095         { UNPCKHPD, _r,_xmm,_xmm_m128 },
3096         { ASM_END }
3097 ];
3098 
3099 PTRNTAB3[3] aptb3VUNPCKHPD = /* VUNPCKHPD */ [
3100         { VEX_NDS_128_WIG(UNPCKHPD), _r,_xmm,_xmm,_xmm_m128 },
3101         { VEX_NDS_256_WIG(UNPCKHPD), _r,_ymm,_ymm,_ymm_m256 },
3102         { ASM_END }
3103 ];
3104 
3105 PTRNTAB2[2] aptb2UNPCKHPS = /* UNPCKHPS */ [
3106         { UNPCKHPS, _r,_xmm,_xmm_m128 },
3107         { ASM_END }
3108 ];
3109 
3110 PTRNTAB3[3] aptb3VUNPCKHPS = /* VUNPCKHPS */ [
3111         { VEX_NDS_128_WIG(UNPCKHPS), _r,_xmm,_xmm,_xmm_m128 },
3112         { VEX_NDS_256_WIG(UNPCKHPS), _r,_ymm,_ymm,_ymm_m256 },
3113         { ASM_END }
3114 ];
3115 
3116 PTRNTAB2[2] aptb2UNPCKLPD = /* UNPCKLPD */ [
3117         { UNPCKLPD, _r,_xmm,_xmm_m128 },
3118         { ASM_END }
3119 ];
3120 
3121 PTRNTAB3[3] aptb3VUNPCKLPD = /* VUNPCKLPD */ [
3122         { VEX_NDS_128_WIG(UNPCKLPD), _r,_xmm,_xmm,_xmm_m128 },
3123         { VEX_NDS_256_WIG(UNPCKLPD), _r,_ymm,_ymm,_ymm_m256 },
3124         { ASM_END }
3125 ];
3126 
3127 PTRNTAB2[2] aptb2UNPCKLPS = /* UNPCKLPS */ [
3128         { UNPCKLPS, _r,_xmm,_xmm_m128 },
3129         { ASM_END }
3130 ];
3131 
3132 PTRNTAB3[3] aptb3VUNPCKLPS = /* VUNPCKLPS */ [
3133         { VEX_NDS_128_WIG(UNPCKLPS), _r,_xmm,_xmm,_xmm_m128 },
3134         { VEX_NDS_256_WIG(UNPCKLPS), _r,_ymm,_ymm,_ymm_m256 },
3135         { ASM_END }
3136 ];
3137 
3138 PTRNTAB2[2] aptb2XORPD = /* XORPD */ [
3139         { XORPD, _r,_xmm,_xmm_m128 },
3140         { ASM_END }
3141 ];
3142 
3143 PTRNTAB3[3] aptb3VXORPD = /* VXORPD */ [
3144         { VEX_NDS_128_WIG(XORPD), _r,_xmm,_xmm,_xmm_m128 },
3145         { VEX_NDS_256_WIG(XORPD), _r,_ymm,_ymm,_ymm_m256 },
3146         { ASM_END }
3147 ];
3148 
3149 PTRNTAB2[2] aptb2XORPS = /* XORPS */ [
3150         { XORPS, _r,_xmm,_xmm_m128 },
3151         { ASM_END }
3152 ];
3153 
3154 PTRNTAB3[3] aptb3VXORPS = /* VXORPS */ [
3155         { VEX_NDS_128_WIG(XORPS), _r,_xmm,_xmm,_xmm_m128 },
3156         { VEX_NDS_256_WIG(XORPS), _r,_ymm,_ymm,_ymm_m256 },
3157         { ASM_END }
3158 ];
3159 
3160 /**** AMD only instructions ****/
3161 
3162 /*
3163         pavgusb
3164         pf2id
3165         pfacc
3166         pfadd
3167         pfcmpeq
3168         pfcmpge
3169         pfcmpgt
3170         pfmax
3171         pfmin
3172         pfmul
3173         pfnacc
3174         pfpnacc
3175         pfrcp
3176         pfrcpit1
3177         pfrcpit2
3178         pfrsqit1
3179         pfrsqrt
3180         pfsub
3181         pfsubr
3182         pi2fd
3183         pmulhrw
3184         pswapd
3185 */
3186 
3187 PTRNTAB2[2] aptb2PAVGUSB = /* PAVGUSB */ [
3188         { 0x0F0FBF, _r,_mm,_mmm64 },
3189         { ASM_END }
3190 ];
3191 
3192 PTRNTAB2[2] aptb2PF2ID = /* PF2ID */ [
3193         { 0x0F0F1D, _r,_mm,_mmm64 },
3194         { ASM_END }
3195 ];
3196 
3197 PTRNTAB2[2] aptb2PFACC = /* PFACC */ [
3198         { 0x0F0FAE, _r,_mm,_mmm64 },
3199         { ASM_END }
3200 ];
3201 
3202 PTRNTAB2[2] aptb2PFADD = /* PFADD */ [
3203         { 0x0F0F9E, _r,_mm,_mmm64 },
3204         { ASM_END }
3205 ];
3206 
3207 PTRNTAB2[2] aptb2PFCMPEQ = /* PFCMPEQ */ [
3208         { 0x0F0FB0, _r,_mm,_mmm64 },
3209         { ASM_END }
3210 ];
3211 
3212 PTRNTAB2[2] aptb2PFCMPGE = /* PFCMPGE */ [
3213         { 0x0F0F90, _r,_mm,_mmm64 },
3214         { ASM_END }
3215 ];
3216 
3217 PTRNTAB2[2] aptb2PFCMPGT = /* PFCMPGT */ [
3218         { 0x0F0FA0, _r,_mm,_mmm64 },
3219         { ASM_END }
3220 ];
3221 
3222 PTRNTAB2[2] aptb2PFMAX = /* PFMAX */ [
3223         { 0x0F0FA4, _r,_mm,_mmm64 },
3224         { ASM_END }
3225 ];
3226 
3227 PTRNTAB2[2] aptb2PFMIN = /* PFMIN */ [
3228         { 0x0F0F94, _r,_mm,_mmm64 },
3229         { ASM_END }
3230 ];
3231 
3232 PTRNTAB2[2] aptb2PFMUL = /* PFMUL */ [
3233         { 0x0F0FB4, _r,_mm,_mmm64 },
3234         { ASM_END }
3235 ];
3236 
3237 PTRNTAB2[2] aptb2PFNACC = /* PFNACC */ [
3238         { 0x0F0F8A, _r,_mm,_mmm64 },
3239         { ASM_END }
3240 ];
3241 
3242 PTRNTAB2[2] aptb2PFPNACC = /* PFPNACC */ [
3243         { 0x0F0F8E, _r,_mm,_mmm64 },
3244         { ASM_END }
3245 ];
3246 
3247 PTRNTAB2[2] aptb2PFRCP = /* PFRCP */ [
3248         { 0x0F0F96, _r,_mm,_mmm64 },
3249         { ASM_END }
3250 ];
3251 
3252 PTRNTAB2[2] aptb2PFRCPIT1 = /* PFRCPIT1 */ [
3253         { 0x0F0FA6, _r,_mm,_mmm64 },
3254         { ASM_END }
3255 ];
3256 
3257 PTRNTAB2[2] aptb2PFRCPIT2 = /* PFRCPIT2 */ [
3258         { 0x0F0FB6, _r,_mm,_mmm64 },
3259         { ASM_END }
3260 ];
3261 
3262 PTRNTAB2[2] aptb2PFRSQIT1 = /* PFRSQIT1 */ [
3263         { 0x0F0FA7, _r,_mm,_mmm64 },
3264         { ASM_END }
3265 ];
3266 
3267 PTRNTAB2[2] aptb2PFRSQRT = /* PFRSQRT */ [
3268         { 0x0F0F97, _r,_mm,_mmm64 },
3269         { ASM_END }
3270 ];
3271 
3272 PTRNTAB2[2] aptb2PFSUB = /* PFSUB */ [
3273         { 0x0F0F9A, _r,_mm,_mmm64 },
3274         { ASM_END }
3275 ];
3276 
3277 PTRNTAB2[2] aptb2PFSUBR = /* PFSUBR */ [
3278         { 0x0F0FAA, _r,_mm,_mmm64 },
3279         { ASM_END }
3280 ];
3281 
3282 PTRNTAB2[2] aptb2PI2FD = /* PI2FD */ [
3283         { 0x0F0F0D, _r,_mm,_mmm64 },
3284         { ASM_END }
3285 ];
3286 
3287 PTRNTAB2[2] aptb2PMULHRW = /* PMULHRW */ [
3288         { 0x0F0FB7, _r,_mm,_mmm64 },
3289         { ASM_END }
3290 ];
3291 
3292 PTRNTAB2[2] aptb2PSWAPD = /* PSWAPD */ [
3293         { 0x0F0FBB, _r,_mm,_mmm64 },
3294         { ASM_END }
3295 ];
3296 
3297 /* ======================= Pentium 4 (Prescott) ======================= */
3298 
3299 /*
3300         ADDSUBPD
3301         ADDSUBPS
3302         FISTTP
3303         HADDPD
3304         HADDPS
3305         HSUBPD
3306         HSUBPS
3307         LDDQU
3308         MONITOR
3309         MOVDDUP
3310         MOVSHDUP
3311         MOVSLDUP
3312         MWAIT
3313  */
3314 
3315 PTRNTAB1[4]  aptb1FISTTP = /* FISTTP */ [
3316         { 0xdf, _1, _m16 },
3317         { 0xdb, _1, _m32 },
3318         { 0xdd, _1, _fm64 },
3319         { ASM_END }
3320 ];
3321 
3322 PTRNTAB0[1] aptb0MONITOR =  /* MONITOR */ [
3323         { MONITOR, 0 }
3324 ];
3325 
3326 PTRNTAB0[1] aptb0MWAIT =  /* MWAIT */ [
3327         { MWAIT, 0 }
3328 ];
3329 
3330 PTRNTAB2[2] aptb2ADDSUBPD = /* ADDSUBPD */ [
3331         { ADDSUBPD, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3332         { ASM_END }
3333 ];
3334 
3335 PTRNTAB3[3]  aptb3VADDSUBPD = /* VADDSUBPD */ [
3336         { VEX_NDS_128_WIG(ADDSUBPD), _r, _xmm, _xmm, _xmm_m128, },
3337         { VEX_NDS_256_WIG(ADDSUBPD), _r, _ymm, _ymm, _ymm_m256, },
3338         { ASM_END }
3339 ];
3340 
3341 PTRNTAB2[2] aptb2ADDSUBPS = /* ADDSUBPS */ [
3342         { ADDSUBPS, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3343         { ASM_END }
3344 ];
3345 
3346 PTRNTAB3[3]  aptb3VADDSUBPS = /* VADDSUBPS */ [
3347         { VEX_NDS_128_WIG(ADDSUBPS), _r, _xmm, _xmm, _xmm_m128, },
3348         { VEX_NDS_256_WIG(ADDSUBPS), _r, _ymm, _ymm, _ymm_m256, },
3349         { ASM_END }
3350 ];
3351 
3352 PTRNTAB2[2] aptb2HADDPD = /* HADDPD */ [
3353         { HADDPD, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3354         { ASM_END }
3355 ];
3356 
3357 PTRNTAB3[3] aptb3VHADDPD = /* VHADDPD */ [
3358         { VEX_NDS_128_WIG(HADDPD), _r, _xmm, _xmm, _xmm_m128 },
3359         { VEX_NDS_256_WIG(HADDPD), _r, _ymm, _ymm, _ymm_m256 },
3360         { ASM_END }
3361 ];
3362 
3363 PTRNTAB2[2] aptb2HADDPS = /* HADDPS */ [
3364         { HADDPS, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3365         { ASM_END }
3366 ];
3367 
3368 PTRNTAB3[3] aptb3VHADDPS = /* VHADDPS */ [
3369         { VEX_NDS_128_WIG(HADDPS), _r, _xmm, _xmm, _xmm_m128 },
3370         { VEX_NDS_256_WIG(HADDPS), _r, _ymm, _ymm, _ymm_m256 },
3371         { ASM_END }
3372 ];
3373 
3374 PTRNTAB2[2] aptb2HSUBPD = /* HSUBPD */ [
3375         { HSUBPD, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3376         { ASM_END }
3377 ];
3378 
3379 PTRNTAB2[2] aptb2HSUBPS = /* HSUBPS */ [
3380         { HSUBPS, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3381         { ASM_END }
3382 ];
3383 
3384 PTRNTAB2[2] aptb2LDDQU = /* LDDQU */ [
3385         { LDDQU, _r,_xmm,_m128 },            // xmm1,mem
3386         { ASM_END }
3387 ];
3388 
3389 PTRNTAB2[3] aptb2VLDDQU = /* VLDDQU */ [
3390         { VEX_128_WIG(LDDQU), _r, _xmm, _m128 },
3391         { VEX_256_WIG(LDDQU), _r, _ymm, _m256 },
3392         { ASM_END }
3393 ];
3394 
3395 PTRNTAB2[2] aptb2MOVDDUP = /* MOVDDUP */ [
3396         { MOVDDUP, _r,_xmm,_xmm_m64 },         // xmm1,xmm2/m64
3397         { ASM_END }
3398 ];
3399 
3400 PTRNTAB2[3] aptb2VMOVDDUP = /* VMOVDDUP */ [
3401         { VEX_128_WIG(MOVDDUP), _r,_xmm,_xmm_m64 },
3402         { VEX_256_WIG(MOVDDUP), _r,_ymm,_ymm_m256 },
3403         { ASM_END }
3404 ];
3405 
3406 PTRNTAB2[2] aptb2MOVSHDUP = /* MOVSHDUP */ [
3407         { MOVSHDUP, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3408         { ASM_END }
3409 ];
3410 
3411 PTRNTAB2[3] aptb2VMOVSHDUP = /* VMOVSHDUP */ [
3412         { VEX_128_WIG(MOVSHDUP), _r,_xmm,_xmm_m128 },
3413         { VEX_256_WIG(MOVSHDUP), _r,_ymm,_ymm_m256 },
3414         { ASM_END }
3415 ];
3416 
3417 PTRNTAB2[2] aptb2MOVSLDUP = /* MOVSLDUP */ [
3418         { MOVSLDUP, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
3419         { ASM_END }
3420 ];
3421 
3422 PTRNTAB2[3] aptb2VMOVSLDUP = /* VMOVSLDUP */ [
3423         { VEX_128_WIG(MOVSLDUP), _r,_xmm,_xmm_m128 },
3424         { VEX_256_WIG(MOVSLDUP), _r,_ymm,_ymm_m256 },
3425         { ASM_END }
3426 ];
3427 
3428 /* ======================= SSSE3 ======================= */
3429 
3430 /*
3431 palignr
3432 phaddd
3433 phaddw
3434 phaddsw
3435 phsubd
3436 phsubw
3437 phsubsw
3438 pmaddubsw
3439 pmulhrsw
3440 pshufb
3441 pabsb
3442 pabsd
3443 pabsw
3444 psignb
3445 psignd
3446 psignw
3447 */
3448 
3449 PTRNTAB3[3] aptb3PALIGNR = /* PALIGNR */ [
3450         { 0x0F3A0F, _r,_mm,_mmm64, _imm8 },
3451         { PALIGNR, _r,_xmm,_xmm_m128, _imm8 },
3452         { ASM_END }
3453 ];
3454 
3455 PTRNTAB4[2] aptb4VPALIGNR = /* VPALIGNR */ [
3456         { VEX_NDS_128_WIG(PALIGNR), _r,_xmm,_xmm,_xmm_m128, _imm8 },
3457         { ASM_END }
3458 ];
3459 
3460 PTRNTAB2[3] aptb2PHADDD = /* PHADDD */ [
3461         { 0x0F3802, _r,_mm,_mmm64 },
3462         { PHADDD, _r,_xmm,_xmm_m128 },
3463         { ASM_END }
3464 ];
3465 
3466 PTRNTAB3[2] aptb3VPHADDD = /* VPHADDD */ [
3467         { VEX_NDS_128_WIG(PHADDD), _r, _xmm, _xmm, _xmm_m128 },
3468         { ASM_END }
3469 ];
3470 
3471 PTRNTAB2[3] aptb2PHADDW = /* PHADDW */ [
3472         { 0x0F3801, _r,_mm,_mmm64 },
3473         { PHADDW, _r,_xmm,_xmm_m128 },
3474         { ASM_END }
3475 ];
3476 
3477 PTRNTAB3[2] aptb3VPHADDW = /* VPHADDW */ [
3478         { VEX_NDS_128_WIG(PHADDW), _r, _xmm, _xmm, _xmm_m128 },
3479         { ASM_END }
3480 ];
3481 
3482 PTRNTAB2[3] aptb2PHADDSW = /* PHADDSW */ [
3483         { 0x0F3803, _r,_mm,_mmm64 },
3484         { PHADDSW, _r,_xmm,_xmm_m128 },
3485         { ASM_END }
3486 ];
3487 
3488 PTRNTAB3[2] aptb3VPHADDSW = /* VPHADDSW */ [
3489         { VEX_NDS_128_WIG(PHADDSW), _r, _xmm, _xmm, _xmm_m128 },
3490         { ASM_END }
3491 ];
3492 
3493 PTRNTAB2[3] aptb2PHSUBD = /* PHSUBD */ [
3494         { 0x0F3806, _r,_mm,_mmm64 },
3495         { PHSUBD, _r,_xmm,_xmm_m128 },
3496         { ASM_END }
3497 ];
3498 
3499 PTRNTAB3[2] aptb3VPHSUBD = /* VPHSUBD */ [
3500         { VEX_NDS_128_WIG(PHSUBD), _r, _xmm, _xmm, _xmm_m128 },
3501         { ASM_END }
3502 ];
3503 
3504 PTRNTAB2[3] aptb2PHSUBW = /* PHSUBW */ [
3505         { 0x0F3805, _r,_mm,_mmm64 },
3506         { PHSUBW, _r,_xmm,_xmm_m128 },
3507         { ASM_END }
3508 ];
3509 
3510 PTRNTAB3[2] aptb3VPHSUBW = /* VPHSUBW */ [
3511         { VEX_NDS_128_WIG(PHSUBW), _r, _xmm, _xmm, _xmm_m128 },
3512         { ASM_END }
3513 ];
3514 
3515 PTRNTAB2[3] aptb2PHSUBSW = /* PHSUBSW */ [
3516         { 0x0F3807, _r,_mm,_mmm64 },
3517         { PHSUBSW, _r,_xmm,_xmm_m128 },
3518         { ASM_END }
3519 ];
3520 
3521 PTRNTAB3[2] aptb3VPHSUBSW = /* VPHSUBSW */ [
3522         { VEX_NDS_128_WIG(PHSUBSW), _r, _xmm, _xmm, _xmm_m128 },
3523         { ASM_END }
3524 ];
3525 
3526 PTRNTAB2[3] aptb2PMADDUBSW = /* PMADDUBSW */ [
3527         { 0x0F3804, _r,_mm,_mmm64 },
3528         { PMADDUBSW, _r,_xmm,_xmm_m128 },
3529         { ASM_END }
3530 ];
3531 
3532 PTRNTAB3[2] aptb3VPMADDUBSW = /* VPMADDUBSW */ [
3533         { VEX_NDS_128_WIG(PMADDUBSW), _r, _xmm, _xmm, _xmm_m128 },
3534         { ASM_END }
3535 ];
3536 
3537 PTRNTAB2[3] aptb2PMULHRSW = /* PMULHRSW */ [
3538         { 0x0F380B, _r,_mm,_mmm64 },
3539         { PMULHRSW, _r,_xmm,_xmm_m128 },
3540         { ASM_END }
3541 ];
3542 
3543 PTRNTAB3[2] aptb3VPMULHRSW = /* VPMULHRSW */ [
3544         { VEX_NDS_128_WIG(PMULHRSW), _r, _xmm, _xmm, _xmm_m128 },
3545         { ASM_END }
3546 ];
3547 
3548 PTRNTAB2[3] aptb2PSHUFB = /* PSHUFB */ [
3549         { 0x0F3800, _r,_mm,_mmm64 },
3550         { PSHUFB, _r,_xmm,_xmm_m128 },
3551         { ASM_END }
3552 ];
3553 
3554 PTRNTAB3[2] aptb3VPSHUFB = /* VPSHUFB */ [
3555         { VEX_NDS_128_WIG(PSHUFB), _r,_xmm,_xmm,_xmm_m128 },
3556         { ASM_END }
3557 ];
3558 
3559 PTRNTAB2[3] aptb2PABSB = /* PABSB */ [
3560         { 0x0F381C, _r,_mm,_mmm64 },
3561         { PABSB, _r,_xmm,_xmm_m128 },
3562         { ASM_END }
3563 ];
3564 
3565 PTRNTAB2[2] aptb2VPABSB  = /* VPABSB */ [
3566         { VEX_128_WIG(PABSB), _r, _xmm, _xmm_m128 },
3567         { ASM_END }
3568 ];
3569 
3570 
3571 PTRNTAB2[3] aptb2PABSD = /* PABSD */ [
3572         { 0x0F381E, _r,_mm,_mmm64 },
3573         { PABSD, _r,_xmm,_xmm_m128 },
3574         { ASM_END }
3575 ];
3576 
3577 PTRNTAB2[2] aptb2VPABSD  = /* VPABSD  */ [
3578         { VEX_128_WIG(PABSD), _r, _xmm, _xmm_m128 },
3579         { ASM_END }
3580 ];
3581 
3582 PTRNTAB2[3] aptb2PABSW = /* PABSW */ [
3583         { 0x0F381D, _r,_mm,_mmm64 },
3584         { PABSW, _r,_xmm,_xmm_m128 },
3585         { ASM_END }
3586 ];
3587 
3588 PTRNTAB2[2] aptb2VPABSW  = /* VPABSW */ [
3589         { VEX_128_WIG(PABSW), _r, _xmm, _xmm_m128 },
3590         { ASM_END }
3591 ];
3592 
3593 PTRNTAB2[3] aptb2PSIGNB = /* PSIGNB */ [
3594         { 0x0F3808, _r,_mm,_mmm64 },
3595         { PSIGNB, _r,_xmm,_xmm_m128 },
3596         { ASM_END }
3597 ];
3598 
3599 PTRNTAB3[2] aptb3VPSIGNB = /* VPSIGNB */ [
3600         { VEX_NDS_128_WIG(PSIGNB), _r, _xmm, _xmm, _xmm_m128 },
3601         { ASM_END }
3602 ];
3603 
3604 PTRNTAB2[3] aptb2PSIGND = /* PSIGND */ [
3605         { 0x0F380A, _r,_mm,_mmm64 },
3606         { PSIGND, _r,_xmm,_xmm_m128 },
3607         { ASM_END }
3608 ];
3609 
3610 PTRNTAB3[2] aptb3VPSIGND = /* VPSIGND */ [
3611         { VEX_NDS_128_WIG(PSIGND), _r, _xmm, _xmm, _xmm_m128 },
3612         { ASM_END }
3613 ];
3614 
3615 PTRNTAB2[3] aptb2PSIGNW = /* PSIGNW */ [
3616         { 0x0F3809, _r,_mm,_mmm64 },
3617         { PSIGNW, _r,_xmm,_xmm_m128 },
3618         { ASM_END }
3619 ];
3620 
3621 PTRNTAB3[2] aptb3VPSIGNW = /* VPSIGNW */ [
3622         { VEX_NDS_128_WIG(PSIGNW), _r, _xmm, _xmm, _xmm_m128 },
3623         { ASM_END }
3624 ];
3625 
3626 /* ======================= SSE4.1 ======================= */
3627 
3628 /*
3629 blendpd
3630 blendps
3631 blendvpd
3632 blendvps
3633 dppd
3634 dpps
3635 extractps
3636 insertps
3637 movntdqa
3638 mpsadbw
3639 packusdw
3640 pblendvb
3641 pblendw
3642 pcmpeqq
3643 pextrb
3644 pextrd
3645 pextrq
3646 pextrw
3647 phminposuw
3648 pinsrb
3649 pinsrd
3650 pinsrq
3651 pmaxsb
3652 pmaxsd
3653 pmaxud
3654 pmaxuw
3655 pminsb
3656 pminsd
3657 pminud
3658 pminuw
3659 pmovsxbd
3660 pmovsxbq
3661 pmovsxbw
3662 pmovsxwd
3663 pmovsxwq
3664 pmovsxdq
3665 pmovzxbd
3666 pmovzxbq
3667 pmovzxbw
3668 pmovzxwd
3669 pmovzxwq
3670 pmovzxdq
3671 pmuldq
3672 pmulld
3673 ptest
3674 roundpd
3675 roundps
3676 roundsd
3677 roundss
3678  */
3679 
3680 PTRNTAB3[2] aptb3BLENDPD = /* BLENDPD */ [
3681         { BLENDPD, _r, _xmm, _xmm_m128, _imm8 },
3682         { ASM_END }
3683 ];
3684 
3685 PTRNTAB4[3] aptb4VBLENDPD = /* VBLENDPD */ [
3686         { VEX_NDS_128_WIG(BLENDPD), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3687         { VEX_NDS_256_WIG(BLENDPD), _r, _ymm, _ymm, _ymm_m256, _imm8 },
3688         { ASM_END }
3689 ];
3690 
3691 PTRNTAB3[2] aptb3BLENDPS = /* BLENDPS */ [
3692         { BLENDPS, _r, _xmm, _xmm_m128, _imm8 },
3693         { ASM_END }
3694 ];
3695 
3696 PTRNTAB4[3] aptb4VBLENDPS = /* VBLENDPS */ [
3697         { VEX_NDS_128_WIG(BLENDPS), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3698         { VEX_NDS_256_WIG(BLENDPS), _r, _ymm, _ymm, _ymm_m256, _imm8 },
3699         { ASM_END }
3700 ];
3701 
3702 PTRNTAB3[2] aptb3BLENDVPD = /* BLENDVPD */ [
3703         { BLENDVPD, _r, _xmm, _xmm_m128, _xmm0 },
3704         { ASM_END }
3705 ];
3706 
3707 PTRNTAB4[3] aptb4VBLENDVPD = /* VBLENDVPD */ [
3708         { VEX_NDS_128_WIG(0x660F3A4B), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3709         { VEX_NDS_256_WIG(0x660F3A4B), _r, _ymm, _ymm, _ymm_m256, _imm8 },
3710         { ASM_END }
3711 ];
3712 
3713 PTRNTAB3[2] aptb3BLENDVPS = /* BLENDVPS */ [
3714         { BLENDVPS, _r, _xmm, _xmm_m128, _xmm0 },
3715         { ASM_END }
3716 ];
3717 
3718 PTRNTAB4[3] aptb4VBLENDVPS = /* VBLENDVPS */ [
3719         { VEX_NDS_128_WIG(0x660F3A4A), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3720         { VEX_NDS_256_WIG(0x660F3A4A), _r, _ymm, _ymm, _ymm_m256, _imm8 },
3721         { ASM_END }
3722 ];
3723 
3724 PTRNTAB3[2] aptb3DPPD = /* DPPD */ [
3725         { DPPD, _r, _xmm, _xmm_m128, _imm8 },
3726         { ASM_END }
3727 ];
3728 
3729 PTRNTAB4[2]  aptb4VDPPD = /* VDPPD */ [
3730         { VEX_NDS_128_WIG(DPPD), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3731         { ASM_END }
3732 ];
3733 
3734 PTRNTAB3[2] aptb3DPPS = /* DPPS */ [
3735         { DPPS, _r, _xmm, _xmm_m128, _imm8 },
3736         { ASM_END }
3737 ];
3738 
3739 PTRNTAB4[3]  aptb4VDPPS = /* VDPPS */ [
3740         { VEX_NDS_128_WIG(DPPS), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3741         { VEX_NDS_256_WIG(DPPS), _r, _ymm, _ymm, _ymm_m256, _imm8 },
3742         { ASM_END }
3743 ];
3744 
3745 PTRNTAB3[2] aptb3EXTRACTPS = /* EXTRACTPS */ [
3746         { EXTRACTPS, _r, _rm32, _xmm, _imm8 },
3747         { ASM_END }
3748 ];
3749 
3750 PTRNTAB3[2] aptb3VEXTRACTPS = /* VEXTRACTPS */ [
3751         { VEX_128_WIG(EXTRACTPS), _r, _rm32, _xmm, _imm8 },
3752         { ASM_END }
3753 ];
3754 
3755 PTRNTAB3[2] aptb3INSERTPS = /* INSERTPS */ [
3756         { INSERTPS, _r, _xmm, _xmm_m32, _imm8 },
3757         { ASM_END }
3758 ];
3759 
3760 PTRNTAB4[2] aptb4VINSERTPS = /* VINSERTPS */ [
3761         { VEX_NDS_128_WIG(INSERTPS), _r, _xmm, _xmm, _xmm_m32, _imm8 },
3762         { ASM_END }
3763 ];
3764 
3765 PTRNTAB2[2] aptb2MOVNTDQA = /* MOVNTDQA */ [
3766         { MOVNTDQA, _r, _xmm, _m128 },
3767         { ASM_END }
3768 ];
3769 
3770 PTRNTAB2[2] aptb2VMOVNTDQA = /* VMOVNTDQA */ [
3771         { VEX_128_WIG(MOVNTDQA), _r, _xmm, _m128 },
3772         { ASM_END }
3773 ];
3774 
3775 PTRNTAB3[2] aptb3MPSADBW = /* MPSADBW */ [
3776         { MPSADBW, _r, _xmm, _xmm_m128, _imm8 },
3777         { ASM_END }
3778 ];
3779 
3780 PTRNTAB4[2] aptb4VMPSADBW  = /* VMPSADBW */ [
3781         { VEX_NDS_128_WIG(MPSADBW), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3782         { ASM_END }
3783 ];
3784 
3785 PTRNTAB2[2] aptb2PACKUSDW = /* PACKUSDW */ [
3786         { PACKUSDW, _r, _xmm, _xmm_m128 },
3787         { ASM_END }
3788 ];
3789 
3790 PTRNTAB3[2] aptb3VPACKUSDW = /* VPACKUSDW */ [
3791         { VEX_NDS_128_WIG(PACKUSDW), _r, _xmm, _xmm, _xmm_m128 },
3792         { ASM_END }
3793 ];
3794 
3795 PTRNTAB3[2] aptb3PBLENDVB = /* PBLENDVB */ [
3796         { PBLENDVB, _r, _xmm, _xmm_m128, _xmm0 },
3797         { ASM_END }
3798 ];
3799 
3800 PTRNTAB4[2] aptb4VPBLENDVB = /* VPBLENDVB */ [
3801         { VEX_NDS_128_WIG(0x660F3A4C), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3802         { ASM_END }
3803 ];
3804 
3805 PTRNTAB3[2] aptb3PBLENDW = /* PBLENDW */ [
3806         { PBLENDW, _r, _xmm, _xmm_m128, _imm8 },
3807         { ASM_END }
3808 ];
3809 
3810 PTRNTAB4[2] aptb4VPBLENDW = /* VPBLENDW */ [
3811         { VEX_NDS_128_WIG(PBLENDW), _r, _xmm, _xmm, _xmm_m128, _imm8 },
3812         { ASM_END }
3813 ];
3814 
3815 PTRNTAB2[2] aptb2PCMPEQQ = /* PCMPEQQ */ [
3816         { PCMPEQQ, _r, _xmm, _xmm_m128 },
3817         { ASM_END }
3818 ];
3819 
3820 PTRNTAB3[2] aptb3VPCMPEQQ = /* VPCMPEQQ */ [
3821         { VEX_NDS_128_WIG(PCMPEQQ), _r, _xmm, _xmm, _xmm_m128 },
3822         { ASM_END }
3823 ];
3824 
3825 PTRNTAB3[2] aptb3PEXTRB = /* PEXTRB */ [
3826         { PEXTRB, _r, _regm8, _xmm, _imm8 },
3827         { ASM_END }
3828 ];
3829 
3830 PTRNTAB3[2] aptb3VPEXTRB = /* VPEXTRB */ [
3831         { VEX_128_WIG(PEXTRB), _r, _regm8, _xmm, _imm8 },
3832         { ASM_END }
3833 ];
3834 
3835 PTRNTAB3[2] aptb3PEXTRD = /* PEXTRD */ [
3836         { PEXTRD, _r, _rm32, _xmm, _imm8 },
3837         { ASM_END }
3838 ];
3839 
3840 PTRNTAB3[2] aptb3VPEXTRD = /* VPEXTRD */ [
3841         { VEX_128_WIG(PEXTRD), _r, _rm32, _xmm, _imm8 },
3842         { ASM_END }
3843 ];
3844 
3845 PTRNTAB3[2] aptb3PEXTRQ = /* PEXTRQ */ [
3846         { PEXTRQ, _r|_64_bit, _rm64, _xmm, _imm8 },
3847         { ASM_END }
3848 ];
3849 
3850 PTRNTAB3[2] aptb3VPEXTRQ = /* VPEXTRQ */ [
3851         { VEX_128_W1(PEXTRD), _r, _rm64, _xmm, _imm8 },
3852         { ASM_END }
3853 ];
3854 
3855 PTRNTAB2[2] aptb2PHMINPOSUW = /* PHMINPOSUW  */ [
3856         { PHMINPOSUW, _r, _xmm, _xmm_m128 },
3857         { ASM_END }
3858 ];
3859 
3860 PTRNTAB2[2] aptb2VPHMINPOSUW = /* VPHMINPOSUW */ [
3861         { VEX_128_WIG(PHMINPOSUW), _r, _xmm, _xmm_m128 },
3862         { ASM_END }
3863 ];
3864 
3865 PTRNTAB3[3] aptb3PINSRB = /* PINSRB */ [
3866         { PINSRB, _r, _xmm, _r32, _imm8 },
3867         { PINSRB, _r, _xmm, _rm8, _imm8 },
3868         { ASM_END }
3869 ];
3870 
3871 PTRNTAB4[2] aptb4VPINSRB = /* VPINSRB */ [
3872         { VEX_NDS_128_WIG(PINSRB), _r, _xmm, _xmm, _r32m8, _imm8 },
3873         { ASM_END }
3874 ];
3875 
3876 PTRNTAB3[2] aptb3PINSRD = /* PINSRD */ [
3877         { PINSRD, _r, _xmm, _rm32, _imm8 },
3878         { ASM_END }
3879 ];
3880 
3881 PTRNTAB4[2] aptb4VPINSRD = /* VPINSRD */ [
3882         { VEX_NDS_128_WIG(PINSRD), _r, _xmm, _xmm, _rm32, _imm8 },
3883         { ASM_END }
3884 ];
3885 
3886 PTRNTAB3[2] aptb3PINSRQ = /* PINSRQ */ [
3887         { PINSRQ, _r|_64_bit, _xmm, _rm64, _imm8 },
3888         { ASM_END }
3889 ];
3890 
3891 PTRNTAB4[2] aptb4VPINSRQ = /* VPINSRQ */ [
3892         { VEX_NDS_128_W1(PINSRD), _r, _xmm, _xmm, _rm64, _imm8 },
3893         { ASM_END }
3894 ];
3895 
3896 PTRNTAB2[2] aptb2PMAXSB = /* PMAXSB */ [
3897         { PMAXSB, _r, _xmm, _xmm_m128 },
3898         { ASM_END }
3899 ];
3900 
3901 PTRNTAB3[2] aptb3VPMAXSB = /* VPMAXSB */ [
3902         { VEX_NDS_128_WIG(PMAXSB), _r, _xmm, _xmm, _xmm_m128 },
3903         { ASM_END }
3904 ];
3905 
3906 PTRNTAB2[2] aptb2PMAXSD = /* PMAXSD */ [
3907         { PMAXSD, _r, _xmm, _xmm_m128 },
3908         { ASM_END }
3909 ];
3910 
3911 PTRNTAB3[2] aptb3VPMAXSD = /* VPMAXSD */ [
3912         { VEX_NDS_128_WIG(PMAXSD), _r, _xmm, _xmm, _xmm_m128 },
3913         { ASM_END }
3914 ];
3915 
3916 PTRNTAB2[2] aptb2PMAXUD = /* PMAXUD */ [
3917         { PMAXUD, _r, _xmm, _xmm_m128 },
3918         { ASM_END }
3919 ];
3920 
3921 PTRNTAB3[2] aptb3VPMAXUD = /* VPMAXUD */ [
3922         { VEX_NDS_128_WIG(PMAXUD), _r, _xmm, _xmm, _xmm_m128 },
3923         { ASM_END }
3924 ];
3925 
3926 PTRNTAB2[2] aptb2PMAXUW = /* PMAXUW */ [
3927         { PMAXUW, _r, _xmm, _xmm_m128 },
3928         { ASM_END }
3929 ];
3930 
3931 PTRNTAB3[2] aptb3VPMAXUW = /* VPMAXUW */ [
3932         { VEX_NDS_128_WIG(PMAXUW), _r, _xmm, _xmm, _xmm_m128 },
3933         { ASM_END }
3934 ];
3935 
3936 PTRNTAB2[2] aptb2PMINSB = /* PMINSB */ [
3937         { PMINSB, _r, _xmm, _xmm_m128 },
3938         { ASM_END }
3939 ];
3940 
3941 PTRNTAB3[2] aptb3VPMINSB = /* VPMINSB */ [
3942         { VEX_NDS_128_WIG(PMINSB), _r, _xmm, _xmm, _xmm_m128 },
3943         { ASM_END }
3944 ];
3945 
3946 PTRNTAB2[2] aptb2PMINSD = /* PMINSD */ [
3947         { PMINSD, _r, _xmm, _xmm_m128 },
3948         { ASM_END }
3949 ];
3950 
3951 PTRNTAB3[2] aptb3VPMINSD = /* VPMINSD */ [
3952         { VEX_NDS_128_WIG(PMINSD), _r, _xmm, _xmm, _xmm_m128 },
3953         { ASM_END }
3954 ];
3955 
3956 PTRNTAB2[2] aptb2PMINUD = /* PMINUD */ [
3957         { PMINUD, _r, _xmm, _xmm_m128 },
3958         { ASM_END }
3959 ];
3960 
3961 PTRNTAB3[2] aptb3VPMINUD = /* VPMINUD */ [
3962         { VEX_NDS_128_WIG(PMINUD), _r, _xmm, _xmm, _xmm_m128 },
3963         { ASM_END }
3964 ];
3965 
3966 PTRNTAB2[2] aptb2PMINUW = /* PMINUW */ [
3967         { PMINUW, _r, _xmm, _xmm_m128 },
3968         { ASM_END }
3969 ];
3970 
3971 PTRNTAB3[2] aptb3VPMINUW = /* VPMINUW */ [
3972         { VEX_NDS_128_WIG(PMINUW), _r, _xmm, _xmm, _xmm_m128 },
3973         { ASM_END }
3974 ];
3975 
3976 PTRNTAB2[2] aptb2PMOVSXBW = /* PMOVSXBW */ [
3977         { PMOVSXBW, _r, _xmm, _xmm_m64 },
3978         { ASM_END }
3979 ];
3980 
3981 PTRNTAB2[2] aptb2VPMOVSXBW = /* VPMOVSXBW */ [
3982         { VEX_128_WIG(PMOVSXBW), _r, _xmm, _xmm_m64 },
3983         { ASM_END }
3984 ];
3985 
3986 PTRNTAB2[2] aptb2PMOVSXBD = /* PMOVSXBD */ [
3987         { PMOVSXBD, _r, _xmm, _xmm_m32 },
3988         { ASM_END }
3989 ];
3990 
3991 PTRNTAB2[2] aptb2VPMOVSXBD = /* VPMOVSXBD */ [
3992         { VEX_128_WIG(PMOVSXBD), _r, _xmm, _xmm_m32 },
3993         { ASM_END }
3994 ];
3995 
3996 PTRNTAB2[2] aptb2PMOVSXBQ = /* PMOVSXBQ */ [
3997         { PMOVSXBQ, _r, _xmm, _xmm_m16 },
3998         { ASM_END }
3999 ];
4000 
4001 PTRNTAB2[2] aptb2VPMOVSXBQ = /* VPMOVSXBQ */ [
4002         { VEX_128_WIG(PMOVSXBQ), _r, _xmm, _xmm_m16 },
4003         { ASM_END }
4004 ];
4005 
4006 PTRNTAB2[2] aptb2PMOVSXWD = /* PMOVSXWD */ [
4007         { PMOVSXWD, _r, _xmm, _xmm_m64 },
4008         { ASM_END }
4009 ];
4010 
4011 PTRNTAB2[2] aptb2VPMOVSXWD = /* VPMOVSXWD */ [
4012         { VEX_128_WIG(PMOVSXWD), _r, _xmm, _xmm_m64 },
4013         { ASM_END }
4014 ];
4015 
4016 PTRNTAB2[2] aptb2PMOVSXWQ = /* PMOVSXWQ */ [
4017         { PMOVSXWQ, _r, _xmm, _xmm_m32 },
4018         { ASM_END }
4019 ];
4020 
4021 PTRNTAB2[2] aptb2VPMOVSXWQ = /* VPMOVSXWQ */ [
4022         { VEX_128_WIG(PMOVSXWQ), _r, _xmm, _xmm_m32 },
4023         { ASM_END }
4024 ];
4025 
4026 PTRNTAB2[2] aptb2PMOVSXDQ = /* PMOVSXDQ */ [
4027         { PMOVSXDQ, _r, _xmm, _xmm_m64 },
4028         { ASM_END }
4029 ];
4030 
4031 PTRNTAB2[2] aptb2VPMOVSXDQ = /* VPMOVSXDQ */ [
4032         { VEX_128_WIG(PMOVSXDQ), _r, _xmm, _xmm_m64 },
4033         { ASM_END }
4034 ];
4035 
4036 PTRNTAB2[2] aptb2PMOVZXBW = /* PMOVZXBW */ [
4037         { PMOVZXBW, _r, _xmm, _xmm_m64 },
4038         { ASM_END }
4039 ];
4040 
4041 PTRNTAB2[2] aptb2VPMOVZXBW = /* VPMOVZXBW */ [
4042         { VEX_128_WIG(PMOVZXBW), _r, _xmm, _xmm_m64 },
4043         { ASM_END }
4044 ];
4045 
4046 PTRNTAB2[2] aptb2PMOVZXBD = /* PMOVZXBD */ [
4047         { PMOVZXBD, _r, _xmm, _xmm_m32 },
4048         { ASM_END }
4049 ];
4050 
4051 PTRNTAB2[2] aptb2VPMOVZXBD = /* VPMOVZXBD */ [
4052         { VEX_128_WIG(PMOVZXBD), _r, _xmm, _xmm_m32 },
4053         { ASM_END }
4054 ];
4055 
4056 PTRNTAB2[2] aptb2PMOVZXBQ = /* PMOVZXBQ */ [
4057         { PMOVZXBQ, _r, _xmm, _xmm_m16 },
4058         { ASM_END }
4059 ];
4060 
4061 PTRNTAB2[2] aptb2VPMOVZXBQ = /* VPMOVZXBQ */ [
4062         { VEX_128_WIG(PMOVZXBQ), _r, _xmm, _xmm_m16 },
4063         { ASM_END }
4064 ];
4065 
4066 PTRNTAB2[2] aptb2PMOVZXWD = /* PMOVZXWD */ [
4067         { PMOVZXWD, _r, _xmm, _xmm_m64 },
4068         { ASM_END }
4069 ];
4070 
4071 PTRNTAB2[2] aptb2VPMOVZXWD = /* VPMOVZXWD */ [
4072         { VEX_128_WIG(PMOVZXWD), _r, _xmm, _xmm_m64 },
4073         { ASM_END }
4074 ];
4075 
4076 PTRNTAB2[2] aptb2PMOVZXWQ = /* PMOVZXWQ */ [
4077         { PMOVZXWQ, _r, _xmm, _xmm_m32 },
4078         { ASM_END }
4079 ];
4080 
4081 PTRNTAB2[2] aptb2VPMOVZXWQ = /* VPMOVZXWQ */ [
4082         { VEX_128_WIG(PMOVZXWQ), _r, _xmm, _xmm_m32 },
4083         { ASM_END }
4084 ];
4085 
4086 PTRNTAB2[2] aptb2PMOVZXDQ = /* PMOVZXDQ */ [
4087         { PMOVZXDQ, _r, _xmm, _xmm_m64 },
4088         { ASM_END }
4089 ];
4090 
4091 PTRNTAB2[2] aptb2VPMOVZXDQ = /* VPMOVZXDQ */ [
4092         { VEX_128_WIG(PMOVZXDQ), _r, _xmm, _xmm_m64 },
4093         { ASM_END }
4094 ];
4095 
4096 PTRNTAB2[2] aptb2PMULDQ = /* PMULDQ */ [
4097         { PMULDQ, _r, _xmm, _xmm_m128 },
4098         { ASM_END }
4099 ];
4100 
4101 PTRNTAB3[2] aptb3VPMULDQ = /* VPMULDQ */ [
4102         { VEX_NDS_128_WIG(PMULDQ), _r, _xmm, _xmm, _xmm_m128 },
4103         { ASM_END }
4104 ];
4105 
4106 PTRNTAB2[2] aptb2PMULLD = /* PMULLD */ [
4107         { PMULLD, _r, _xmm, _xmm_m128 },
4108         { ASM_END }
4109 ];
4110 
4111 PTRNTAB3[2] aptb3VPMULLD = /* VPMULLD */ [
4112         { VEX_NDS_128_WIG(PMULLD), _r, _xmm, _xmm, _xmm_m128 },
4113         { ASM_END }
4114 ];
4115 
4116 PTRNTAB2[2] aptb2PTEST = /* PTEST */ [
4117         { PTEST, _r, _xmm, _xmm_m128 },
4118         { ASM_END }
4119 ];
4120 
4121 PTRNTAB2[3] aptb2VPTEST = /* VPTEST */ [
4122         { VEX_128_WIG(PTEST), _r, _xmm, _xmm_m128 },
4123         { VEX_256_WIG(PTEST), _r, _ymm, _ymm_m256 },
4124         { ASM_END }
4125 ];
4126 
4127 PTRNTAB3[2] aptb3ROUNDPD = /* ROUNDPD */ [
4128         { ROUNDPD, _r, _xmm, _xmm_m128, _imm8 },
4129         { ASM_END }
4130 ];
4131 
4132 PTRNTAB3[3] aptb3VROUNDPD = /* VROUNDPD */ [
4133         { VEX_128_WIG(ROUNDPD), _r, _xmm, _xmm_m128, _imm8 },
4134         { VEX_256_WIG(ROUNDPD), _r, _ymm, _ymm_m256, _imm8 },
4135         { ASM_END }
4136 ];
4137 
4138 PTRNTAB3[2] aptb3ROUNDPS = /* ROUNDPS */ [
4139         { ROUNDPS, _r, _xmm, _xmm_m128, _imm8 },
4140         { ASM_END }
4141 ];
4142 
4143 PTRNTAB3[3] aptb3VROUNDPS = /* VROUNDPS */ [
4144         { VEX_128_WIG(ROUNDPS), _r, _xmm, _xmm_m128, _imm8 },
4145         { VEX_256_WIG(ROUNDPS), _r, _ymm, _ymm_m256, _imm8 },
4146         { ASM_END }
4147 ];
4148 
4149 PTRNTAB3[2] aptb3ROUNDSD = /* ROUNDSD */ [
4150         { ROUNDSD, _r, _xmm, _xmm_m64, _imm8 },
4151         { ASM_END }
4152 ];
4153 
4154 PTRNTAB4[2] aptb4VROUNDSD = /* VROUNDSD */ [
4155         { VEX_NDS_128_WIG(ROUNDSD), _r, _xmm, _xmm, _xmm_m64, _imm8 },
4156         { ASM_END }
4157 ];
4158 
4159 PTRNTAB3[2] aptb3ROUNDSS = /* ROUNDSS */ [
4160         { ROUNDSS, _r, _xmm, _xmm_m32, _imm8 },
4161         { ASM_END }
4162 ];
4163 
4164 PTRNTAB4[2] aptb4VROUNDSS = /* VROUNDSS */ [
4165         { VEX_NDS_128_WIG(ROUNDSS), _r, _xmm, _xmm, _xmm_m32, _imm8 },
4166         { ASM_END }
4167 ];
4168 
4169 /* ======================= SSE4.2 ======================= */
4170 
4171 /*
4172 crc32
4173 pcmpestri
4174 pcmpestrm
4175 pcmpistri
4176 pcmpistrm
4177 pcmpgtq
4178 popcnt
4179  */
4180 
4181 PTRNTAB2[6] aptb2CRC32 = /* CRC32 */ [
4182         { 0xF20F38F0, _r        , _r32, _rm8  },
4183         { 0xF20F38F0, _r|_64_bit, _r64, _rm8  },
4184         { 0xF20F38F1, _r|_16_bit, _r32, _rm16 },
4185         { 0xF20F38F1, _r|_32_bit, _r32, _rm32 },
4186         { 0xF20F38F1, _r|_64_bit, _r64, _rm64 },
4187         { ASM_END }
4188 ];
4189 
4190 PTRNTAB3[2] aptb3PCMPESTRI  = /* PCMPESTRI */ [
4191         { PCMPESTRI, _r|_modcx  , _xmm, _xmm_m128, _imm8 },
4192         { ASM_END }
4193 ];
4194 
4195 PTRNTAB3[2] aptb3VPCMPESTRI = /* VPCMPESTRI */ [
4196         { VEX_128_WIG(PCMPESTRI), _r|_modcx, _xmm, _xmm_m128, _imm8 },
4197         { ASM_END }
4198 ];
4199 
4200 PTRNTAB3[2] aptb3PCMPESTRM = /* PCMPESTRM */ [
4201         { PCMPESTRM, _r|_modxmm0, _xmm, _xmm_m128, _imm8 },
4202         { ASM_END }
4203 ];
4204 
4205 PTRNTAB3[2] aptb3VPCMPESTRM = /* VPCMPESTRM */ [
4206         { VEX_128_WIG(PCMPESTRM), _r|_modxmm0, _xmm, _xmm_m128, _imm8 },
4207         { ASM_END }
4208 ];
4209 
4210 PTRNTAB3[2] aptb3PCMPISTRI  = /* PCMPISTRI */ [
4211         { PCMPISTRI, _r|_modcx  , _xmm, _xmm_m128, _imm8 },
4212         { ASM_END }
4213 ];
4214 
4215 PTRNTAB3[2] aptb3VPCMPISTRI = /* VPCMPISTRI */ [
4216         { VEX_128_WIG(PCMPISTRI), _r|_modcx, _xmm, _xmm_m128, _imm8 },
4217         { ASM_END }
4218 ];
4219 
4220 PTRNTAB3[2] aptb3PCMPISTRM  = /* PCMPISTRM */ [
4221         { PCMPISTRM, _r|_modxmm0, _xmm, _xmm_m128, _imm8 },
4222         { ASM_END }
4223 ];
4224 
4225 PTRNTAB3[2] aptb3VPCMPISTRM = /* VPCMPISTRM */ [
4226         { VEX_128_WIG(PCMPISTRM), _r, _xmm, _xmm_m128, _imm8 },
4227         { ASM_END }
4228 ];
4229 
4230 PTRNTAB2[2] aptb2PCMPGTQ  = /* PCMPGTQ */ [
4231         { PCMPGTQ, _r, _xmm, _xmm_m128 },
4232         { ASM_END }
4233 ];
4234 
4235 PTRNTAB3[2] aptb3VPCMPGTQ = /* VPCMPGTQ */ [
4236         { VEX_NDS_128_WIG(PCMPGTQ), _r, _xmm, _xmm, _xmm_m128 },
4237         { ASM_END }
4238 ];
4239 
4240 PTRNTAB2[4] aptb2POPCNT  = /* POPCNT */ [
4241         { POPCNT, _r|_16_bit, _r16, _rm16 },
4242         { POPCNT, _r|_32_bit, _r32, _rm32 },
4243         { POPCNT, _r|_64_bit, _r64, _rm64 },
4244         { ASM_END }
4245 ];
4246 
4247 /* ======================= VMS ======================= */
4248 
4249 /*
4250 invept
4251 invvpid
4252 vmcall
4253 vmclear
4254 vmlaunch
4255 vmresume
4256 vmptrld
4257 vmptrst
4258 vmread
4259 vmwrite
4260 vmxoff
4261 vmxon
4262  */
4263 
4264 /* ======================= SMX ======================= */
4265 
4266 /*
4267 getsec
4268  */
4269 
4270 /* ======================= CLMUL ======================= */
4271 
4272 PTRNTAB3[2] aptb3PCLMULQDQ = /* PCLMULQDQ */ [
4273         { 0x660F3A44, _r, _xmm, _xmm_m128, _imm8 },
4274         { ASM_END }
4275 ];
4276 
4277 PTRNTAB4[2] aptb4VPCLMULQDQ = /* VPCLMULQDQ */ [
4278         { VEX_NDS_128_WIG(0x660F3A44), _r, _xmm, _xmm, _xmm_m128, _imm8 },
4279         { ASM_END }
4280 ];
4281 
4282 /* ======================= AVX ======================= */
4283 
4284 PTRNTAB2[2] aptb2VBROADCASTF128 = /* VBROADCASTF128 */ [
4285         { VEX_256_WIG(0x660F381A), _r, _ymm, _m128 },
4286         { ASM_END }
4287 ];
4288 
4289 PTRNTAB2[2] aptb2VBROADCASTSD = /* VBROADCASTSD */ [
4290         { VEX_256_WIG(0x660F3819), _r, _ymm, _m64 },
4291         { ASM_END }
4292 ];
4293 
4294 PTRNTAB2[3] aptb2VBROADCASTSS = /* VBROADCASTSS */ [
4295         { VEX_128_WIG(0x660F3818), _r, _xmm, _m32 },
4296         { VEX_256_WIG(0x660F3818), _r, _ymm, _m32 },
4297         { ASM_END }
4298 ];
4299 
4300 PTRNTAB3[2] aptb3VEXTRACTF128 = /* VEXTRACTF128 */ [
4301         { VEX_256_WIG(0x660F3A19), _r, _xmm_m128, _ymm, _imm8 },
4302         { ASM_END }
4303 ];
4304 
4305 PTRNTAB4[2] aptb4VINSERTF128 = /* VINSERTF128 */ [
4306         { VEX_NDS_256_WIG(0x660F3A18), _r, _ymm, _ymm, _xmm_m128, _imm8 },
4307         { ASM_END }
4308 ];
4309 
4310 PTRNTAB3[5] aptb3VMASKMOVPS = /* VMASKMOVPS */ [
4311         { VEX_NDS_128_WIG(0x660F382C), _r, _xmm, _xmm, _m128 },
4312         { VEX_NDS_256_WIG(0x660F382C), _r, _ymm, _ymm, _m256 },
4313         { VEX_NDS_128_WIG(0x660F382E), _r, _m128, _xmm, _xmm },
4314         { VEX_NDS_256_WIG(0x660F382E), _r, _m256, _ymm, _ymm },
4315         { ASM_END }
4316 ];
4317 
4318 PTRNTAB3[5] aptb3VMASKMOVPD = /* VMASKMOVPD */ [
4319         { VEX_NDS_128_WIG(0x660F382D), _r, _xmm, _xmm, _m128 },
4320         { VEX_NDS_256_WIG(0x660F382D), _r, _ymm, _ymm, _m256 },
4321         { VEX_NDS_128_WIG(0x660F382F), _r, _m128, _xmm, _xmm },
4322         { VEX_NDS_256_WIG(0x660F382F), _r, _m256, _ymm, _ymm },
4323         { ASM_END }
4324 ];
4325 
4326 PTRNTAB0[2] aptb0VZEROALL = /* VZEROALL */ [
4327         { VEX_256_WIG(0x0F77), _modall }, // FIXME: need _modxmm
4328         { ASM_END },
4329 ];
4330 
4331 PTRNTAB0[2] aptb0VZEROUPPER = /* VZEROUPPER */ [
4332         { VEX_128_WIG(0x0F77), _modall }, // FIXME: need _modxmm
4333         { ASM_END },
4334 ];
4335 
4336 PTRNTAB0[2]  aptb0XGETBV = /* XGETBV */ [
4337         { XGETBV, _modaxdx },
4338         { ASM_END },
4339 ];
4340 
4341 PTRNTAB1[2]  aptb1XRSTOR = /* XRSTOR */ [
4342         { 0x0FAE, _5, _m512 },
4343         { ASM_END }
4344 ];
4345 
4346 PTRNTAB1[2]  aptb1XRSTOR64 = /* XRSTOR64 */ [
4347         { 0x0FAE, _5|_64_bit, _m512 }, // TODO: REX_W override is implicit
4348         { ASM_END }
4349 ];
4350 
4351 PTRNTAB1[2]  aptb1XSAVE = /* XSAVE */ [
4352         { 0x0FAE, _4, _m512 },
4353         { ASM_END }
4354 ];
4355 
4356 PTRNTAB1[2]  aptb1XSAVE64 = /* XSAVE64 */ [
4357         { 0x0FAE, _4|_64_bit, _m512 }, // TODO: REX_W override is implicit
4358         { ASM_END }
4359 ];
4360 
4361 PTRNTAB1[2]  aptb1XSAVEC = /* XSAVEC */ [
4362         { 0x0FC7, _4, _m512 },
4363         { ASM_END }
4364 ];
4365 
4366 PTRNTAB1[2]  aptb1XSAVEC64 = /* XSAVEC64 */ [
4367         { 0x0FC7, _4|_64_bit, _m512 }, // TODO: REX_W override is implicit
4368         { ASM_END }
4369 ];
4370 
4371 PTRNTAB1[2]  aptb1XSAVEOPT = /* XSAVEOPT */ [
4372         { 0x0FAE, _6, _m512 },
4373         { ASM_END }
4374 ];
4375 
4376 PTRNTAB1[2]  aptb1XSAVEOPT64 = /* XSAVEOPT64 */ [
4377         { 0x0FAE, _6|_64_bit, _m512 }, // TODO: REX_W override is implicit
4378         { ASM_END }
4379 ];
4380 
4381 PTRNTAB0[2]  aptb0XSETBV = /* XSETBV */ [
4382         { XSETBV, 0 },
4383         { ASM_END },
4384 ];
4385 
4386 PTRNTAB3[5]  aptb3VPERMILPD = /* VPERMILPD */ [
4387         { VEX_NDS_128_WIG(0x660F380D), _r, _xmm, _xmm, _xmm_m128 },
4388         { VEX_NDS_256_WIG(0x660F380D), _r, _ymm, _ymm, _ymm_m256 },
4389         { VEX_128_WIG(0x660F3A05), _r, _xmm, _xmm_m128, _imm8 },
4390         { VEX_256_WIG(0x660F3A05), _r, _ymm, _ymm_m256, _imm8 },
4391         { ASM_END },
4392 ];
4393 
4394 PTRNTAB3[5]  aptb3VPERMILPS = /* VPERMILPS */ [
4395         { VEX_NDS_128_WIG(0x660F380C), _r, _xmm, _xmm, _xmm_m128 },
4396         { VEX_NDS_256_WIG(0x660F380C), _r, _ymm, _ymm, _ymm_m256 },
4397         { VEX_128_WIG(0x660F3A04), _r, _xmm, _xmm_m128, _imm8 },
4398         { VEX_256_WIG(0x660F3A04), _r, _ymm, _ymm_m256, _imm8 },
4399         { ASM_END },
4400 ];
4401 
4402 PTRNTAB4[2]  aptb3VPERM2F128 = /* VPERM2F128 */ [
4403         { VEX_NDS_256_WIG(0x660F3A06), _r, _ymm, _ymm, _ymm_m256, _imm8 },
4404         { ASM_END },
4405 ];
4406 
4407 /* ======================= AES ======================= */
4408 
4409 PTRNTAB2[2] aptb2AESENC = /* AESENC */ [
4410         { AESENC, _r, _xmm, _xmm_m128 },
4411         { ASM_END },
4412 ];
4413 
4414 PTRNTAB3[2] aptb3VAESENC = /* VAESENC */ [
4415         { VEX_NDS_128_WIG(AESENC), _r, _xmm, _xmm, _xmm_m128 },
4416         { ASM_END },
4417 ];
4418 
4419 PTRNTAB2[2] aptb2AESENCLAST = /* AESENCLAST */ [
4420         { AESENCLAST, _r, _xmm, _xmm_m128 },
4421         { ASM_END },
4422 ];
4423 
4424 PTRNTAB3[2] aptb3VAESENCLAST = /* VAESENCLAST */ [
4425         { VEX_NDS_128_WIG(AESENCLAST), _r, _xmm, _xmm, _xmm_m128 },
4426         { ASM_END },
4427 ];
4428 
4429 PTRNTAB2[2] aptb2AESDEC = /* AESDEC */ [
4430         { AESDEC, _r, _xmm, _xmm_m128 },
4431         { ASM_END },
4432 ];
4433 
4434 PTRNTAB3[2] aptb3VAESDEC = /* VAESDEC */ [
4435         { VEX_NDS_128_WIG(AESDEC), _r, _xmm, _xmm, _xmm_m128 },
4436         { ASM_END },
4437 ];
4438 
4439 PTRNTAB2[2] aptb2AESDECLAST = /* AESDECLAST */ [
4440         { AESDECLAST, _r, _xmm, _xmm_m128 },
4441         { ASM_END },
4442 ];
4443 
4444 PTRNTAB3[2] aptb3VAESDECLAST = /* VAESDECLAST */ [
4445         { VEX_NDS_128_WIG(AESDECLAST), _r, _xmm, _xmm, _xmm_m128 },
4446         { ASM_END },
4447 ];
4448 
4449 PTRNTAB2[2] aptb2AESIMC = /* AESIMC */ [
4450         { AESIMC, _r, _xmm, _xmm_m128 },
4451         { ASM_END },
4452 ];
4453 
4454 PTRNTAB2[2] aptb2VAESIMC = /* VAESIMC */ [
4455         { VEX_128_WIG(AESIMC), _r, _xmm, _xmm_m128 },
4456         { ASM_END },
4457 ];
4458 
4459 PTRNTAB3[2] aptb3AESKEYGENASSIST = /* AESKEYGENASSIST */ [
4460         { AESKEYGENASSIST, _r, _xmm, _xmm_m128, _imm8 },
4461         { ASM_END },
4462 ];
4463 
4464 PTRNTAB3[2] aptb3VAESKEYGENASSIST = /* VAESKEYGENASSIST */ [
4465         { VEX_128_WIG(AESKEYGENASSIST), _r, _xmm, _xmm_m128, _imm8 },
4466         { ASM_END },
4467 ];
4468 
4469 /* ======================= FSGSBASE ======================= */
4470 
4471 PTRNTAB1[3] aptb1RDFSBASE = /* RDFSBASE */ [
4472         { 0xF30FAE, _0, _r32 },
4473         { 0xF30FAE, _0|_64_bit, _r64 },
4474         { ASM_END },
4475 ];
4476 
4477 PTRNTAB1[3] aptb1RDGSBASE = /* RDGSBASE */ [
4478         { 0xF30FAE, _1, _r32 },
4479         { 0xF30FAE, _1|_64_bit, _r64 },
4480         { ASM_END },
4481 ];
4482 
4483 PTRNTAB1[3] aptb1WRFSBASE = /* WRFSBASE */ [
4484         { 0xF30FAE, _2, _r32 },
4485         { 0xF30FAE, _2|_64_bit, _r64 },
4486         { ASM_END },
4487 ];
4488 
4489 PTRNTAB1[3] aptb1WRGSBASE = /* WRGSBASE */ [
4490         { 0xF30FAE, _3, _r32 },
4491         { 0xF30FAE, _3|_64_bit, _r64 },
4492         { ASM_END },
4493 ];
4494 
4495 /* ======================= RDRAND ======================= */
4496 
4497 PTRNTAB1[4] aptb1RDRAND = /* RDRAND */ [
4498         { 0x0FC7, _6|_16_bit, _r16 },
4499         { 0x0FC7, _6|_32_bit, _r32 },
4500         { 0x0FC7, _6|_64_bit, _r64 },
4501         { ASM_END },
4502 ];
4503 
4504 /* ======================= RDSEED ======================= */
4505 
4506 PTRNTAB1[4] aptb1RDSEED = /* RDSEED */ [
4507         { 0x0FC7, _7|_16_bit, _r16 },
4508         { 0x0FC7, _7|_32_bit, _r32 },
4509         { 0x0FC7, _7|_64_bit, _r64 },
4510         { ASM_END },
4511 ];
4512 
4513 /* ======================= FP16C ======================= */
4514 
4515 PTRNTAB2[3] aptb2VCVTPH2PS = /* VCVTPH2PS */ [
4516         { VEX_128_WIG(0x660F3813), _r, _xmm, _xmm_m64 },
4517         { VEX_256_WIG(0x660F3813), _r, _ymm, _xmm_m128 },
4518         { ASM_END },
4519 ];
4520 
4521 PTRNTAB3[3] aptb3VCVTPS2PH = /* VCVTPS2PH */ [
4522         { VEX_128_WIG(0x660F3A13), _r, _xmm_m64, _xmm, _imm8  },
4523         { VEX_256_WIG(0x660F3A13), _r, _xmm_m128, _ymm, _imm8  },
4524         { ASM_END },
4525 ];
4526 
4527 /* ======================= FMA ======================= */
4528 
4529 PTRNTAB3[3] aptb3VFMADD132PD = /* VFMADD132PD */ [
4530         { VEX_DDS_128_W1(0x660F3898), _r, _xmm, _xmm, _xmm_m128  },
4531         { VEX_DDS_256_W1(0x660F3898), _r, _ymm, _ymm, _ymm_m256  },
4532         { ASM_END },
4533 ];
4534 
4535 PTRNTAB3[3] aptb3VFMADD213PD = /* VFMADD213PD */ [
4536         { VEX_DDS_128_W1(0x660F38A8), _r, _xmm, _xmm, _xmm_m128  },
4537         { VEX_DDS_256_W1(0x660F38A8), _r, _ymm, _ymm, _ymm_m256  },
4538         { ASM_END },
4539 ];
4540 
4541 PTRNTAB3[3] aptb3VFMADD231PD = /* VFMADD231PD */ [
4542         { VEX_DDS_128_W1(0x660F38B8), _r, _xmm, _xmm, _xmm_m128  },
4543         { VEX_DDS_256_W1(0x660F38B8), _r, _ymm, _ymm, _ymm_m256  },
4544         { ASM_END },
4545 ];
4546 
4547 PTRNTAB3[3] aptb3VFMADD132PS = /* VFMADD132PS */ [
4548         { VEX_DDS_128_WIG(0x660F3898), _r, _xmm, _xmm, _xmm_m128  },
4549         { VEX_DDS_256_WIG(0x660F3898), _r, _ymm, _ymm, _ymm_m256  },
4550         { ASM_END },
4551 ];
4552 
4553 PTRNTAB3[3] aptb3VFMADD213PS = /* VFMADD213PS */ [
4554         { VEX_DDS_128_WIG(0x660F38A8), _r, _xmm, _xmm, _xmm_m128  },
4555         { VEX_DDS_256_WIG(0x660F38A8), _r, _ymm, _ymm, _ymm_m256  },
4556         { ASM_END },
4557 ];
4558 
4559 PTRNTAB3[3] aptb3VFMADD231PS = /* VFMADD231PS */ [
4560         { VEX_DDS_128_WIG(0x660F38B8), _r, _xmm, _xmm, _xmm_m128  },
4561         { VEX_DDS_256_WIG(0x660F38B8), _r, _ymm, _ymm, _ymm_m256  },
4562         { ASM_END },
4563 ];
4564 
4565 PTRNTAB3[2] aptb3VFMADD132SD = /* VFMADD132SD */ [
4566         { VEX_DDS_128_W1(0x660F3899), _r, _xmm, _xmm, _xmm_m128  },
4567         { ASM_END },
4568 ];
4569 
4570 PTRNTAB3[2] aptb3VFMADD213SD = /* VFMADD213SD */ [
4571         { VEX_DDS_128_W1(0x660F38A9), _r, _xmm, _xmm, _xmm_m128  },
4572         { ASM_END },
4573 ];
4574 
4575 PTRNTAB3[2] aptb3VFMADD231SD = /* VFMADD231SD */ [
4576         { VEX_DDS_128_W1(0x660F38B9), _r, _xmm, _xmm, _xmm_m128  },
4577         { ASM_END },
4578 ];
4579 
4580 PTRNTAB3[2] aptb3VFMADD132SS = /* VFMADD132SS */ [
4581         { VEX_DDS_128_WIG(0x660F3899), _r, _xmm, _xmm, _xmm_m128  },
4582         { ASM_END },
4583 ];
4584 
4585 PTRNTAB3[2] aptb3VFMADD213SS = /* VFMADD213SS */ [
4586         { VEX_DDS_128_WIG(0x660F38A9), _r, _xmm, _xmm, _xmm_m128  },
4587         { ASM_END },
4588 ];
4589 
4590 PTRNTAB3[2] aptb3VFMADD231SS = /* VFMADD231SS */ [
4591         { VEX_DDS_128_WIG(0x660F38B9), _r, _xmm, _xmm, _xmm_m128  },
4592         { ASM_END },
4593 ];
4594 
4595 PTRNTAB3[3] aptb3VFMADDSUB132PD = /* VFMADDSUB132PD */ [
4596         { VEX_DDS_128_W1(0x660F3896), _r, _xmm, _xmm, _xmm_m128  },
4597         { VEX_DDS_256_W1(0x660F3896), _r, _ymm, _ymm, _ymm_m256  },
4598         { ASM_END },
4599 ];
4600 
4601 PTRNTAB3[3] aptb3VFMADDSUB213PD = /* VFMADDSUB213PD */ [
4602         { VEX_DDS_128_W1(0x660F38A6), _r, _xmm, _xmm, _xmm_m128  },
4603         { VEX_DDS_256_W1(0x660F38A6), _r, _ymm, _ymm, _ymm_m256  },
4604         { ASM_END },
4605 ];
4606 
4607 PTRNTAB3[3] aptb3VFMADDSUB231PD = /* VFMADDSUB231PD */ [
4608         { VEX_DDS_128_W1(0x660F38B6), _r, _xmm, _xmm, _xmm_m128  },
4609         { VEX_DDS_256_W1(0x660F38B6), _r, _ymm, _ymm, _ymm_m256  },
4610         { ASM_END },
4611 ];
4612 
4613 PTRNTAB3[3] aptb3VFMADDSUB132PS = /* VFMADDSUB132PS */ [
4614         { VEX_DDS_128_WIG(0x660F3896), _r, _xmm, _xmm, _xmm_m128  },
4615         { VEX_DDS_256_WIG(0x660F3896), _r, _ymm, _ymm, _ymm_m256  },
4616         { ASM_END },
4617 ];
4618 
4619 PTRNTAB3[3] aptb3VFMADDSUB213PS = /* VFMADDSUB213PS */ [
4620         { VEX_DDS_128_WIG(0x660F38A6), _r, _xmm, _xmm, _xmm_m128  },
4621         { VEX_DDS_256_WIG(0x660F38A6), _r, _ymm, _ymm, _ymm_m256  },
4622         { ASM_END },
4623 ];
4624 
4625 PTRNTAB3[3] aptb3VFMADDSUB231PS = /* VFMADDSUB231PS */ [
4626         { VEX_DDS_128_WIG(0x660F38B6), _r, _xmm, _xmm, _xmm_m128  },
4627         { VEX_DDS_256_WIG(0x660F38B6), _r, _ymm, _ymm, _ymm_m256  },
4628         { ASM_END },
4629 ];
4630 
4631 PTRNTAB3[3] aptb3VFMSUBADD132PD = /* VFMSUBADD132PD */ [
4632         { VEX_DDS_128_W1(0x660F3897), _r, _xmm, _xmm, _xmm_m128  },
4633         { VEX_DDS_256_W1(0x660F3897), _r, _ymm, _ymm, _ymm_m256  },
4634         { ASM_END },
4635 ];
4636 
4637 PTRNTAB3[3] aptb3VFMSUBADD213PD = /* VFMSUBADD213PD */ [
4638         { VEX_DDS_128_W1(0x660F38A7), _r, _xmm, _xmm, _xmm_m128  },
4639         { VEX_DDS_256_W1(0x660F38A7), _r, _ymm, _ymm, _ymm_m256  },
4640         { ASM_END },
4641 ];
4642 
4643 PTRNTAB3[3] aptb3VFMSUBADD231PD = /* VFMSUBADD231PD */ [
4644         { VEX_DDS_128_W1(0x660F38B7), _r, _xmm, _xmm, _xmm_m128  },
4645         { VEX_DDS_256_W1(0x660F38B7), _r, _ymm, _ymm, _ymm_m256  },
4646         { ASM_END },
4647 ];
4648 
4649 PTRNTAB3[3] aptb3VFMSUBADD132PS = /* VFMSUBADD132PS */ [
4650         { VEX_DDS_128_WIG(0x660F3897), _r, _xmm, _xmm, _xmm_m128  },
4651         { VEX_DDS_256_WIG(0x660F3897), _r, _ymm, _ymm, _ymm_m256  },
4652         { ASM_END },
4653 ];
4654 
4655 PTRNTAB3[3] aptb3VFMSUBADD213PS = /* VFMSUBADD213PS */ [
4656         { VEX_DDS_128_WIG(0x660F38A7), _r, _xmm, _xmm, _xmm_m128  },
4657         { VEX_DDS_256_WIG(0x660F38A7), _r, _ymm, _ymm, _ymm_m256  },
4658         { ASM_END },
4659 ];
4660 
4661 PTRNTAB3[3] aptb3VFMSUBADD231PS = /* VFMSUBADD231PS */ [
4662         { VEX_DDS_128_WIG(0x660F38B7), _r, _xmm, _xmm, _xmm_m128  },
4663         { VEX_DDS_256_WIG(0x660F38B7), _r, _ymm, _ymm, _ymm_m256  },
4664         { ASM_END },
4665 ];
4666 
4667 PTRNTAB3[3] aptb3VFMSUB132PD = /* VFMSUB132PD */ [
4668         { VEX_DDS_128_W1(0x660F389A), _r, _xmm, _xmm, _xmm_m128  },
4669         { VEX_DDS_256_W1(0x660F389A), _r, _ymm, _ymm, _ymm_m256  },
4670         { ASM_END },
4671 ];
4672 
4673 PTRNTAB3[3] aptb3VFMSUB213PD = /* VFMSUB213PD */ [
4674         { VEX_DDS_128_W1(0x660F38AA), _r, _xmm, _xmm, _xmm_m128  },
4675         { VEX_DDS_256_W1(0x660F38AA), _r, _ymm, _ymm, _ymm_m256  },
4676         { ASM_END },
4677 ];
4678 
4679 PTRNTAB3[3] aptb3VFMSUB231PD = /* VFMSUB231PD */ [
4680         { VEX_DDS_128_W1(0x660F38BA), _r, _xmm, _xmm, _xmm_m128  },
4681         { VEX_DDS_256_W1(0x660F38BA), _r, _ymm, _ymm, _ymm_m256  },
4682         { ASM_END },
4683 ];
4684 
4685 PTRNTAB3[3] aptb3VFMSUB132PS = /* VFMSUB132PS */ [
4686         { VEX_DDS_128_WIG(0x660F389A), _r, _xmm, _xmm, _xmm_m128  },
4687         { VEX_DDS_256_WIG(0x660F389A), _r, _ymm, _ymm, _ymm_m256  },
4688         { ASM_END },
4689 ];
4690 
4691 PTRNTAB3[3] aptb3VFMSUB213PS = /* VFMSUB213PS */ [
4692         { VEX_DDS_128_WIG(0x660F38AA), _r, _xmm, _xmm, _xmm_m128  },
4693         { VEX_DDS_256_WIG(0x660F38AA), _r, _ymm, _ymm, _ymm_m256  },
4694         { ASM_END },
4695 ];
4696 
4697 PTRNTAB3[3] aptb3VFMSUB231PS = /* VFMSUB231PS */ [
4698         { VEX_DDS_128_WIG(0x660F38BA), _r, _xmm, _xmm, _xmm_m128  },
4699         { VEX_DDS_256_WIG(0x660F38BA), _r, _ymm, _ymm, _ymm_m256  },
4700         { ASM_END },
4701 ];
4702 
4703 PTRNTAB3[2] aptb3VFMSUB132SD = /* VFMSUB132SD */ [
4704         { VEX_DDS_128_W1(0x660F389B), _r, _xmm, _xmm, _xmm_m128  },
4705         { ASM_END },
4706 ];
4707 
4708 PTRNTAB3[2] aptb3VFMSUB213SD = /* VFMSUB213SD */ [
4709         { VEX_DDS_128_W1(0x660F38AB), _r, _xmm, _xmm, _xmm_m128  },
4710         { ASM_END },
4711 ];
4712 
4713 PTRNTAB3[2] aptb3VFMSUB231SD = /* VFMSUB231SD */ [
4714         { VEX_DDS_128_W1(0x660F38BB), _r, _xmm, _xmm, _xmm_m128  },
4715         { ASM_END },
4716 ];
4717 
4718 PTRNTAB3[2] aptb3VFMSUB132SS = /* VFMSUB132SS */ [
4719         { VEX_DDS_128_WIG(0x660F389B), _r, _xmm, _xmm, _xmm_m128  },
4720         { ASM_END },
4721 ];
4722 
4723 PTRNTAB3[2] aptb3VFMSUB213SS = /* VFMSUB213SS */ [
4724         { VEX_DDS_128_WIG(0x660F38AB), _r, _xmm, _xmm, _xmm_m128  },
4725         { ASM_END },
4726 ];
4727 
4728 PTRNTAB3[2] aptb3VFMSUB231SS = /* VFMSUB231SS */ [
4729         { VEX_DDS_128_WIG(0x660F38BB), _r, _xmm, _xmm, _xmm_m128  },
4730         { ASM_END },
4731 ];
4732 
4733 /* ======================= SHA ======================= */
4734 
4735 PTRNTAB3[2] aptb3SHA1RNDS4 = /* SHA1RNDS4 */ [
4736         { 0x0F3ACC, _ib, _xmm, _xmm_m128, _imm8 },
4737         { ASM_END },
4738 ];
4739 
4740 PTRNTAB2[2] aptb2SHA1NEXTE = /* SHA1NEXTE */ [
4741         { 0x0F38C8, _r, _xmm, _xmm_m128 },
4742         { ASM_END }
4743 ];
4744 
4745 PTRNTAB2[2] aptb2SHA1MSG1 = /* SHA1MSG1 */ [
4746         { 0x0F38C9, _r, _xmm, _xmm_m128 },
4747         { ASM_END }
4748 ];
4749 
4750 PTRNTAB2[2] aptb2SHA1MSG2 = /* SHA1MSG2 */ [
4751         { 0x0F38CA, _r, _xmm, _xmm_m128 },
4752         { ASM_END }
4753 ];
4754 
4755 PTRNTAB2[2] aptb2SHA256RNDS2 = /* SHA256RNDS2 */ [
4756         { 0x0F38CB, _r, _xmm, _xmm_m128 },
4757         { ASM_END }
4758 ];
4759 
4760 PTRNTAB2[2] aptb2SHA256MSG1 = /* SHA256MSG1 */ [
4761         { 0x0F38CC, _r, _xmm, _xmm_m128 },
4762         { ASM_END }
4763 ];
4764 
4765 PTRNTAB2[2] aptb2SHA256MSG2 = /* SHA256MSG2 */ [
4766         { 0x0F38CD, _r, _xmm, _xmm_m128 },
4767         { ASM_END }
4768 ];
4769 
4770 }
4771 
4772 //////////////////////////////////////////////////////////////////////
4773 
4774 
4775 //
4776 // usNumops should be 0, 1, 2, or 3 other things are added into it
4777 // for flag indications
4778 // 10, 11, 12, and 13 indicate that it is a special prefix
4779 
4780 // 20, 21, 22, and 23 indicate that this statement is a control transfer
4781 //                      and that a new block should be created when this statement is
4782 //                      finished. (All Jxx and LOOPxx instructions.)
4783 
4784 // 30, 31, 32, 33 are reserved for instructions where the value of an
4785 // immediate operand controls the code generation.
4786 // 40, 41, 42, 43 are reserved for instructions where all of the operands
4787 // are not required
4788 // 50, 51, 52, 53 are reserved for the rotate and shift instructions that
4789 // have extremely strange encodings for the second operand which is sometimes
4790 // used to select an opcode and then discarded.  The second operand is 0
4791 // if it is immediate 1, _cl for the CL register and _imm8 for the immediate
4792 // 8 operand.  If the operand is an immediate 1 or the cl register, it should
4793 // be discarded and the opcode should be encoded as a 1 operand instruction.
4794 //
4795 //      60, 61, 62, 63  are reserved for floating point coprocessor operations
4796 //
4797 // ITdata is for the DB (_EMIT), DD, DW, DQ, DT pseudo-ops
4798 
4799 //      BT is a 486 instruction.
4800 //      The encoding is 0f C0+reg and it is always a 32
4801 //      bit operation
4802 
4803 immutable OP[] optab =
4804 [
4805         { "__emit",     ITdata | OPdb,  { null } },
4806         { "_emit",      ITdata | OPdb,  { null } },
4807         { "aaa",        0,              { aptb0AAA.ptr } },
4808         { "aad",        0,              { aptb0AAD.ptr } },
4809         { "aam",        0,              { aptb0AAM.ptr } },
4810         { "aas",        0,              { aptb0AAS.ptr } },
4811         { "adc",        2,              { aptb2ADC.ptr } },
4812         { "add",        2,              { aptb2ADD.ptr } },
4813         { "addpd",      2,              { aptb2ADDPD.ptr } },
4814         { "addps",      2,              { aptb2ADDPS.ptr } },
4815         { "addsd",      2,              { aptb2ADDSD.ptr } },
4816         { "addss",      2,              { aptb2ADDSS.ptr } },
4817         { "addsubpd",   2,              { aptb2ADDSUBPD.ptr } },
4818         { "addsubps",   2,              { aptb2ADDSUBPS.ptr } },
4819         { "aesdec",     2,              { aptb2AESDEC.ptr } },
4820         { "aesdeclast", 2,              { aptb2AESDECLAST.ptr } },
4821         { "aesenc",     2,              { aptb2AESENC.ptr } },
4822         { "aesenclast", 2,              { aptb2AESENCLAST.ptr } },
4823         { "aesimc",     2,              { aptb2AESIMC.ptr } },
4824         { "aeskeygenassist", 3,         { aptb3AESKEYGENASSIST.ptr } },
4825         { "and",        2,              { aptb2AND.ptr } },
4826         { "andnpd",     2,              { aptb2ANDNPD.ptr } },
4827         { "andnps",     2,              { aptb2ANDNPS.ptr } },
4828         { "andpd",      2,              { aptb2ANDPD.ptr } },
4829         { "andps",      2,              { aptb2ANDPS.ptr } },
4830         { "arpl",       2,              { aptb2ARPL.ptr } },
4831         { "blendpd",    3,              { aptb3BLENDPD.ptr } },
4832         { "blendps",    3,              { aptb3BLENDPS.ptr } },
4833         { "blendvpd",   3,              { aptb3BLENDVPD.ptr } },
4834         { "blendvps",   3,              { aptb3BLENDVPS.ptr } },
4835         { "bound",      2,              { aptb2BOUND.ptr } },
4836         { "bsf",        2,              { aptb2BSF.ptr } },
4837         { "bsr",        2,              { aptb2BSR.ptr } },
4838         { "bswap",      1,              { aptb1BSWAP.ptr } },
4839         { "bt",         2,              { aptb2BT.ptr } },
4840         { "btc",        2,              { aptb2BTC.ptr } },
4841         { "btr",        2,              { aptb2BTR.ptr } },
4842         { "bts",        2,              { aptb2BTS.ptr } },
4843         { "call",       ITjump | 1,     { aptb1CALL.ptr } },
4844         { "cbw",        0,              { aptb0CBW.ptr } },
4845         { "cdq",        0,              { aptb0CDQ.ptr } },
4846         { "cdqe",       0,              { aptb0CDQE.ptr } },
4847         { "clc",        0,              { aptb0CLC.ptr } },
4848         { "cld",        0,              { aptb0CLD.ptr } },
4849         { "clflush",    1,              { aptb1CLFLUSH.ptr } },
4850         { "cli",        0,              { aptb0CLI.ptr } },
4851         { "clts",       0,              { aptb0CLTS.ptr } },
4852         { "cmc",        0,              { aptb0CMC.ptr } },
4853         { "cmova",      2,              { aptb2CMOVNBE.ptr } },
4854         { "cmovae",     2,              { aptb2CMOVNB.ptr } },
4855         { "cmovb",      2,              { aptb2CMOVB.ptr } },
4856         { "cmovbe",     2,              { aptb2CMOVBE.ptr } },
4857         { "cmovc",      2,              { aptb2CMOVB.ptr } },
4858         { "cmove",      2,              { aptb2CMOVZ.ptr } },
4859         { "cmovg",      2,              { aptb2CMOVNLE.ptr } },
4860         { "cmovge",     2,              { aptb2CMOVNL.ptr } },
4861         { "cmovl",      2,              { aptb2CMOVL.ptr } },
4862         { "cmovle",     2,              { aptb2CMOVLE.ptr } },
4863         { "cmovna",     2,              { aptb2CMOVBE.ptr } },
4864         { "cmovnae",    2,              { aptb2CMOVB.ptr } },
4865         { "cmovnb",     2,              { aptb2CMOVNB.ptr } },
4866         { "cmovnbe",    2,              { aptb2CMOVNBE.ptr } },
4867         { "cmovnc",     2,              { aptb2CMOVNB.ptr } },
4868         { "cmovne",     2,              { aptb2CMOVNZ.ptr } },
4869         { "cmovng",     2,              { aptb2CMOVLE.ptr } },
4870         { "cmovnge",    2,              { aptb2CMOVL.ptr } },
4871         { "cmovnl",     2,              { aptb2CMOVNL.ptr } },
4872         { "cmovnle",    2,              { aptb2CMOVNLE.ptr } },
4873         { "cmovno",     2,              { aptb2CMOVNO.ptr } },
4874         { "cmovnp",     2,              { aptb2CMOVNP.ptr } },
4875         { "cmovns",     2,              { aptb2CMOVNS.ptr } },
4876         { "cmovnz",     2,              { aptb2CMOVNZ.ptr } },
4877         { "cmovo",      2,              { aptb2CMOVO.ptr } },
4878         { "cmovp",      2,              { aptb2CMOVP.ptr } },
4879         { "cmovpe",     2,              { aptb2CMOVP.ptr } },
4880         { "cmovpo",     2,              { aptb2CMOVNP.ptr } },
4881         { "cmovs",      2,              { aptb2CMOVS.ptr } },
4882         { "cmovz",      2,              { aptb2CMOVZ.ptr } },
4883         { "cmp",        2,              { aptb2CMP.ptr } },
4884         { "cmppd",      3,              { aptb3CMPPD.ptr } },
4885         { "cmpps",      3,              { aptb3CMPPS.ptr } },
4886         { "cmps",       2,              { aptb2CMPS.ptr } },
4887         { "cmpsb",      0,              { aptb0CMPSB.ptr } },
4888         /*{ "cmpsd",    0,              { aptb0CMPSD.ptr } },*/
4889         { "cmpsd",      ITopt|3,        { aptb3CMPSD.ptr } },
4890         { "cmpsq",      0,              { aptb0CMPSQ.ptr } },
4891         { "cmpss",      3,              { aptb3CMPSS.ptr } },
4892         { "cmpsw",      0,              { aptb0CMPSW.ptr } },
4893         { "cmpxchg",    2,              { aptb2CMPXCHG.ptr } },
4894         { "cmpxchg16b", 1,              { aptb1CMPXCH16B.ptr } },
4895         { "cmpxchg8b",  1,              { aptb1CMPXCH8B.ptr } },
4896         { "comisd",     2,              { aptb2COMISD.ptr } },
4897         { "comiss",     2,              { aptb2COMISS.ptr } },
4898         { "cpuid",      0,              { aptb0CPUID.ptr } },
4899         { "cqo",        0,              { aptb0CQO.ptr } },
4900         { "crc32",      2,              { aptb2CRC32.ptr } },
4901         { "cvtdq2pd",   2,              { aptb2CVTDQ2PD.ptr } },
4902         { "cvtdq2ps",   2,              { aptb2CVTDQ2PS.ptr } },
4903         { "cvtpd2dq",   2,              { aptb2CVTPD2DQ.ptr } },
4904         { "cvtpd2pi",   2,              { aptb2CVTPD2PI.ptr } },
4905         { "cvtpd2ps",   2,              { aptb2CVTPD2PS.ptr } },
4906         { "cvtpi2pd",   2,              { aptb2CVTPI2PD.ptr } },
4907         { "cvtpi2ps",   2,              { aptb2CVTPI2PS.ptr } },
4908         { "cvtps2dq",   2,              { aptb2CVTPS2DQ.ptr } },
4909         { "cvtps2pd",   2,              { aptb2CVTPS2PD.ptr } },
4910         { "cvtps2pi",   2,              { aptb2CVTPS2PI.ptr } },
4911         { "cvtsd2si",   2,              { aptb2CVTSD2SI.ptr } },
4912         { "cvtsd2ss",   2,              { aptb2CVTSD2SS.ptr } },
4913         { "cvtsi2sd",   2,              { aptb2CVTSI2SD.ptr } },
4914         { "cvtsi2ss",   2,              { aptb2CVTSI2SS.ptr } },
4915         { "cvtss2sd",   2,              { aptb2CVTSS2SD.ptr } },
4916         { "cvtss2si",   2,              { aptb2CVTSS2SI.ptr } },
4917         { "cvttpd2dq",  2,              { aptb2CVTTPD2DQ.ptr } },
4918         { "cvttpd2pi",  2,              { aptb2CVTTPD2PI.ptr } },
4919         { "cvttps2dq",  2,              { aptb2CVTTPS2DQ.ptr } },
4920         { "cvttps2pi",  2,              { aptb2CVTTPS2PI.ptr } },
4921         { "cvttsd2si",  2,              { aptb2CVTTSD2SI.ptr } },
4922         { "cvttss2si",  2,              { aptb2CVTTSS2SI.ptr } },
4923         { "cwd",        0,              { aptb0CWD.ptr } },
4924         { "cwde",       0,              { aptb0CWDE.ptr } },
4925         { "da",         ITaddr | 4,     { null } },
4926         { "daa",        0,              { aptb0DAA.ptr } },
4927         { "das",        0,              { aptb0DAS.ptr } },
4928         { "db",         ITdata | OPdb,  { null } },
4929         { "dd",         ITdata | OPdd,  { null } },
4930         { "de",         ITdata | OPde,  { null } },
4931         { "dec",        1,              { aptb1DEC.ptr } },
4932         { "df",         ITdata | OPdf,  { null } },
4933         { "di",         ITdata | OPdi,  { null } },
4934         { "div",        ITopt  | 2,     { aptb2DIV.ptr } },
4935         { "divpd",      2,              { aptb2DIVPD.ptr } },
4936         { "divps",      2,              { aptb2DIVPS.ptr } },
4937         { "divsd",      2,              { aptb2DIVSD.ptr } },
4938         { "divss",      2,              { aptb2DIVSS.ptr } },
4939         { "dl",         ITdata | OPdl,  { null } },
4940         { "dppd",       3,              { aptb3DPPD.ptr } },
4941         { "dpps",       3,              { aptb3DPPS.ptr } },
4942         { "dq",         ITdata | OPdq,  { null } },
4943         { "ds",         ITdata | OPds,  { null } },
4944         { "dt",         ITdata | OPdt,  { null } },
4945         { "dw",         ITdata | OPdw,  { null } },
4946         { "emms",       0,              { aptb0EMMS.ptr } },
4947         { "enter",      2,              { aptb2ENTER.ptr } },
4948         { "extractps",  3,              { aptb3EXTRACTPS.ptr } },
4949         { "f2xm1",      ITfloat | 0,    { aptb0F2XM1.ptr } },
4950         { "fabs",       ITfloat | 0,    { aptb0FABS.ptr } },
4951         { "fadd",       ITfloat | 2,    { aptb2FADD.ptr } },
4952         { "faddp",      ITfloat | 2,    { aptb2FADDP.ptr } },
4953         { "fbld",       ITfloat | 1,    { aptb1FBLD.ptr } },
4954         { "fbstp",      ITfloat | 1,    { aptb1FBSTP.ptr } },
4955         { "fchs",       ITfloat | 0,    { aptb0FCHS.ptr } },
4956         { "fclex",      ITfloat | 0,    { aptb0FCLEX.ptr } },
4957         { "fcmovb",     ITfloat | 2,    { aptb2FCMOVB.ptr } },
4958         { "fcmovbe",    ITfloat | 2,    { aptb2FCMOVBE.ptr } },
4959         { "fcmove",     ITfloat | 2,    { aptb2FCMOVE.ptr } },
4960         { "fcmovnb",    ITfloat | 2,    { aptb2FCMOVNB.ptr } },
4961         { "fcmovnbe",   ITfloat | 2,    { aptb2FCMOVNBE.ptr } },
4962         { "fcmovne",    ITfloat | 2,    { aptb2FCMOVNE.ptr } },
4963         { "fcmovnu",    ITfloat | 2,    { aptb2FCMOVNU.ptr } },
4964         { "fcmovu",     ITfloat | 2,    { aptb2FCMOVU.ptr } },
4965         { "fcom",       ITfloat | 1,    { aptb1FCOM.ptr } },
4966         { "fcomi",      ITfloat | 2,    { aptb2FCOMI.ptr } },
4967         { "fcomip",     ITfloat | 2,    { aptb2FCOMIP.ptr } },
4968         { "fcomp",      ITfloat | 1,    { aptb1FCOMP.ptr } },
4969         { "fcompp",     ITfloat | 0,    { aptb0FCOMPP.ptr } },
4970         { "fcos",       ITfloat | 0,    { aptb0FCOS.ptr } },
4971         { "fdecstp",    ITfloat | 0,    { aptb0FDECSTP.ptr } },
4972         { "fdisi",      ITfloat | 0,    { aptb0FDISI.ptr } },
4973         { "fdiv",       ITfloat | 2,    { aptb2FDIV.ptr } },
4974         { "fdivp",      ITfloat | 2,    { aptb2FDIVP.ptr } },
4975         { "fdivr",      ITfloat | 2,    { aptb2FDIVR.ptr } },
4976         { "fdivrp",     ITfloat | 2,    { aptb2FDIVRP.ptr } },
4977         { "feni",       ITfloat | 0,    { aptb0FENI.ptr } },
4978         { "ffree",      ITfloat | 1,    { aptb1FFREE.ptr } },
4979         { "fiadd",      ITfloat | 2,    { aptb2FIADD.ptr } },
4980         { "ficom",      ITfloat | 1,    { aptb1FICOM.ptr } },
4981         { "ficomp",     ITfloat | 1,    { aptb1FICOMP.ptr } },
4982         { "fidiv",      ITfloat | 2,    { aptb2FIDIV.ptr } },
4983         { "fidivr",     ITfloat | 2,    { aptb2FIDIVR.ptr } },
4984         { "fild",       ITfloat | 1,    { aptb1FILD.ptr } },
4985         { "fimul",      ITfloat | 2,    { aptb2FIMUL.ptr } },
4986         { "fincstp",    ITfloat | 0,    { aptb0FINCSTP.ptr } },
4987         { "finit",      ITfloat | 0,    { aptb0FINIT.ptr } },
4988         { "fist",       ITfloat | 1,    { aptb1FIST.ptr } },
4989         { "fistp",      ITfloat | 1,    { aptb1FISTP.ptr } },
4990         { "fisttp",     ITfloat | 1,    { aptb1FISTTP.ptr } },
4991         { "fisub",      ITfloat | 2,    { aptb2FISUB.ptr } },
4992         { "fisubr",     ITfloat | 2,    { aptb2FISUBR.ptr } },
4993         { "fld",        ITfloat | 1,    { aptb1FLD.ptr } },
4994         { "fld1",       ITfloat | 0,    { aptb0FLD1.ptr } },
4995         { "fldcw",      ITfloat | 1,    { aptb1FLDCW.ptr } },
4996         { "fldenv",     ITfloat | 1,    { aptb1FLDENV.ptr } },
4997         { "fldl2e",     ITfloat | 0,    { aptb0FLDL2E.ptr } },
4998         { "fldl2t",     ITfloat | 0,    { aptb0FLDL2T.ptr } },
4999         { "fldlg2",     ITfloat | 0,    { aptb0FLDLG2.ptr } },
5000         { "fldln2",     ITfloat | 0,    { aptb0FLDLN2.ptr } },
5001         { "fldpi",      ITfloat | 0,    { aptb0FLDPI.ptr } },
5002         { "fldz",       ITfloat | 0,    { aptb0FLDZ.ptr } },
5003         { "fmul",       ITfloat | 2,    { aptb2FMUL.ptr } },
5004         { "fmulp",      ITfloat | 2,    { aptb2FMULP.ptr } },
5005         { "fnclex",     ITfloat | 0,    { aptb0FNCLEX.ptr } },
5006         { "fndisi",     ITfloat | 0,    { aptb0FNDISI.ptr } },
5007         { "fneni",      ITfloat | 0,    { aptb0FNENI.ptr } },
5008         { "fninit",     ITfloat | 0,    { aptb0FNINIT.ptr } },
5009         { "fnop",       ITfloat | 0,    { aptb0FNOP.ptr } },
5010         { "fnsave",     ITfloat | 1,    { aptb1FNSAVE.ptr } },
5011         { "fnstcw",     ITfloat | 1,    { aptb1FNSTCW.ptr } },
5012         { "fnstenv",    ITfloat | 1,    { aptb1FNSTENV.ptr } },
5013         { "fnstsw",     1,              { aptb1FNSTSW.ptr } },
5014         { "fpatan",     ITfloat | 0,    { aptb0FPATAN.ptr } },
5015         { "fprem",      ITfloat | 0,    { aptb0FPREM.ptr } },
5016         { "fprem1",     ITfloat | 0,    { aptb0FPREM1.ptr } },
5017         { "fptan",      ITfloat | 0,    { aptb0FPTAN.ptr } },
5018         { "frndint",    ITfloat | 0,    { aptb0FRNDINT.ptr } },
5019         { "frstor",     ITfloat | 1,    { aptb1FRSTOR.ptr } },
5020         { "fsave",      ITfloat | 1,    { aptb1FSAVE.ptr } },
5021         { "fscale",     ITfloat | 0,    { aptb0FSCALE.ptr } },
5022         { "fsetpm",     ITfloat | 0,    { aptb0FSETPM.ptr } },
5023         { "fsin",       ITfloat | 0,    { aptb0FSIN.ptr } },
5024         { "fsincos",    ITfloat | 0,    { aptb0FSINCOS.ptr } },
5025         { "fsqrt",      ITfloat | 0,    { aptb0FSQRT.ptr } },
5026         { "fst",        ITfloat | 1,    { aptb1FST.ptr } },
5027         { "fstcw",      ITfloat | 1,    { aptb1FSTCW.ptr } },
5028         { "fstenv",     ITfloat | 1,    { aptb1FSTENV.ptr } },
5029         { "fstp",       ITfloat | 1,    { aptb1FSTP.ptr } },
5030         { "fstsw",      1,              { aptb1FSTSW.ptr } },
5031         { "fsub",       ITfloat | 2,    { aptb2FSUB.ptr } },
5032         { "fsubp",      ITfloat | 2,    { aptb2FSUBP.ptr } },
5033         { "fsubr",      ITfloat | 2,    { aptb2FSUBR.ptr } },
5034         { "fsubrp",     ITfloat | 2,    { aptb2FSUBRP.ptr } },
5035         { "ftst",       ITfloat | 0,    { aptb0FTST.ptr } },
5036         { "fucom",      ITfloat | 1,    { aptb1FUCOM.ptr } },
5037         { "fucomi",     ITfloat | 2,    { aptb2FUCOMI.ptr } },
5038         { "fucomip",    ITfloat | 2,    { aptb2FUCOMIP.ptr } },
5039         { "fucomp",     ITfloat | 1,    { aptb1FUCOMP.ptr } },
5040         { "fucompp",    ITfloat | 0,    { aptb0FUCOMPP.ptr } },
5041         { "fwait",      ITfloat | 0,    { aptb0FWAIT.ptr } },
5042         { "fxam",       ITfloat | 0,    { aptb0FXAM.ptr } },
5043         { "fxch",       ITfloat | 1,    { aptb1FXCH.ptr } },
5044         { "fxrstor",    ITfloat | 1,    { aptb1FXRSTOR.ptr } },
5045         { "fxsave",     ITfloat | 1,    { aptb1FXSAVE.ptr } },
5046         { "fxtract",    ITfloat | 0,    { aptb0FXTRACT.ptr } },
5047         { "fyl2x",      ITfloat | 0,    { aptb0FYL2X.ptr } },
5048         { "fyl2xp1",    ITfloat | 0,    { aptb0FYL2XP1.ptr } },
5049         { "haddpd",     2,              { aptb2HADDPD.ptr } },
5050         { "haddps",     2,              { aptb2HADDPS.ptr } },
5051         { "hlt",        0,              { aptb0HLT.ptr } },
5052         { "hsubpd",     2,              { aptb2HSUBPD.ptr } },
5053         { "hsubps",     2,              { aptb2HSUBPS.ptr } },
5054         { "idiv",       ITopt | 2,      { aptb2IDIV.ptr } },
5055         { "imul",       ITopt | 3,      { aptb3IMUL.ptr } },
5056         { "in",         2,              { aptb2IN.ptr } },
5057         { "inc",        1,              { aptb1INC.ptr } },
5058         { "ins",        2,              { aptb2INS.ptr } },
5059         { "insb",       0,              { aptb0INSB.ptr } },
5060         { "insd",       0,              { aptb0INSD.ptr } },
5061         { "insertps",   3,              { aptb3INSERTPS.ptr } },
5062         { "insw",       0,              { aptb0INSW.ptr } },
5063         { "int",        ITimmed | 1,    { aptb1INT.ptr } },
5064         { "into",       0,              { aptb0INTO.ptr } },
5065         { "invd",       0,              { aptb0INVD.ptr } },
5066         { "invlpg",     1,              { aptb1INVLPG.ptr } },
5067         { "iret",       0,              { aptb0IRET.ptr } },
5068         { "iretd",      0,              { aptb0IRETD.ptr } },
5069         { "iretq",      0,              { aptb0IRETQ.ptr } },
5070         { "ja",         ITjump | 1,     { aptb1JNBE.ptr } },
5071         { "jae",        ITjump | 1,     { aptb1JNB.ptr } },
5072         { "jb",         ITjump | 1,     { aptb1JB.ptr } },
5073         { "jbe",        ITjump | 1,     { aptb1JBE.ptr } },
5074         { "jc",         ITjump | 1,     { aptb1JB.ptr } },
5075         { "jcxz",       ITjump | 1,     { aptb1JCXZ.ptr } },
5076         { "je",         ITjump | 1,     { aptb1JZ.ptr } },
5077         { "jecxz",      ITjump | 1,     { aptb1JECXZ.ptr } },
5078         { "jg",         ITjump | 1,     { aptb1JNLE.ptr } },
5079         { "jge",        ITjump | 1,     { aptb1JNL.ptr } },
5080         { "jl",         ITjump | 1,     { aptb1JL.ptr } },
5081         { "jle",        ITjump | 1,     { aptb1JLE.ptr } },
5082         { "jmp",        ITjump | 1,     { aptb1JMP.ptr } },
5083         { "jna",        ITjump | 1,     { aptb1JBE.ptr } },
5084         { "jnae",       ITjump | 1,     { aptb1JB.ptr } },
5085         { "jnb",        ITjump | 1,     { aptb1JNB.ptr } },
5086         { "jnbe",       ITjump | 1,     { aptb1JNBE.ptr } },
5087         { "jnc",        ITjump | 1,     { aptb1JNB.ptr } },
5088         { "jne",        ITjump | 1,     { aptb1JNZ.ptr } },
5089         { "jng",        ITjump | 1,     { aptb1JLE.ptr } },
5090         { "jnge",       ITjump | 1,     { aptb1JL.ptr } },
5091         { "jnl",        ITjump | 1,     { aptb1JNL.ptr } },
5092         { "jnle",       ITjump | 1,     { aptb1JNLE.ptr } },
5093         { "jno",        ITjump | 1,     { aptb1JNO.ptr } },
5094         { "jnp",        ITjump | 1,     { aptb1JNP.ptr } },
5095         { "jns",        ITjump | 1,     { aptb1JNS.ptr } },
5096         { "jnz",        ITjump | 1,     { aptb1JNZ.ptr } },
5097         { "jo",         ITjump | 1,     { aptb1JO.ptr } },
5098         { "jp",         ITjump | 1,     { aptb1JP.ptr } },
5099         { "jpe",        ITjump | 1,     { aptb1JP.ptr } },
5100         { "jpo",        ITjump | 1,     { aptb1JNP.ptr } },
5101         { "js",         ITjump | 1,     { aptb1JS.ptr } },
5102         { "jz",         ITjump | 1,     { aptb1JZ.ptr } },
5103         { "lahf",           0,              { aptb0LAHF.ptr } },
5104         { "lar",            2,              { aptb2LAR.ptr } },
5105         { "lddqu",          2,              { aptb2LDDQU.ptr } },
5106         { "ldmxcsr",        1,              { aptb1LDMXCSR.ptr } },
5107         { "lds",            2,              { aptb2LDS.ptr } },
5108         { "lea",            2,              { aptb2LEA.ptr } },
5109         { "leave",          0,              { aptb0LEAVE.ptr } },
5110         { "les",            2,              { aptb2LES.ptr } },
5111         { "lfence",         0,              { aptb0LFENCE.ptr } },
5112         { "lfs",            2,              { aptb2LFS.ptr } },
5113         { "lgdt",           1,              { aptb1LGDT.ptr } },
5114         { "lgs",            2,              { aptb2LGS.ptr } },
5115         { "lidt",           1,              { aptb1LIDT.ptr } },
5116         { "lldt",           1,              { aptb1LLDT.ptr } },
5117         { "lmsw",           1,              { aptb1LMSW.ptr } },
5118         { "lock",           ITprefix | 0,   { aptb0LOCK.ptr } },
5119         { "lods",           1,              { aptb1LODS.ptr } },
5120         { "lodsb",          0,              { aptb0LODSB.ptr } },
5121         { "lodsd",          0,              { aptb0LODSD.ptr } },
5122         { "lodsq",          0,              { aptb0LODSQ.ptr } },
5123         { "lodsw",          0,              { aptb0LODSW.ptr } },
5124         { "loop",           ITjump | 1,     { aptb1LOOP.ptr } },
5125         { "loope",          ITjump | 1,     { aptb1LOOPE.ptr } },
5126         { "loopne",         ITjump | 1,     { aptb1LOOPNE.ptr } },
5127         { "loopnz",         ITjump | 1,     { aptb1LOOPNE.ptr } },
5128         { "loopz",          ITjump | 1,     { aptb1LOOPE.ptr } },
5129         { "lsl",            2,              { aptb2LSL.ptr } },
5130         { "lss",            2,              { aptb2LSS.ptr } },
5131         { "ltr",            1,              { aptb1LTR.ptr } },
5132         { "lzcnt",          2,              { aptb2LZCNT.ptr } },
5133         { "maskmovdqu",     2,              { aptb2MASKMOVDQU.ptr } },
5134         { "maskmovq",       2,              { aptb2MASKMOVQ.ptr } },
5135         { "maxpd",          2,              { aptb2MAXPD.ptr } },
5136         { "maxps",          2,              { aptb2MAXPS.ptr } },
5137         { "maxsd",          2,              { aptb2MAXSD.ptr } },
5138         { "maxss",          2,              { aptb2MAXSS.ptr } },
5139         { "mfence",         0,              { aptb0MFENCE.ptr } },
5140         { "minpd",          2,              { aptb2MINPD.ptr } },
5141         { "minps",          2,              { aptb2MINPS.ptr } },
5142         { "minsd",          2,              { aptb2MINSD.ptr } },
5143         { "minss",          2,              { aptb2MINSS.ptr } },
5144         { "monitor",        0,              { aptb0MONITOR.ptr } },
5145         { "mov",            2,              { aptb2MOV.ptr } },
5146         { "movapd",         2,              { aptb2MOVAPD.ptr } },
5147         { "movaps",         2,              { aptb2MOVAPS.ptr } },
5148         { "movd",           2,              { aptb2MOVD.ptr } },
5149         { "movddup",        2,              { aptb2MOVDDUP.ptr } },
5150         { "movdq2q",        2,              { aptb2MOVDQ2Q.ptr } },
5151         { "movdqa",         2,              { aptb2MOVDQA.ptr } },
5152         { "movdqu",         2,              { aptb2MOVDQU.ptr } },
5153         { "movhlps",        2,              { aptb2MOVHLPS.ptr } },
5154         { "movhpd",         2,              { aptb2MOVHPD.ptr } },
5155         { "movhps",         2,              { aptb2MOVHPS.ptr } },
5156         { "movlhps",        2,              { aptb2MOVLHPS.ptr } },
5157         { "movlpd",         2,              { aptb2MOVLPD.ptr } },
5158         { "movlps",         2,              { aptb2MOVLPS.ptr } },
5159         { "movmskpd",       2,              { aptb2MOVMSKPD.ptr } },
5160         { "movmskps",       2,              { aptb2MOVMSKPS.ptr } },
5161         { "movntdq",        2,              { aptb2MOVNTDQ.ptr } },
5162         { "movntdqa",       2,              { aptb2MOVNTDQA.ptr } },
5163         { "movnti",         2,              { aptb2MOVNTI.ptr } },
5164         { "movntpd",        2,              { aptb2MOVNTPD.ptr } },
5165         { "movntps",        2,              { aptb2MOVNTPS.ptr } },
5166         { "movntq",         2,              { aptb2MOVNTQ.ptr } },
5167         { "movq",           2,              { aptb2MOVQ.ptr } },
5168         { "movq2dq",        2,              { aptb2MOVQ2DQ.ptr } },
5169         { "movs",           2,              { aptb2MOVS.ptr } },
5170         { "movsb",          0,              { aptb0MOVSB.ptr } },
5171         { "movsd",          ITopt | 2,      { aptb2MOVSD.ptr } },
5172         { "movshdup",       2,              { aptb2MOVSHDUP.ptr } },
5173         { "movsldup",       2,              { aptb2MOVSLDUP.ptr } },
5174         { "movsq",          0,              { aptb0MOVSQ.ptr } },
5175         { "movss",          2,              { aptb2MOVSS.ptr } },
5176         { "movsw",          0,              { aptb0MOVSW.ptr } },
5177         { "movsx",          2,              { aptb2MOVSX.ptr } },
5178         { "movsxd",         2,              { aptb2MOVSXD.ptr } },
5179         { "movupd",         2,              { aptb2MOVUPD.ptr } },
5180         { "movups",         2,              { aptb2MOVUPS.ptr } },
5181         { "movzx",          2,              { aptb2MOVZX.ptr } },
5182         { "mpsadbw",        3,              { aptb3MPSADBW.ptr } },
5183         { "mul",            ITopt | 2,      { aptb2MUL.ptr } },
5184         { "mulpd",          2,              { aptb2MULPD.ptr } },
5185         { "mulps",          2,              { aptb2MULPS.ptr } },
5186         { "mulsd",          2,              { aptb2MULSD.ptr } },
5187         { "mulss",          2,              { aptb2MULSS.ptr } },
5188         { "mwait",          0,              { aptb0MWAIT.ptr } },
5189         { "neg",            1,              { aptb1NEG.ptr } },
5190         { "nop",            0,              { aptb0NOP.ptr } },
5191         { "not",            1,              { aptb1NOT.ptr } },
5192         { "or",             2,              { aptb2OR.ptr } },
5193         { "orpd",           2,              { aptb2ORPD.ptr } },
5194         { "orps",           2,              { aptb2ORPS.ptr } },
5195         { "out",            2,              { aptb2OUT.ptr } },
5196         { "outs",           2,              { aptb2OUTS.ptr } },
5197         { "outsb",          0,              { aptb0OUTSB.ptr } },
5198         { "outsd",          0,              { aptb0OUTSD.ptr } },
5199         { "outsw",          0,              { aptb0OUTSW.ptr } },
5200         { "pabsb",          2,              { aptb2PABSB.ptr } },
5201         { "pabsd",          2,              { aptb2PABSD.ptr } },
5202         { "pabsw",          2,              { aptb2PABSW.ptr } },
5203         { "packssdw",       2,              { aptb2PACKSSDW.ptr } },
5204         { "packsswb",       2,              { aptb2PACKSSWB.ptr } },
5205         { "packusdw",       2,              { aptb2PACKUSDW.ptr } },
5206         { "packuswb",       2,              { aptb2PACKUSWB.ptr } },
5207         { "paddb",          2,              { aptb2PADDB.ptr } },
5208         { "paddd",          2,              { aptb2PADDD.ptr } },
5209         { "paddq",          2,              { aptb2PADDQ.ptr } },
5210         { "paddsb",         2,              { aptb2PADDSB.ptr } },
5211         { "paddsw",         2,              { aptb2PADDSW.ptr } },
5212         { "paddusb",        2,              { aptb2PADDUSB.ptr } },
5213         { "paddusw",        2,              { aptb2PADDUSW.ptr } },
5214         { "paddw",          2,              { aptb2PADDW.ptr } },
5215         { "palignr",        3,              { aptb3PALIGNR.ptr } },
5216         { "pand",           2,              { aptb2PAND.ptr } },
5217         { "pandn",          2,              { aptb2PANDN.ptr } },
5218         /* { "pause",       0,              { aptb0PAUSE.ptr } }, */
5219         { "pavgb",          2,              { aptb2PAVGB.ptr } },
5220         { "pavgusb",        2,              { aptb2PAVGUSB.ptr } },
5221         { "pavgw",          2,              { aptb2PAVGW.ptr } },
5222         { "pblendvb",       3,              { aptb3PBLENDVB.ptr } },
5223         { "pblendw",        3,              { aptb3PBLENDW.ptr } },
5224         { "pcmpeqb",        2,              { aptb2PCMPEQB.ptr } },
5225         { "pcmpeqd",        2,              { aptb2PCMPEQD.ptr } },
5226         { "pcmpeqq",        2,              { aptb2PCMPEQQ.ptr } },
5227         { "pcmpeqw",        2,              { aptb2PCMPEQW.ptr } },
5228         { "pcmpestri",      3,              { aptb3PCMPESTRI.ptr } },
5229         { "pcmpestrm",      3,              { aptb3PCMPESTRM.ptr } },
5230         { "pcmpgtb",        2,              { aptb2PCMPGTB.ptr } },
5231         { "pcmpgtd",        2,              { aptb2PCMPGTD.ptr } },
5232         { "pcmpgtq",        2,              { aptb2PCMPGTQ.ptr } },
5233         { "pcmpgtw",        2,              { aptb2PCMPGTW.ptr } },
5234         { "pcmpistri",      3,              { aptb3PCMPISTRI.ptr } },
5235         { "pcmpistrm",      3,              { aptb3PCMPISTRM.ptr } },
5236         { "pextrb",         3,              { aptb3PEXTRB.ptr } },
5237         { "pextrd",         3,              { aptb3PEXTRD.ptr } },
5238         { "pextrq",         3,              { aptb3PEXTRQ.ptr } },
5239         { "pextrw",         3,              { aptb3PEXTRW.ptr } },
5240         { "pf2id",          2,              { aptb2PF2ID.ptr } },
5241         { "pfacc",          2,              { aptb2PFACC.ptr } },
5242         { "pfadd",          2,              { aptb2PFADD.ptr } },
5243         { "pfcmpeq",        2,              { aptb2PFCMPEQ.ptr } },
5244         { "pfcmpge",        2,              { aptb2PFCMPGE.ptr } },
5245         { "pfcmpgt",        2,              { aptb2PFCMPGT.ptr } },
5246         { "pfmax",          2,              { aptb2PFMAX.ptr } },
5247         { "pfmin",          2,              { aptb2PFMIN.ptr } },
5248         { "pfmul",          2,              { aptb2PFMUL.ptr } },
5249         { "pfnacc",         2,              { aptb2PFNACC.ptr } },
5250         { "pfpnacc",        2,              { aptb2PFPNACC.ptr } },
5251         { "pfrcp",          2,              { aptb2PFRCP.ptr } },
5252         { "pfrcpit1",       2,              { aptb2PFRCPIT1.ptr } },
5253         { "pfrcpit2",       2,              { aptb2PFRCPIT2.ptr } },
5254         { "pfrsqit1",       2,              { aptb2PFRSQIT1.ptr } },
5255         { "pfrsqrt",        2,              { aptb2PFRSQRT.ptr } },
5256         { "pfsub",          2,              { aptb2PFSUB.ptr } },
5257         { "pfsubr",         2,              { aptb2PFSUBR.ptr } },
5258         { "phaddd",         2,              { aptb2PHADDD.ptr } },
5259         { "phaddsw",        2,              { aptb2PHADDSW.ptr } },
5260         { "phaddw",         2,              { aptb2PHADDW.ptr } },
5261         { "phminposuw",     2,              { aptb2PHMINPOSUW.ptr } },
5262         { "phsubd",         2,              { aptb2PHSUBD.ptr } },
5263         { "phsubsw",        2,              { aptb2PHSUBSW.ptr } },
5264         { "phsubw",         2,              { aptb2PHSUBW.ptr } },
5265         { "pi2fd",          2,              { aptb2PI2FD.ptr } },
5266         { "pinsrb",         3,              { aptb3PINSRB.ptr } },
5267         { "pinsrd",         3,              { aptb3PINSRD.ptr } },
5268         { "pinsrq",         3,              { aptb3PINSRQ.ptr } },
5269         { "pinsrw",         3,              { aptb3PINSRW.ptr } },
5270         { "pmaddubsw",      2,              { aptb2PMADDUBSW.ptr } },
5271         { "pmaddwd",        2,              { aptb2PMADDWD.ptr } },
5272         { "pmaxsb",         2,              { aptb2PMAXSB.ptr } },
5273         { "pmaxsd",         2,              { aptb2PMAXSD.ptr } },
5274         { "pmaxsw",         2,              { aptb2PMAXSW.ptr } },
5275         { "pmaxub",         2,              { aptb2PMAXUB.ptr } },
5276         { "pmaxud",         2,              { aptb2PMAXUD.ptr } },
5277         { "pmaxuw",         2,              { aptb2PMAXUW.ptr } },
5278         { "pminsb",         2,              { aptb2PMINSB.ptr } },
5279         { "pminsd",         2,              { aptb2PMINSD.ptr } },
5280         { "pminsw",         2,              { aptb2PMINSW.ptr } },
5281         { "pminub",         2,              { aptb2PMINUB.ptr } },
5282         { "pminud",         2,              { aptb2PMINUD.ptr } },
5283         { "pminuw",         2,              { aptb2PMINUW.ptr } },
5284         { "pmovmskb",       2,              { aptb2PMOVMSKB.ptr } },
5285         { "pmovsxbd",       2,              { aptb2PMOVSXBD.ptr } },
5286         { "pmovsxbq",       2,              { aptb2PMOVSXBQ.ptr } },
5287         { "pmovsxbw",       2,              { aptb2PMOVSXBW.ptr } },
5288         { "pmovsxdq",       2,              { aptb2PMOVSXDQ.ptr } },
5289         { "pmovsxwd",       2,              { aptb2PMOVSXWD.ptr } },
5290         { "pmovsxwq",       2,              { aptb2PMOVSXWQ.ptr } },
5291         { "pmovzxbd",       2,              { aptb2PMOVZXBD.ptr } },
5292         { "pmovzxbq",       2,              { aptb2PMOVZXBQ.ptr } },
5293         { "pmovzxbw",       2,              { aptb2PMOVZXBW.ptr } },
5294         { "pmovzxdq",       2,              { aptb2PMOVZXDQ.ptr } },
5295         { "pmovzxwd",       2,              { aptb2PMOVZXWD.ptr } },
5296         { "pmovzxwq",       2,              { aptb2PMOVZXWQ.ptr } },
5297         { "pmuldq",         2,              { aptb2PMULDQ.ptr } },
5298         { "pmulhrsw",       2,              { aptb2PMULHRSW.ptr } },
5299         { "pmulhrw",        2,              { aptb2PMULHRW.ptr } },
5300         { "pmulhuw",        2,              { aptb2PMULHUW.ptr } },
5301         { "pmulhw",         2,              { aptb2PMULHW.ptr } },
5302         { "pmulld",         2,              { aptb2PMULLD.ptr } },
5303         { "pmullw",         2,              { aptb2PMULLW.ptr } },
5304         { "pmuludq",        2,              { aptb2PMULUDQ.ptr } },
5305         { "pop",            1,              { aptb1POP.ptr } },
5306         { "popa",           0,              { aptb0POPA.ptr } },
5307         { "popad",          0,              { aptb0POPAD.ptr } },
5308         { "popcnt",         2,              { aptb2POPCNT.ptr } },
5309         { "popf",           0,              { aptb0POPF.ptr } },
5310         { "popfd",          0,              { aptb0POPFD.ptr } },
5311         { "popfq",          0,              { aptb0POPFQ.ptr } },
5312         { "por",            2,              { aptb2POR.ptr } },
5313         { "prefetchnta",    1,              { aptb1PREFETCHNTA.ptr } },
5314         { "prefetcht0",     1,              { aptb1PREFETCHT0.ptr } },
5315         { "prefetcht1",     1,              { aptb1PREFETCHT1.ptr } },
5316         { "prefetcht2",     1,              { aptb1PREFETCHT2.ptr } },
5317         { "prefetchw",      1,              { aptb1PREFETCHW.ptr } },
5318         { "prefetchwt1",    1,              { aptb1PREFETCHWT1.ptr } },
5319         { "psadbw",         2,              { aptb2PSADBW.ptr } },
5320         { "pshufb",         2,              { aptb2PSHUFB.ptr } },
5321         { "pshufd",         3,              { aptb3PSHUFD.ptr } },
5322         { "pshufhw",        3,              { aptb3PSHUFHW.ptr } },
5323         { "pshuflw",        3,              { aptb3PSHUFLW.ptr } },
5324         { "pshufw",         3,              { aptb3PSHUFW.ptr } },
5325         { "psignb",         2,              { aptb2PSIGNB.ptr } },
5326         { "psignd",         2,              { aptb2PSIGND.ptr } },
5327         { "psignw",         2,              { aptb2PSIGNW.ptr } },
5328         { "pslld",          2,              { aptb2PSLLD.ptr } },
5329         { "pslldq",         2,              { aptb2PSLLDQ.ptr } },
5330         { "psllq",          2,              { aptb2PSLLQ.ptr } },
5331         { "psllw",          2,              { aptb2PSLLW.ptr } },
5332         { "psrad",          2,              { aptb2PSRAD.ptr } },
5333         { "psraw",          2,              { aptb2PSRAW.ptr } },
5334         { "psrld",          2,              { aptb2PSRLD.ptr } },
5335         { "psrldq",         2,              { aptb2PSRLDQ.ptr } },
5336         { "psrlq",          2,              { aptb2PSRLQ.ptr } },
5337         { "psrlw",          2,              { aptb2PSRLW.ptr } },
5338         { "psubb",          2,              { aptb2PSUBB.ptr } },
5339         { "psubd",          2,              { aptb2PSUBD.ptr } },
5340         { "psubq",          2,              { aptb2PSUBQ.ptr } },
5341         { "psubsb",         2,              { aptb2PSUBSB.ptr } },
5342         { "psubsw",         2,              { aptb2PSUBSW.ptr } },
5343         { "psubusb",        2,              { aptb2PSUBUSB.ptr } },
5344         { "psubusw",        2,              { aptb2PSUBUSW.ptr } },
5345         { "psubw",          2,              { aptb2PSUBW.ptr } },
5346         { "pswapd",         2,              { aptb2PSWAPD.ptr } },
5347         { "ptest",          2,              { aptb2PTEST.ptr } },
5348         { "punpckhbw",      2,              { aptb2PUNPCKHBW.ptr } },
5349         { "punpckhdq",      2,              { aptb2PUNPCKHDQ.ptr } },
5350         { "punpckhqdq",     2,              { aptb2PUNPCKHQDQ.ptr } },
5351         { "punpckhwd",      2,              { aptb2PUNPCKHWD.ptr } },
5352         { "punpcklbw",      2,              { aptb2PUNPCKLBW.ptr } },
5353         { "punpckldq",      2,              { aptb2PUNPCKLDQ.ptr } },
5354         { "punpcklqdq",     2,              { aptb2PUNPCKLQDQ.ptr } },
5355         { "punpcklwd",      2,              { aptb2PUNPCKLWD.ptr } },
5356         { "push",           1,              { aptb1PUSH.ptr } },
5357         { "pusha",          0,              { aptb0PUSHA.ptr } },
5358         { "pushad",         0,              { aptb0PUSHAD.ptr } },
5359         { "pushf",          0,              { aptb0PUSHF.ptr } },
5360         { "pushfd",         0,              { aptb0PUSHFD.ptr } },
5361         { "pushfq",         0,              { aptb0PUSHFQ.ptr } },
5362         { "pxor",           2,              { aptb2PXOR.ptr } },
5363         { "rcl",            ITshift | 2,    { aptb2RCL.ptr } },
5364         { "rcpps",          2,              { aptb2RCPPS.ptr } },
5365         { "rcpss",          2,              { aptb2RCPSS.ptr } },
5366         { "rcr",            ITshift | 2,    { aptb2RCR.ptr } },
5367         { "rdfsbase",       1,              { aptb1RDFSBASE.ptr } },
5368         { "rdgsbase",       1,              { aptb1RDGSBASE.ptr } },
5369         { "rdmsr",          0,              { aptb0RDMSR.ptr } },
5370         { "rdpmc",          0,              { aptb0RDPMC.ptr } },
5371         { "rdrand",         1,              { aptb1RDRAND.ptr } },
5372         { "rdseed",         1,              { aptb1RDSEED.ptr } },
5373         { "rdtsc",          0,              { aptb0RDTSC.ptr } },
5374         { "rdtscp",         0,              { aptb0RDTSCP.ptr } },
5375         { "rep",            ITprefix | 0,   { aptb0REP.ptr } },
5376         { "repe",           ITprefix | 0,   { aptb0REP.ptr } },
5377         { "repne",          ITprefix | 0,   { aptb0REPNE.ptr } },
5378         { "repnz",          ITprefix | 0,   { aptb0REPNE.ptr } },
5379         { "repz",           ITprefix | 0,   { aptb0REP.ptr } },
5380         { "ret",            ITopt | 1,      { aptb1RET.ptr } },
5381         { "retf",           ITopt | 1,      { aptb1RETF.ptr } },
5382         { "rol",            ITshift | 2,    { aptb2ROL.ptr } },
5383         { "ror",            ITshift | 2,    { aptb2ROR.ptr } },
5384         { "roundpd",        3,              { aptb3ROUNDPD.ptr } },
5385         { "roundps",        3,              { aptb3ROUNDPS.ptr } },
5386         { "roundsd",        3,              { aptb3ROUNDSD.ptr } },
5387         { "roundss",        3,              { aptb3ROUNDSS.ptr } },
5388         { "rsm",            0,              { aptb0RSM.ptr } },
5389         { "rsqrtps",        2,              { aptb2RSQRTPS.ptr } },
5390         { "rsqrtss",        2,              { aptb2RSQRTSS.ptr } },
5391         { "sahf",           0,              { aptb0SAHF.ptr } },
5392         { "sal",            ITshift | 2,    { aptb2SHL.ptr } },
5393         { "sar",            ITshift | 2,    { aptb2SAR.ptr } },
5394         { "sbb",            2,              { aptb2SBB.ptr } },
5395         { "scas",           1,              { aptb1SCAS.ptr } },
5396         { "scasb",          0,              { aptb0SCASB.ptr } },
5397         { "scasd",          0,              { aptb0SCASD.ptr } },
5398         { "scasq",          0,              { aptb0SCASQ.ptr } },
5399         { "scasw",          0,              { aptb0SCASW.ptr } },
5400         { "seta",           1,              { aptb1SETNBE.ptr } },
5401         { "setae",          1,              { aptb1SETNB.ptr } },
5402         { "setb",           1,              { aptb1SETB.ptr } },
5403         { "setbe",          1,              { aptb1SETBE.ptr } },
5404         { "setc",           1,              { aptb1SETB.ptr } },
5405         { "sete",           1,              { aptb1SETZ.ptr } },
5406         { "setg",           1,              { aptb1SETNLE.ptr } },
5407         { "setge",          1,              { aptb1SETNL.ptr } },
5408         { "setl",           1,              { aptb1SETL.ptr } },
5409         { "setle",          1,              { aptb1SETLE.ptr } },
5410         { "setna",          1,              { aptb1SETBE.ptr } },
5411         { "setnae",         1,              { aptb1SETB.ptr } },
5412         { "setnb",          1,              { aptb1SETNB.ptr } },
5413         { "setnbe",         1,              { aptb1SETNBE.ptr } },
5414         { "setnc",          1,              { aptb1SETNB.ptr } },
5415         { "setne",          1,              { aptb1SETNZ.ptr } },
5416         { "setng",          1,              { aptb1SETLE.ptr } },
5417         { "setnge",         1,              { aptb1SETL.ptr } },
5418         { "setnl",          1,              { aptb1SETNL.ptr } },
5419         { "setnle",         1,              { aptb1SETNLE.ptr } },
5420         { "setno",          1,              { aptb1SETNO.ptr } },
5421         { "setnp",          1,              { aptb1SETNP.ptr } },
5422         { "setns",          1,              { aptb1SETNS.ptr } },
5423         { "setnz",          1,              { aptb1SETNZ.ptr } },
5424         { "seto",           1,              { aptb1SETO.ptr } },
5425         { "setp",           1,              { aptb1SETP.ptr } },
5426         { "setpe",          1,              { aptb1SETP.ptr } },
5427         { "setpo",          1,              { aptb1SETNP.ptr } },
5428         { "sets",           1,              { aptb1SETS.ptr } },
5429         { "setz",           1,              { aptb1SETZ.ptr } },
5430         { "sfence",         0,              { aptb0SFENCE.ptr } },
5431         { "sgdt",           1,              { aptb1SGDT.ptr } },
5432         { "sha1msg1",       2,              { aptb2SHA1MSG1.ptr } },
5433         { "sha1msg2",       2,              { aptb2SHA1MSG2.ptr } },
5434         { "sha1nexte",      2,              { aptb2SHA1NEXTE.ptr } },
5435         { "sha1rnds4",      3,              { aptb3SHA1RNDS4.ptr } },
5436         { "sha256msg1",     2,              { aptb2SHA256MSG1.ptr } },
5437         { "sha256msg2",     2,              { aptb2SHA256MSG2.ptr } },
5438         { "sha256rnds2",    2,              { aptb2SHA256RNDS2.ptr } },
5439         { "shl",            ITshift | 2,    { aptb2SHL.ptr } },
5440         { "shld",           3,              { aptb3SHLD.ptr } },
5441         { "shr",            ITshift | 2,    { aptb2SHR.ptr } },
5442         { "shrd",           3,              { aptb3SHRD.ptr } },
5443         { "shufpd",         3,              { aptb3SHUFPD.ptr } },
5444         { "shufps",         3,              { aptb3SHUFPS.ptr } },
5445         { "sidt",           1,              { aptb1SIDT.ptr } },
5446         { "sldt",           1,              { aptb1SLDT.ptr } },
5447         { "smsw",           1,              { aptb1SMSW.ptr } },
5448         { "sqrtpd",         2,              { aptb2SQRTPD.ptr } },
5449         { "sqrtps",         2,              { aptb2SQRTPS.ptr } },
5450         { "sqrtsd",         2,              { aptb2SQRTSD.ptr } },
5451         { "sqrtss",         2,              { aptb2SQRTSS.ptr } },
5452         { "stc",            0,              { aptb0STC.ptr } },
5453         { "std",            0,              { aptb0STD.ptr } },
5454         { "sti",            0,              { aptb0STI.ptr } },
5455         { "stmxcsr",        1,              { aptb1STMXCSR.ptr } },
5456         { "stos",           1,              { aptb1STOS.ptr } },
5457         { "stosb",          0,              { aptb0STOSB.ptr } },
5458         { "stosd",          0,              { aptb0STOSD.ptr } },
5459         { "stosq",          0,              { aptb0STOSQ.ptr } },
5460         { "stosw",          0,              { aptb0STOSW.ptr } },
5461         { "str",            1,              { aptb1STR.ptr } },
5462         { "sub",            2,              { aptb2SUB.ptr } },
5463         { "subpd",          2,              { aptb2SUBPD.ptr } },
5464         { "subps",          2,              { aptb2SUBPS.ptr } },
5465         { "subsd",          2,              { aptb2SUBSD.ptr } },
5466         { "subss",          2,              { aptb2SUBSS.ptr } },
5467         { "syscall",        0,              { aptb0SYSCALL.ptr } },
5468         { "sysenter",       0,              { aptb0SYSENTER.ptr } },
5469         { "sysexit",        0,              { aptb0SYSEXIT.ptr } },
5470         { "sysret",         0,              { aptb0SYSRET.ptr } },
5471         { "test",           2,              { aptb2TEST.ptr } },
5472         { "tzcnt",          2,              { aptb2TZCNT.ptr } },
5473         { "ucomisd",        2,              { aptb2UCOMISD.ptr } },
5474         { "ucomiss",        2,              { aptb2UCOMISS.ptr } },
5475         { "ud2",            0,              { aptb0UD2.ptr } },
5476         { "unpckhpd",       2,              { aptb2UNPCKHPD.ptr } },
5477         { "unpckhps",       2,              { aptb2UNPCKHPS.ptr } },
5478         { "unpcklpd",       2,              { aptb2UNPCKLPD.ptr } },
5479         { "unpcklps",       2,              { aptb2UNPCKLPS.ptr } },
5480         { "vaddpd",         3,              { aptb3VADDPD.ptr } },
5481         { "vaddps",         3,              { aptb3VADDPS.ptr } },
5482         { "vaddsd",         3,              { aptb3VADDSD.ptr } },
5483         { "vaddss",         3,              { aptb3VADDSS.ptr } },
5484         { "vaddsubpd",      3,              { aptb3VADDSUBPD.ptr } },
5485         { "vaddsubps",      3,              { aptb3VADDSUBPS.ptr } },
5486         { "vaesdec",        3,              { aptb3VAESDEC.ptr } },
5487         { "vaesdeclast",    3,              { aptb3VAESDECLAST.ptr } },
5488         { "vaesenc",        3,              { aptb3VAESENC.ptr } },
5489         { "vaesenclast",    3,              { aptb3VAESENCLAST.ptr } },
5490         { "vaesimc",        2,              { aptb2VAESIMC.ptr } },
5491         { "vaeskeygenassist", 3,            { aptb3VAESKEYGENASSIST.ptr } },
5492         { "vandnpd",        3,              { aptb3VANDNPD.ptr } },
5493         { "vandnps",        3,              { aptb3VANDNPS.ptr } },
5494         { "vandpd",         3,              { aptb3VANDPD.ptr } },
5495         { "vandps",         3,              { aptb3VANDPS.ptr } },
5496         { "vblendpd",       4,              { aptb4VBLENDPD.ptr } },
5497         { "vblendps",       4,              { aptb4VBLENDPS.ptr } },
5498         { "vblendvpd",      4,              { aptb4VBLENDVPD.ptr } },
5499         { "vblendvps",      4,              { aptb4VBLENDVPS.ptr } },
5500         { "vbroadcastf128", 2,              { aptb2VBROADCASTF128.ptr } },
5501         { "vbroadcastsd",   2,              { aptb2VBROADCASTSD.ptr } },
5502         { "vbroadcastss",   2,              { aptb2VBROADCASTSS.ptr } },
5503         { "vcmppd",         4,              { aptb4VCMPPD.ptr } },
5504         { "vcmpps",         4,              { aptb4VCMPPS.ptr } },
5505         { "vcmpsd",         4,              { aptb4VCMPSD.ptr } },
5506         { "vcmpss",         4,              { aptb4VCMPSS.ptr } },
5507         { "vcomisd",        2,              { aptb2VCOMISD.ptr } },
5508         { "vcomiss",        2,              { aptb2VCOMISS.ptr } },
5509         { "vcvtdq2pd",      2,              { aptb2VCVTDQ2PD.ptr } },
5510         { "vcvtdq2ps",      2,              { aptb2VCVTDQ2PS.ptr } },
5511         { "vcvtpd2dq",      2,              { aptb2VCVTPD2DQ.ptr } },
5512         { "vcvtpd2ps",      2,              { aptb2VCVTPD2PS.ptr } },
5513         { "vcvtph2ps",      2,              { aptb2VCVTPH2PS.ptr } },
5514         { "vcvtps2dq",      2,              { aptb2VCVTPS2DQ.ptr } },
5515         { "vcvtps2pd",      2,              { aptb2VCVTPS2PD.ptr } },
5516         { "vcvtps2ph",      3,              { aptb3VCVTPS2PH.ptr } },
5517         { "vcvtsd2si",      2,              { aptb2VCVTSD2SI.ptr } },
5518         { "vcvtsd2ss",      3,              { aptb3VCVTSD2SS.ptr } },
5519         { "vcvtsi2sd",      3,              { aptb3VCVTSI2SD.ptr } },
5520         { "vcvtsi2ss",      3,              { aptb3VCVTSI2SS.ptr } },
5521         { "vcvtss2sd",      3,              { aptb3VCVTSS2SD.ptr } },
5522         { "vcvtss2si",      2,              { aptb2VCVTSS2SI.ptr } },
5523         { "vcvttpd2dq",     2,              { aptb2VCVTTPD2DQ.ptr } },
5524         { "vcvttps2dq",     2,              { aptb2VCVTTPS2DQ.ptr } },
5525         { "vcvttsd2si",     2,              { aptb2VCVTTSD2SI.ptr } },
5526         { "vcvttss2si",     2,              { aptb2VCVTTSS2SI.ptr } },
5527         { "vdivpd",         3,              { aptb3VDIVPD.ptr } },
5528         { "vdivps",         3,              { aptb3VDIVPS.ptr } },
5529         { "vdivsd",         3,              { aptb3VDIVSD.ptr } },
5530         { "vdivss",         3,              { aptb3VDIVSS.ptr } },
5531         { "vdppd",          4,              { aptb4VDPPD.ptr } },
5532         { "vdpps",          4,              { aptb4VDPPS.ptr } },
5533         { "verr",           1,              { aptb1VERR.ptr } },
5534         { "verw",           1,              { aptb1VERW.ptr } },
5535         { "vextractf128",   3,              { aptb3VEXTRACTF128.ptr } },
5536         { "vextractps",     3,              { aptb3VEXTRACTPS.ptr } },
5537         { "vfmadd132pd",    3,              { aptb3VFMADD132PD.ptr } },
5538         { "vfmadd132ps",    3,              { aptb3VFMADD132PS.ptr } },
5539         { "vfmadd132sd",    3,              { aptb3VFMADD132SD.ptr } },
5540         { "vfmadd132ss",    3,              { aptb3VFMADD132SS.ptr } },
5541         { "vfmadd213pd",    3,              { aptb3VFMADD213PD.ptr } },
5542         { "vfmadd213ps",    3,              { aptb3VFMADD213PS.ptr } },
5543         { "vfmadd213sd",    3,              { aptb3VFMADD213SD.ptr } },
5544         { "vfmadd213ss",    3,              { aptb3VFMADD213SS.ptr } },
5545         { "vfmadd231pd",    3,              { aptb3VFMADD231PD.ptr } },
5546         { "vfmadd231ps",    3,              { aptb3VFMADD231PS.ptr } },
5547         { "vfmadd231sd",    3,              { aptb3VFMADD231SD.ptr } },
5548         { "vfmadd231ss",    3,              { aptb3VFMADD231SS.ptr } },
5549         { "vfmaddsub132pd", 3,              { aptb3VFMADDSUB132PD.ptr } },
5550         { "vfmaddsub132ps", 3,              { aptb3VFMADDSUB132PS.ptr } },
5551         { "vfmaddsub213pd", 3,              { aptb3VFMADDSUB213PD.ptr } },
5552         { "vfmaddsub213ps", 3,              { aptb3VFMADDSUB213PS.ptr } },
5553         { "vfmaddsub231pd", 3,              { aptb3VFMADDSUB231PD.ptr } },
5554         { "vfmaddsub231ps", 3,              { aptb3VFMADDSUB231PS.ptr } },
5555         { "vfmsub132pd",    3,              { aptb3VFMSUB132PD.ptr } },
5556         { "vfmsub132ps",    3,              { aptb3VFMSUB132PS.ptr } },
5557         { "vfmsub132sd",    3,              { aptb3VFMSUB132SD.ptr } },
5558         { "vfmsub132ss",    3,              { aptb3VFMSUB132SS.ptr } },
5559         { "vfmsub213pd",    3,              { aptb3VFMSUB213PD.ptr } },
5560         { "vfmsub213ps",    3,              { aptb3VFMSUB213PS.ptr } },
5561         { "vfmsub213sd",    3,              { aptb3VFMSUB213SD.ptr } },
5562         { "vfmsub213ss",    3,              { aptb3VFMSUB213SS.ptr } },
5563         { "vfmsub231pd",    3,              { aptb3VFMSUB231PD.ptr } },
5564         { "vfmsub231ps",    3,              { aptb3VFMSUB231PS.ptr } },
5565         { "vfmsub231sd",    3,              { aptb3VFMSUB231SD.ptr } },
5566         { "vfmsub231ss",    3,              { aptb3VFMSUB231SS.ptr } },
5567         { "vfmsubadd132pd", 3,              { aptb3VFMSUBADD132PD.ptr } },
5568         { "vfmsubadd132ps", 3,              { aptb3VFMSUBADD132PS.ptr } },
5569         { "vfmsubadd213pd", 3,              { aptb3VFMSUBADD213PD.ptr } },
5570         { "vfmsubadd213ps", 3,              { aptb3VFMSUBADD213PS.ptr } },
5571         { "vfmsubadd231pd", 3,              { aptb3VFMSUBADD231PD.ptr } },
5572         { "vfmsubadd231ps", 3,              { aptb3VFMSUBADD231PS.ptr } },
5573         { "vhaddpd",        3,              { aptb3VHADDPD.ptr } },
5574         { "vhaddps",        3,              { aptb3VHADDPS.ptr } },
5575         { "vinsertf128",    4,              { aptb4VINSERTF128.ptr } },
5576         { "vinsertps",      4,              { aptb4VINSERTPS.ptr } },
5577         { "vlddqu",         2,              { aptb2VLDDQU.ptr } },
5578         { "vldmxcsr",       1,              { aptb1VLDMXCSR.ptr } },
5579         { "vmaskmovdqu",    2,              { aptb2VMASKMOVDQU.ptr } },
5580         { "vmaskmovpd",     3,              { aptb3VMASKMOVPD.ptr } },
5581         { "vmaskmovps",     3,              { aptb3VMASKMOVPS.ptr } },
5582         { "vmaxpd",         3,              { aptb3VMAXPD.ptr } },
5583         { "vmaxps",         3,              { aptb3VMAXPS.ptr } },
5584         { "vmaxsd",         3,              { aptb3VMAXSD.ptr } },
5585         { "vmaxss",         3,              { aptb3VMAXSS.ptr } },
5586         { "vminpd",         3,              { aptb3VMINPD.ptr } },
5587         { "vminps",         3,              { aptb3VMINPS.ptr } },
5588         { "vminsd",         3,              { aptb3VMINSD.ptr } },
5589         { "vminss",         3,              { aptb3VMINSS.ptr } },
5590         { "vmovapd",        2,              { aptb2VMOVAPD.ptr } },
5591         { "vmovaps",        2,              { aptb2VMOVAPS.ptr } },
5592         { "vmovd",          2,              { aptb2VMOVD.ptr } },
5593         { "vmovddup",       2,              { aptb2VMOVDDUP.ptr } },
5594         { "vmovdqa",        2,              { aptb2VMOVDQA.ptr } },
5595         { "vmovdqu",        2,              { aptb2VMOVDQU.ptr } },
5596         { "vmovhlps",       3,              { aptb3VMOVHLPS.ptr } },
5597         { "vmovhpd",        ITopt | 3,      { aptb3VMOVHPD.ptr } },
5598         { "vmovhps",        ITopt | 3,      { aptb3VMOVHPS.ptr } },
5599         { "vmovlhps",       3,              { aptb3VMOVLHPS.ptr } },
5600         { "vmovlpd",        ITopt | 3,      { aptb3VMOVLPD.ptr } },
5601         { "vmovlps",        ITopt | 3,      { aptb3VMOVLPS.ptr } },
5602         { "vmovmskpd",      2,              { aptb2VMOVMSKPD.ptr } },
5603         { "vmovmskps",      2,              { aptb2VMOVMSKPS.ptr } },
5604         { "vmovntdq",       2,              { aptb2VMOVNTDQ.ptr } },
5605         { "vmovntdqa",      2,              { aptb2VMOVNTDQA.ptr } },
5606         { "vmovntpd",       2,              { aptb2VMOVNTPD.ptr } },
5607         { "vmovntps",       2,              { aptb2VMOVNTPS.ptr } },
5608         { "vmovq",          2,              { aptb2VMOVQ.ptr } },
5609         { "vmovsd",         ITopt | 3,      { aptb3VMOVSD.ptr } },
5610         { "vmovshdup",      2,              { aptb2VMOVSHDUP.ptr } },
5611         { "vmovsldup",      2,              { aptb2VMOVSLDUP.ptr } },
5612         { "vmovss",         ITopt | 3,      { aptb3VMOVSS.ptr } },
5613         { "vmovupd",        2,              { aptb2VMOVUPD.ptr } },
5614         { "vmovups",        2,              { aptb2VMOVUPS.ptr } },
5615         { "vmpsadbw",       4,              { aptb4VMPSADBW.ptr } },
5616         { "vmulpd",         3,              { aptb3VMULPD.ptr } },
5617         { "vmulps",         3,              { aptb3VMULPS.ptr } },
5618         { "vmulsd",         3,              { aptb3VMULSD.ptr } },
5619         { "vmulss",         3,              { aptb3VMULSS.ptr } },
5620         { "vorpd",          3,              { aptb3VORPD.ptr } },
5621         { "vorps",          3,              { aptb3VORPS.ptr } },
5622         { "vpabsb",         2,              { aptb2VPABSB.ptr } },
5623         { "vpabsd",         2,              { aptb2VPABSD.ptr } },
5624         { "vpabsw",         2,              { aptb2VPABSW.ptr } },
5625         { "vpackssdw",      3,              { aptb3VPACKSSDW.ptr } },
5626         { "vpacksswb",      3,              { aptb3VPACKSSWB.ptr } },
5627         { "vpackusdw",      3,              { aptb3VPACKUSDW.ptr } },
5628         { "vpackuswb",      3,              { aptb3VPACKUSWB.ptr } },
5629         { "vpaddb",         3,              { aptb3VPADDB.ptr } },
5630         { "vpaddd",         3,              { aptb3VPADDD.ptr } },
5631         { "vpaddq",         3,              { aptb3VPADDQ.ptr } },
5632         { "vpaddsb",        3,              { aptb3VPADDSB.ptr } },
5633         { "vpaddsw",        3,              { aptb3VPADDSW.ptr } },
5634         { "vpaddusb",       3,              { aptb3VPADDUSB.ptr } },
5635         { "vpaddusw",       3,              { aptb3VPADDUSW.ptr } },
5636         { "vpaddw",         3,              { aptb3VPADDW.ptr } },
5637         { "vpalignr",       4,              { aptb4VPALIGNR.ptr } },
5638         { "vpand",          3,              { aptb3VPAND.ptr } },
5639         { "vpandn",         3,              { aptb3VPANDN.ptr } },
5640         { "vpavgb",         3,              { aptb3VPAVGB.ptr } },
5641         { "vpavgw",         3,              { aptb3VPAVGW.ptr } },
5642         { "vpblendvb",      4,              { aptb4VPBLENDVB.ptr } },
5643         { "vpblendw",       4,              { aptb4VPBLENDW.ptr } },
5644         { "vpclmulqdq",     4,              { aptb4VPCLMULQDQ.ptr } },
5645         { "vpcmpeqb",       3,              { aptb3VPCMPEQB.ptr } },
5646         { "vpcmpeqd",       3,              { aptb3VPCMPEQD.ptr } },
5647         { "vpcmpeqq",       3,              { aptb3VPCMPEQQ.ptr } },
5648         { "vpcmpeqw",       3,              { aptb3VPCMPEQW.ptr } },
5649         { "vpcmpestri",     3,              { aptb3VPCMPESTRI.ptr } },
5650         { "vpcmpestrm",     3,              { aptb3VPCMPESTRM.ptr } },
5651         { "vpcmpgtb",       3,              { aptb3VPCMPGTB.ptr } },
5652         { "vpcmpgtd",       3,              { aptb3VPCMPGTD.ptr } },
5653         { "vpcmpgtq",       3,              { aptb3VPCMPGTQ.ptr } },
5654         { "vpcmpgtw",       3,              { aptb3VPCMPGTW.ptr } },
5655         { "vpcmpistri",     3,              { aptb3VPCMPISTRI.ptr } },
5656         { "vpcmpistrm",     3,              { aptb3VPCMPISTRM.ptr } },
5657         { "vperm2f128",     4,              { aptb3VPERM2F128.ptr } },
5658         { "vpermilpd",      3,              { aptb3VPERMILPD.ptr } },
5659         { "vpermilps",      3,              { aptb3VPERMILPS.ptr } },
5660         { "vpextrb",        3,              { aptb3VPEXTRB.ptr } },
5661         { "vpextrd",        3,              { aptb3VPEXTRD.ptr } },
5662         { "vpextrq",        3,              { aptb3VPEXTRQ.ptr } },
5663         { "vpextrw",        3,              { aptb3VPEXTRW.ptr } },
5664         { "vphaddd",        3,              { aptb3VPHADDD.ptr } },
5665         { "vphaddsw",       3,              { aptb3VPHADDSW.ptr } },
5666         { "vphaddw",        3,              { aptb3VPHADDW.ptr } },
5667         { "vphminposuw",    2,              { aptb2VPHMINPOSUW.ptr } },
5668         { "vphsubd",        3,              { aptb3VPHSUBD.ptr } },
5669         { "vphsubsw",       3,              { aptb3VPHSUBSW.ptr } },
5670         { "vphsubw",        3,              { aptb3VPHSUBW.ptr } },
5671         { "vpinsrb",        4,              { aptb4VPINSRB.ptr } },
5672         { "vpinsrd",        4,              { aptb4VPINSRD.ptr } },
5673         { "vpinsrq",        4,              { aptb4VPINSRQ.ptr } },
5674         { "vpinsrw",        4,              { aptb4VPINSRW.ptr } },
5675         { "vpmaddubsw",     3,              { aptb3VPMADDUBSW.ptr } },
5676         { "vpmaddwd",       3,              { aptb3VPMADDWD.ptr } },
5677         { "vpmaxsb",        3,              { aptb3VPMAXSB.ptr } },
5678         { "vpmaxsd",        3,              { aptb3VPMAXSD.ptr } },
5679         { "vpmaxsw",        3,              { aptb3VPMAXSW.ptr } },
5680         { "vpmaxub",        3,              { aptb3VPMAXUB.ptr } },
5681         { "vpmaxud",        3,              { aptb3VPMAXUD.ptr } },
5682         { "vpmaxuw",        3,              { aptb3VPMAXUW.ptr } },
5683         { "vpminsb",        3,              { aptb3VPMINSB.ptr } },
5684         { "vpminsd",        3,              { aptb3VPMINSD.ptr } },
5685         { "vpminsw",        3,              { aptb3VPMINSW.ptr } },
5686         { "vpminub",        3,              { aptb3VPMINUB.ptr } },
5687         { "vpminud",        3,              { aptb3VPMINUD.ptr } },
5688         { "vpminuw",        3,              { aptb3VPMINUW.ptr } },
5689         { "vpmovmskb",      2,              { aptb2VPMOVMSKB.ptr } },
5690         { "vpmovsxbd",      2,              { aptb2VPMOVSXBD.ptr } },
5691         { "vpmovsxbq",      2,              { aptb2VPMOVSXBQ.ptr } },
5692         { "vpmovsxbw",      2,              { aptb2VPMOVSXBW.ptr } },
5693         { "vpmovsxdq",      2,              { aptb2VPMOVSXDQ.ptr } },
5694         { "vpmovsxwd",      2,              { aptb2VPMOVSXWD.ptr } },
5695         { "vpmovsxwq",      2,              { aptb2VPMOVSXWQ.ptr } },
5696         { "vpmovzxbd",      2,              { aptb2VPMOVZXBD.ptr } },
5697         { "vpmovzxbq",      2,              { aptb2VPMOVZXBQ.ptr } },
5698         { "vpmovzxbw",      2,              { aptb2VPMOVZXBW.ptr } },
5699         { "vpmovzxdq",      2,              { aptb2VPMOVZXDQ.ptr } },
5700         { "vpmovzxwd",      2,              { aptb2VPMOVZXWD.ptr } },
5701         { "vpmovzxwq",      2,              { aptb2VPMOVZXWQ.ptr } },
5702         { "vpmuldq",        3,              { aptb3VPMULDQ.ptr } },
5703         { "vpmulhrsw",      3,              { aptb3VPMULHRSW.ptr } },
5704         { "vpmulhuw",       3,              { aptb3VPMULHUW.ptr } },
5705         { "vpmulhw",        3,              { aptb3VPMULHW.ptr } },
5706         { "vpmulld",        3,              { aptb3VPMULLD.ptr } },
5707         { "vpmullw",        3,              { aptb3VPMULLW.ptr } },
5708         { "vpmuludq",       3,              { aptb3VPMULUDQ.ptr } },
5709         { "vpor",           3,              { aptb3VPOR.ptr } },
5710         { "vpsadbw",        3,              { aptb3VPSADBW.ptr } },
5711         { "vpshufb",        3,              { aptb3VPSHUFB.ptr } },
5712         { "vpshufd",        3,              { aptb3VPSHUFD.ptr } },
5713         { "vpshufhw",       3,              { aptb3VPSHUFHW.ptr } },
5714         { "vpshuflw",       3,              { aptb3VPSHUFLW.ptr } },
5715         { "vpsignb",        3,              { aptb3VPSIGNB.ptr } },
5716         { "vpsignd",        3,              { aptb3VPSIGND.ptr } },
5717         { "vpsignw",        3,              { aptb3VPSIGNW.ptr } },
5718         { "vpslld",         3,              { aptb3VPSLLD.ptr } },
5719         { "vpslldq",        3,              { aptb3VPSLLDQ.ptr } },
5720         { "vpsllq",         3,              { aptb3VPSLLQ.ptr } },
5721         { "vpsllw",         3,              { aptb3VPSLLW.ptr } },
5722         { "vpsrad",         3,              { aptb3VPSRAD.ptr } },
5723         { "vpsraw",         3,              { aptb3VPSRAW.ptr } },
5724         { "vpsrld",         3,              { aptb3VPSRLD.ptr } },
5725         { "vpsrldq",        3,              { aptb3VPSRLDQ.ptr } },
5726         { "vpsrlq",         3,              { aptb3VPSRLQ.ptr } },
5727         { "vpsrlw",         3,              { aptb3VPSRLW.ptr } },
5728         { "vpsubb",         3,              { aptb3VPSUBB.ptr } },
5729         { "vpsubd",         3,              { aptb3VPSUBD.ptr } },
5730         { "vpsubq",         3,              { aptb3VPSUBQ.ptr } },
5731         { "vpsubsb",        3,              { aptb3VPSUBSB.ptr } },
5732         { "vpsubsw",        3,              { aptb3VPSUBSW.ptr } },
5733         { "vpsubusb",       3,              { aptb3VPSUBUSB.ptr } },
5734         { "vpsubusw",       3,              { aptb3VPSUBUSW.ptr } },
5735         { "vpsubw",         3,              { aptb3VPSUBW.ptr } },
5736         { "vptest",         2,              { aptb2VPTEST.ptr } },
5737         { "vpunpckhbw",     3,              { aptb3VPUNPCKHBW.ptr } },
5738         { "vpunpckhdq",     3,              { aptb3VPUNPCKHDQ.ptr } },
5739         { "vpunpckhqdq",    3,              { aptb3VPUNPCKHQDQ.ptr } },
5740         { "vpunpckhwd",     3,              { aptb3VPUNPCKHWD.ptr } },
5741         { "vpunpcklbw",     3,              { aptb3VPUNPCKLBW.ptr } },
5742         { "vpunpckldq",     3,              { aptb3VPUNPCKLDQ.ptr } },
5743         { "vpunpcklqdq",    3,              { aptb3VPUNPCKLQDQ.ptr } },
5744         { "vpunpcklwd",     3,              { aptb3VPUNPCKLWD.ptr } },
5745         { "vpxor",          3,              { aptb3VPXOR.ptr } },
5746         { "vrcpps",         2,              { aptb2VRCPPS.ptr } },
5747         { "vrcpss",         3,              { aptb3VRCPSS.ptr } },
5748         { "vroundpd",       3,              { aptb3VROUNDPD.ptr } },
5749         { "vroundps",       3,              { aptb3VROUNDPS.ptr } },
5750         { "vroundsd",       4,              { aptb4VROUNDSD.ptr } },
5751         { "vroundss",       4,              { aptb4VROUNDSS.ptr } },
5752         { "vshufpd",        4,              { aptb4VSHUFPD.ptr } },
5753         { "vshufps",        4,              { aptb4VSHUFPS.ptr } },
5754         { "vsqrtpd",        2,              { aptb2VSQRTPD.ptr } },
5755         { "vsqrtps",        2,              { aptb2VSQRTPS.ptr } },
5756         { "vsqrtsd",        3,              { aptb3VSQRTSD.ptr } },
5757         { "vsqrtss",        3,              { aptb3VSQRTSS.ptr } },
5758         { "vstmxcsr",       1,              { aptb1VSTMXCSR.ptr } },
5759         { "vsubpd",         3,              { aptb3VSUBPD.ptr } },
5760         { "vsubps",         3,              { aptb3VSUBPS.ptr } },
5761         { "vsubsd",         3,              { aptb3VSUBSD.ptr } },
5762         { "vsubss",         3,              { aptb3VSUBSS.ptr } },
5763         { "vucomisd",       2,              { aptb2VUCOMISD.ptr } },
5764         { "vucomiss",       2,              { aptb2VUCOMISS.ptr } },
5765         { "vunpckhpd",      3,              { aptb3VUNPCKHPD.ptr } },
5766         { "vunpckhps",      3,              { aptb3VUNPCKHPS.ptr } },
5767         { "vunpcklpd",      3,              { aptb3VUNPCKLPD.ptr } },
5768         { "vunpcklps",      3,              { aptb3VUNPCKLPS.ptr } },
5769         { "vxorpd",         3,              { aptb3VXORPD.ptr } },
5770         { "vxorps",         3,              { aptb3VXORPS.ptr } },
5771         { "vzeroall",       0,              { aptb0VZEROALL.ptr } },
5772         { "vzeroupper",     0,              { aptb0VZEROUPPER.ptr } },
5773         { "wait",           0,              { aptb0WAIT.ptr } },
5774         { "wbinvd",         0,              { aptb0WBINVD.ptr } },
5775         { "wrfsbase",       1,              { aptb1WRFSBASE.ptr } },
5776         { "wrgsbase",       1,              { aptb1WRGSBASE.ptr } },
5777         { "wrmsr",          0,              { aptb0WRMSR.ptr } },
5778         { "xadd",           2,              { aptb2XADD.ptr } },
5779         { "xchg",           2,              { aptb2XCHG.ptr } },
5780         { "xgetbv",         0,              { aptb0XGETBV.ptr } },
5781         { "xlat",           ITopt | 1,      { aptb1XLAT.ptr } },
5782         { "xlatb",          0,              { aptb0XLATB.ptr } },
5783         { "xor",            2,              { aptb2XOR.ptr } },
5784         { "xorpd",          2,              { aptb2XORPD.ptr } },
5785         { "xorps",          2,              { aptb2XORPS.ptr } },
5786         { "xrstor",         ITfloat | 1,    { aptb1XRSTOR.ptr } },
5787         { "xrstor64",       ITfloat | 1,    { aptb1XRSTOR64.ptr } },
5788         { "xsave",          ITfloat | 1,    { aptb1XSAVE.ptr } },
5789         { "xsave64",        ITfloat | 1,    { aptb1XSAVE64.ptr } },
5790         { "xsavec",         ITfloat | 1,    { aptb1XSAVEC.ptr } },
5791         { "xsavec64",       ITfloat | 1,    { aptb1XSAVEC64.ptr } },
5792         { "xsaveopt",       ITfloat | 1,    { aptb1XSAVEOPT.ptr } },
5793         { "xsaveopt64",     ITfloat | 1,    { aptb1XSAVEOPT64.ptr } },
5794         { "xsetbv",         0,              { aptb0XSETBV.ptr } },
5795 ];
5796 
5797 /*******************************
5798  */
5799 
5800 extern (C++) const(char)* asm_opstr(OP *pop)
5801 {
5802     return pop.str;
5803 }
5804 
5805 /*******************************
5806  */
5807 
5808 extern (C++) OP *asm_op_lookup(const(char)* s)
5809 {
5810     int i;
5811     char[20] szBuf = void;
5812 
5813     //printf("asm_op_lookup('%s')\n",s);
5814     if (strlen(s) >= szBuf.length)
5815         return null;
5816     strcpy(szBuf.ptr,s);
5817 
5818     version (SCPP)
5819         strlwr(szBuf.ptr);
5820 
5821     i = binary(szBuf.ptr,optab);
5822     return (i == -1) ? null : cast(OP*)&optab[i];
5823 }
5824 
5825 /*******************************
5826  */
5827 
5828 extern (C++) void init_optab()
5829 {   int i;
5830 
5831     debug
5832     for (i = 0; i < optab.length - 1; i++)
5833     {
5834         if (strcmp(optab[i].str,optab[i + 1].str) >= 0)
5835         {
5836             printf("optab[%d] = '%s', [%d] = '%s'\n",i,optab[i].str,i + 1,optab[i + 1].str);
5837             assert(0);
5838         }
5839     }
5840 }
5841 
5842 private int binary(const(char)* p, const OP[] table)
5843 {
5844     int low = 0;
5845     char cp = *p;
5846     int high = cast(int)(table.length) - 1;
5847     p++;
5848 
5849     while (low <= high)
5850     {
5851         const mid = (low + high) >> 1;
5852         int cond = table[mid].str[0] - cp;
5853         if (cond == 0)
5854             cond = strcmp(table[mid].str + 1,p);
5855         if (cond > 0)
5856             high = mid - 1;
5857         else if (cond < 0)
5858             low = mid + 1;
5859         else
5860             return cast(int)mid;                 /* match index                  */
5861     }
5862     return -1;
5863 }
5864 
5865 
5866 }