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