1: // Copyright (C) 1985-1998 by Symantec
   2: // Copyright (C) 2000-2010 by Digital Mars
   3: // All Rights Reserved
   4: // http://www.digitalmars.com
   5: /*
   6:  * This source file is made available for personal use
   7:  * only. The license is in /dmd/src/dmd/backendlicense.txt
   8:  * or /dm/src/dmd/backendlicense.txt
   9:  * For any other uses, please contact Digital Mars.
  10:  */
  11: 
  12: #if !DEMO && !SPP
  13: 
  14: #include        <stdio.h>
  15: #include        <stdlib.h>
  16: #include        <string.h>
  17: #include        <time.h>
  18: 
  19: #include        "cc.h"
  20: #include        "code.h"
  21: #include        "iasm.h"
  22: 
  23: static char __file__[] = __FILE__;      /* for tassert.h                */
  24: #include        "tassert.h"
  25: 
  26: //
  27: // NOTE: For 0 operand instructions, the opcode is taken from
  28: // the first entry and no subsequent entries are required.
  29: // for instructions with operands, a NULL entry is required at the end
  30: // as a terminator
  31: //
  32: // 0 Operand instructions
  33: //
  34: 
  35: #define OPTABLE0(str,op,mod) PTRNTAB0 aptb0##str[] = { { op, mod }, };
  36: 
  37: OPTABLE0(AAA,     0x37  ,_i64_bit | _modax);
  38: OPTABLE0(AAD,     0xd50a,_i64_bit | _modax);
  39: OPTABLE0(AAM,     0xd40a,_i64_bit | _modax);
  40: OPTABLE0(AAS,     0x3f,  _i64_bit | _modax);
  41: OPTABLE0(CBW,     0x98,_16_bit | _modax);
  42: OPTABLE0(CWDE,    0x98,_32_bit | _I386 | _modax);
  43: OPTABLE0(CDQE,    0x98,_64_bit | _modax);
  44: OPTABLE0(CLC,     0xf8,0);
  45: OPTABLE0(CLD,     0xfc,0);
  46: OPTABLE0(CLI,     0xfa,0);
  47: OPTABLE0(CLTS,    0x0f06,0);
  48: OPTABLE0(CMC,     0xf5,0);
  49: OPTABLE0(CMPSB,   0xa6,_modsidi);
  50: OPTABLE0(CMPSW,   0xa7,_16_bit | _modsidi);
  51: //OPTABLE0(CMPSD, 0xa7,_32_bit | _I386 | _modsidi);
  52: OPTABLE0(CMPSQ,   0xa7,_64_bit | _modsidi);
  53: OPTABLE0(CWD,     0x99, _16_bit | _modaxdx);
  54: OPTABLE0(CDQ,     0x99,_32_bit | _I386 | _modaxdx);
  55: OPTABLE0(CQO,     0x99, _64_bit | _modaxdx);
  56: OPTABLE0(DAA,     0x27,_i64_bit | _modax );
  57: OPTABLE0(DAS,     0x2f,_i64_bit | _modax );
  58: OPTABLE0(HLT,     0xf4,0);
  59: OPTABLE0(INSB,    0x6c,_I386 | _modsi);
  60: OPTABLE0(INSW,    0x6d,_16_bit | _I386 | _modsi);
  61: OPTABLE0(INSD,    0x6d,_32_bit | _I386 | _modsi);
  62: OPTABLE0(INTO,    0xce,_i64_bit);
  63: OPTABLE0(INVD,    0x0f08,_I386);               // Actually a 486 only instruction
  64: OPTABLE0(IRET,    0xcf,_16_bit);
  65: OPTABLE0(IRETD,   0xcf,_32_bit | _I386);
  66: OPTABLE0(LAHF,    0x9f,_modax);
  67: OPTABLE0(LEAVE,   0xc9,_I386);
  68: OPTABLE0(LOCK,    0xf0,0);
  69: OPTABLE0(LODSB,   0xac,_modsiax);
  70: OPTABLE0(LODSW,   0xad,_16_bit | _modsiax);
  71: OPTABLE0(LODSD,   0xad,_32_bit | _I386 | _modsiax);
  72: OPTABLE0(LODSQ,   0xad,_64_bit | _modsiax);
  73: OPTABLE0(MOVSB,   0xa4, _modsidi);
  74: OPTABLE0(MOVSW,   0xa5, _16_bit | _modsidi);
  75: OPTABLE0(MOVSQ,   0xa5, _64_bit | _modsidi);
  76: OPTABLE0(NOP,     0x90, 0);
  77: OPTABLE0(OUTSB,   0x6e, _I386 | _modsi);
  78: OPTABLE0(OUTSW,   0x6f, _16_bit | _I386 | _modsi);
  79: OPTABLE0(OUTSD,   0x6f, _32_bit | _I386 | _modsi);
  80: OPTABLE0(POPA,    0x61,_i64_bit | _16_bit | _I386 | _modall);
  81: OPTABLE0(POPAD,   0x61,_i64_bit | _32_bit | _I386 | _modall);
  82: OPTABLE0(POPF,    0x9d,           _16_bit);
  83: OPTABLE0(POPFD,   0x9d,_i64_bit | _32_bit | _I386);
  84: OPTABLE0(POPFQ,   0x9d, _64_bit);
  85: OPTABLE0(PUSHA,   0x60,_i64_bit | _16_bit | _I386);
  86: OPTABLE0(PUSHAD,  0x60,_i64_bit | _32_bit | _I386);
  87: OPTABLE0(PUSHF,   0x9c,           _16_bit);
  88: OPTABLE0(PUSHFD,  0x9c,_i64_bit | _32_bit | _I386);
  89: OPTABLE0(PUSHFQ,  0x9c, _64_bit);                // TODO REX_W override is implicit
  90: OPTABLE0(REP,     0xf3, _modcx);
  91: OPTABLE0(REPNE,   0xf2, _modcx);
  92: OPTABLE0(SAHF,    0x9e, 0);
  93: OPTABLE0(SCASB,   0xAE, _moddi);
  94: OPTABLE0(SCASW,   0xAF, _16_bit | _moddi);
  95: OPTABLE0(SCASD,   0xAF, _32_bit | _I386 | _moddi);
  96: OPTABLE0(SCASQ,   0xAF, _64_bit | _moddi);
  97: OPTABLE0(STC,     0xf9, 0);
  98: OPTABLE0(STD,     0xfd, 0);
  99: OPTABLE0(STI,     0xfb, 0);
 100: OPTABLE0(STOSB,   0xaa, _moddi);
 101: OPTABLE0(STOSW,   0xAB, _16_bit | _moddi);
 102: OPTABLE0(STOSD,   0xAB, _32_bit | _I386 | _moddi);
 103: OPTABLE0(STOSQ,   0xAB, _64_bit | _moddi);
 104: OPTABLE0(WAIT,    0x9B, 0);
 105: OPTABLE0(WBINVD,  0x0f09, _I386);                        // Really a 486 opcode
 106: OPTABLE0(XLATB,   0xd7, _modax);
 107: OPTABLE0(CPUID,   0x0fa2, _I386 | _modall);
 108: OPTABLE0(RDMSR,   0x0f32, _I386 | _modaxdx);
 109: OPTABLE0(RDPMC,   0x0f33, _I386 | _modaxdx);
 110: OPTABLE0(RDTSC,   0x0f31, _I386 | _modaxdx);
 111: OPTABLE0(WRMSR,   0x0f30, _I386);
 112: OPTABLE0(RSM,     0x0faa,_i64_bit | _I386);
 113: 
 114: PTRNTAB2 aptb2MOVSD[] =  /* MOVSD */ {
 115:         { 0xa5, _32_bit | _I386 | _modsidi },
 116:         { 0xF20F10, _r, _xmm, _xmm_m64 },
 117:         { 0xF20F11, _r, _xmm_m64, _xmm },
 118: };
 119: 
 120: //
 121: // Now come the one operand instructions
 122: // These will prove to be a little more challenging than the 0
 123: // operand instructions
 124: //
 125: PTRNTAB1 aptb1BSWAP[] = /* BSWAP */ {
 126:                                 // Really is a 486 only instruction
 127:         { 0x0fc8,   _I386, _plus_r | _r32 },
 128:         { 0x0fc8, _64_bit, _plus_r | _r64 },
 129:         { ASM_END, 0, 0 }
 130: };
 131: 
 132: PTRNTAB1 aptb1CALL[] = /* CALL */ {
 133:         { 0xe8, _cw| _i64_bit |           _modall,  _rel16  },
 134:         { 0xff, _2 | _i64_bit | _16_bit | _modall,  _r16 },
 135:         { 0xff, _2 | _i64_bit |           _modall,  _m16 },
 136:         { 0x9a, _cd| _i64_bit |           _modall,  _p1616  },
 137:         { 0xff, _3 |                      _modall,  _m1616  },
 138:         { 0xe8, _cd|                      _modall,  _rel32  },
 139:         { 0xff, _2 | _i64_bit | _32_bit | _modall,  _r32  },
 140:         { 0xff, _2 |            _32_bit | _modall,  _r64  },       // REX_W override is implicit
 141:         { 0xff, _2 | _i64_bit |           _modall,  _m32  },
 142:         { 0xff, _2 |            _64_bit | _modall,  _m64  },       // TODO REX_W override is implicit
 143:         { 0x9a, _cp| _i64_bit |           _modall,  _p1632 },
 144:         { 0xff, _3 |                      _modall,  _m1632 },
 145:         { ASM_END, 0, 0 }
 146: };
 147: 
 148: PTRNTAB1 aptb1DEC[] = /* DEC */ {
 149:         { 0xfe, _1,                        _rm8 },
 150:         { 0x48, _rw | _i64_bit | _16_bit,  _r16 | _plus_r },
 151:         { 0x48, _rd | _i64_bit | _32_bit,  _r32 | _plus_r },
 152:         { 0xff, _1  |            _16_bit,  _rm16 },
 153:         { 0xff, _1  |            _32_bit,  _rm32 },
 154:         { 0xff, _1  |            _64_bit,  _rm64 },
 155:         { ASM_END, 0, 0 }
 156: };
 157: 
 158: PTRNTAB1 aptb1INC[] = /* INC */ {
 159:         { 0xfe, _0,                        _rm8 },
 160:         { 0x40, _rw | _i64_bit | _16_bit,  _r16 | _plus_r },
 161:         { 0x40, _rd | _i64_bit | _32_bit,  _r32 | _plus_r },
 162:         { 0xff, _0  |            _16_bit,  _rm16 },
 163:         { 0xff, _0  |            _32_bit,  _rm32 },
 164:         { 0xff, _0  |            _64_bit,  _rm64 },
 165:         { ASM_END, 0, 0 }
 166: };
 167: // INT and INT 3
 168: PTRNTAB1 aptb1INT[]= /* INT */ {
 169:         { 0xcc, 3,              0 },    // The ulFlags here are meant to
 170:                                         // be the value of the immediate
 171:                                         // operand
 172:         { 0xcd, 0,              _imm8 },
 173:         { ASM_END, 0, 0 }
 174: };
 175: PTRNTAB1 aptb1INVLPG[] = /* INVLPG */ {         // 486 only instruction
 176:         { 0x0f01,       _I386|_7, _m8 | _m16 | _m32 | _m48 },
 177:         { ASM_END, 0, 0 }
 178: };
 179: 
 180: #define OPTABLE(str,op) \
 181: PTRNTAB1 aptb1##str[] = {                    \
 182:         { 0x70|op,   _cb,         _rel8 },   \
 183:         { 0x0f80|op, _cw|_i64_bit,_rel16 },  \
 184:         { 0x0f80|op, _cd,         _rel32 },  \
 185:         { ASM_END, 0, 0 }                    \
 186: }
 187: 
 188: OPTABLE(JO,0);
 189: OPTABLE(JNO,1);
 190: OPTABLE(JB,2);
 191: OPTABLE(JNB,3);
 192: OPTABLE(JZ,4);
 193: OPTABLE(JNZ,5);
 194: OPTABLE(JBE,6);
 195: OPTABLE(JNBE,7);
 196: OPTABLE(JS,8);
 197: OPTABLE(JNS,9);
 198: OPTABLE(JP,0xA);
 199: OPTABLE(JNP,0xB);
 200: OPTABLE(JL,0xC);
 201: OPTABLE(JNL,0xD);
 202: OPTABLE(JLE,0xE);
 203: OPTABLE(JNLE,0xF);
 204: 
 205: #undef OPTABLE
 206: 
 207: PTRNTAB1 aptb1JCXZ[] = /* JCXZ */ {
 208:         { 0xe3, _cb | _i64_bit | _16_bit_addr, _rel8 },
 209:         { ASM_END, 0, 0 }
 210: };
 211: PTRNTAB1 aptb1JECXZ[] = /* JECXZ */ {
 212:         { 0xe3, _cb | _32_bit_addr | _I386,_rel8 },
 213:         { ASM_END, 0, 0 }
 214: };
 215: PTRNTAB1 aptb1JMP[] = /* JMP */ {
 216:         { 0xe9, _cw| _i64_bit,           _rel16 },
 217:         { 0xe9, _cd,                     _rel32 },
 218:         { 0xeb, _cb,                     _rel8  },
 219:         { 0xff, _4 | _i64_bit | _16_bit, _rm16  },
 220:         { 0xea, _cd| _i64_bit,           _p1616 },
 221:         { 0xff, _5,                      _m1616 },
 222:         { 0xff, _4 | _i64_bit | _32_bit, _rm32  },
 223:         { 0xff, _4 |            _64_bit, _rm64  },       // TODO REX_W override is implicit
 224:         { 0xea, _cp| _i64_bit,          _p1632  },
 225:         { 0xff, _5,                     _m1632  },
 226:         { ASM_END, 0, 0 }
 227: };
 228: PTRNTAB1 aptb1LGDT[] = /* LGDT */ {
 229:         { 0x0f01,       _2,     _m48 },
 230:         { ASM_END, 0, 0 }
 231: };
 232: PTRNTAB1 aptb1LIDT[] = /* LIDT */ {
 233:         { 0x0f01,       _3,     _m48 },
 234:         { ASM_END, 0, 0 }
 235: };
 236: PTRNTAB1 aptb1LLDT[] = /* LLDT */ {
 237:         { 0x0f00,       _2|_modnot1,    _rm16 },
 238:         { ASM_END, 0, 0 }
 239: };
 240: PTRNTAB1 aptb1LMSW[] = /* LMSW */ {
 241:         { 0x0f01,       _6|_modnot1,    _rm16 },
 242:         { ASM_END, 0, 0 }
 243: };
 244: PTRNTAB1 aptb1LODS[] = /* LODS */ {
 245:         { 0xac, _modax,_m8 },
 246:         { 0xad, _16_bit | _modax,_m16 },
 247:         { 0xad, _32_bit | _I386 | _modax,_m32 },
 248:         { ASM_END, 0, 0 }
 249: };
 250: PTRNTAB1 aptb1LOOP[] = /* LOOP */ {
 251:         { 0xe2, _cb | _modcx,_rel8 },
 252:         { ASM_END, 0, 0 }
 253: };
 254: PTRNTAB1 aptb1LOOPE[] = /* LOOPE/LOOPZ */ {
 255:         { 0xe1, _cb | _modcx,_rel8 },
 256:         { ASM_END, 0, 0 }
 257: };
 258: PTRNTAB1 aptb1LOOPNE[] = /* LOOPNE/LOOPNZ */ {
 259:         { 0xe0, _cb | _modcx,_rel8 },
 260:         { ASM_END, 0, 0 }
 261: };
 262: PTRNTAB1 aptb1LTR[] = /* LTR */ {
 263:         { 0x0f00,       _3|_modnot1,    _rm16 },
 264:         { ASM_END, 0, 0 }
 265: };
 266: PTRNTAB1 aptb1NEG[] = /* NEG */ {
 267:         { 0xf6, _3,     _rm8 },
 268:         { 0xf7, _3 | _16_bit,   _rm16 },
 269:         { 0xf7, _3 | _32_bit,   _rm32 },
 270:         { 0xf7, _3 | _64_bit,   _rm64 },
 271:         { ASM_END, 0, 0 }
 272: };
 273: PTRNTAB1 aptb1NOT[] = /* NOT */ {
 274:         { 0xf6, _2,     _rm8 },
 275:         { 0xf7, _2 | _16_bit,   _rm16 },
 276:         { 0xf7, _2 | _32_bit,   _rm32 },
 277:         { 0xf7, _2 | _64_bit,   _rm64 },
 278:         { ASM_END, 0, 0 }
 279: };
 280: PTRNTAB1 aptb1POP[] = /* POP */ {
 281:         { 0x8f, _0  |            _16_bit, _m16 },
 282:         { 0x8f, _0  | _i64_bit | _32_bit, _m32 },
 283:         { 0x8f, _0  |            _64_bit, _m64 },                 // TODO REX_W override is implicit
 284:         { 0x58, _rw |            _16_bit, _r16 | _plus_r },
 285:         { 0x58, _rd | _i64_bit | _32_bit, _r32 | _plus_r },
 286:         { 0x58, _r  |            _32_bit, _r64 | _plus_r },       // REX_W override is implicit
 287:         { 0x1f,       _i64_bit,            _ds | _seg },
 288:         { 0x07,       _i64_bit | _modes,   _es | _seg },
 289:         { 0x17,       _i64_bit,            _ss | _seg },
 290:         { 0x0fa1,       0,                 _fs | _seg },
 291:         { 0x0fa9,       0,                 _gs | _seg },
 292:         { ASM_END, 0, 0 }
 293: };
 294: PTRNTAB1 aptb1PUSH[] = /* PUSH */ {
 295:         { 0xff, _6 |            _16_bit,  _m16 },
 296:         { 0xff, _6 | _i64_bit | _32_bit,  _m32 },
 297:         { 0xff, _6 |            _64_bit,  _m64 },                // TODO REX_W override is implicit
 298:         { 0x50, _r |            _16_bit, _r16 | _plus_r },
 299:         { 0x50, _r | _i64_bit | _32_bit, _r32 | _plus_r },
 300:         { 0x50, _r |            _32_bit, _r64 | _plus_r },       // REX_W override is implicit
 301:         { 0x6a,       0,_imm8 },
 302:         { 0x68, _16_bit,_imm16 },
 303:         { 0x68, _16_bit,_rel16 },
 304:         { 0x68, _32_bit,_imm32 },
 305:         { 0x68, _32_bit,_rel32 },
 306:         { 0x0e, _i64_bit,_cs | _seg  },
 307:         { 0x16, _i64_bit,_ss | _seg  },
 308:         { 0x1e, _i64_bit,_ds | _seg  },
 309:         { 0x06, _i64_bit,_es | _seg  },
 310:         { 0x0fa0,      0,_fs | _seg},
 311:         { 0x0fa8,      0,_gs | _seg},
 312:         { ASM_END, 0, 0 }
 313: };
 314: PTRNTAB1 aptb1RET[] = /* RET */ {
 315:         { 0xc3, 0,      0 },
 316:         { 0xc2, _iw,    _imm16 },
 317:         { ASM_END, 0, 0 }
 318: };
 319: PTRNTAB1 aptb1RETF[] = /* RETF */ {
 320:         { 0xcb, 0, 0 },
 321:         { 0xca, _iw, _imm16 },
 322:         { ASM_END, 0, 0 }
 323: };
 324: PTRNTAB1 aptb1SCAS[] = /* SCAS */ {
 325:         { 0xae, _moddi, _m8 },
 326:         { 0xaf, _16_bit | _moddi, _m16 },
 327:         { 0xaf, _32_bit | _moddi, _m32 },
 328:         { ASM_END, 0, 0 }
 329: };
 330: 
 331: #define OPTABLE(str,op) \
 332: PTRNTAB1 aptb1##str[] = {       \
 333:         { 0xf90|op, _cb, _rm8 },        \
 334:         { ASM_END, 0, 0 }       \
 335: }
 336: 
 337: OPTABLE(SETO,0);
 338: OPTABLE(SETNO,1);
 339: OPTABLE(SETB,2);
 340: OPTABLE(SETNB,3);
 341: OPTABLE(SETZ,4);
 342: OPTABLE(SETNZ,5);
 343: OPTABLE(SETBE,6);
 344: OPTABLE(SETNBE,7);
 345: OPTABLE(SETS,8);
 346: OPTABLE(SETNS,9);
 347: OPTABLE(SETP,0xA);
 348: OPTABLE(SETNP,0xB);
 349: OPTABLE(SETL,0xC);
 350: OPTABLE(SETNL,0xD);
 351: OPTABLE(SETLE,0xE);
 352: OPTABLE(SETNLE,0xF);
 353: 
 354: #undef OPTABLE
 355: 
 356: PTRNTAB1  aptb1SGDT[]= /* SGDT */ {
 357:         { 0xf01, _0, _m48 },
 358:         { ASM_END, 0, 0 }
 359: };
 360: PTRNTAB1  aptb1SIDT[] = /* SIDT */ {
 361:         { 0xf01, _1, _m48 },
 362:         { ASM_END, 0, 0 }
 363: };
 364: PTRNTAB1  aptb1SLDT[] = /* SLDT */ {
 365:         { 0xf00, _0, _rm16 },
 366:         { ASM_END, 0, 0 }
 367: };
 368: PTRNTAB1  aptb1SMSW[] = /* SMSW */ {
 369:         { 0xf01, _4, _rm16 },
 370:         { 0xf01, _4, _r32 },
 371:         { ASM_END, 0, 0 }
 372: };
 373: PTRNTAB1  aptb1STOS[] = /* STOS */ {
 374:         { 0xaa, _moddi, _m8 },
 375:         { 0xab, _16_bit | _moddi, _m16 },
 376:         { 0xab, _32_bit | _moddi, _m32 },
 377:         { ASM_END, 0, 0 }
 378: };
 379: PTRNTAB1  aptb1STR[] = /* STR */ {
 380:         { 0xf00, _1, _rm16 },
 381:         { ASM_END, 0, 0 }
 382: };
 383: PTRNTAB1  aptb1VERR[] = /* VERR */ {
 384:         { 0xf00, _4|_modnot1, _rm16 },
 385:         { ASM_END, 0, 0 }
 386: };
 387: PTRNTAB1  aptb1VERW[] = /* VERW */ {
 388:         { 0xf00, _5|_modnot1, _rm16 },
 389:         { ASM_END, 0, 0 }
 390: };
 391: PTRNTAB1  aptb1XLAT[] = /* XLAT */ {
 392:         { 0xd7, _modax, 0 },
 393:         { 0xd7, _modax, _m8 },
 394:         { ASM_END, 0, 0 }
 395: };
 396: PTRNTAB1  aptb1CMPXCH8B[] = {
 397:     { 0x0fc7, _1 | _modaxdx | _I386, _m64 },
 398:         { ASM_END, 0, 0 }
 399: };
 400: 
 401: PTRNTAB1  aptb1CMPXCH16B[] = {
 402:     { 0x0fc7, _1 | _modaxdx | _64_bit, _m64 },
 403:         { ASM_END, 0, 0 }
 404: };
 405: 
 406: #define OPTABLE(str,op,rr,m) \
 407: PTRNTAB2  aptb2##str[] = {                                      \
 408:         { op+4,  _ib|m,                _al,        _imm8 },     \
 409:         { 0x83, rr|_ib|_16_bit|m,     _rm16,      _imm8 },      \
 410:         { op+5, _iw|_16_bit|m,        _ax,        _imm16 },     \
 411:         { 0x83, rr|_ib|_32_bit|m,     _rm32,      _imm8 },      \
 412:         { 0x83, rr|_ib|_64_bit|m,     _rm64,      _imm8 },      \
 413:         { op+5, _id|_32_bit|m,        _eax,       _imm32 },     \
 414:         { op+5, _id|_64_bit|m,        _rax,       _imm32 },     \
 415:         { 0x80, rr|_ib|m,             _rm8,       _imm8 },      \
 416:         { 0x81, rr|_iw|_16_bit|m,     _rm16,      _imm16 },     \
 417:         { 0x81, rr|_id|_32_bit|m,     _rm32,      _imm32 },     \
 418:         { 0x81, rr|_id|_64_bit|m,     _rm64,      _imm32 },     \
 419:         { op+0, _r|m,                 _rm8,       _r8 },        \
 420:         { op+1, _r|_16_bit|m,         _rm16,      _r16 },       \
 421:         { op+1, _r|_32_bit|m,         _rm32,      _r32 },       \
 422:         { op+1, _r|_64_bit|m,         _rm64,      _r64 },       \
 423:         { op+2, _r|m,                 _r8,        _rm8 },       \
 424:         { op+3, _r|_16_bit|m,         _r16,       _rm16 },      \
 425:         { op+3, _r|_32_bit|m,         _r32,       _rm32 },      \
 426:         { op+3, _r|_64_bit|m,         _r64,       _rm64 },      \
 427:         { ASM_END, 0, 0, 0 }                                    \
 428: }
 429: 
 430: OPTABLE(ADD,0x00,_0,0);
 431: OPTABLE(OR, 0x08,_1,0);
 432: OPTABLE(ADC,0x10,_2,0);
 433: OPTABLE(SBB,0x18,_3,0);
 434: OPTABLE(AND,0x20,_4,0);
 435: OPTABLE(SUB,0x28,_5,0);
 436: OPTABLE(XOR,0x30,_6,0);
 437: OPTABLE(CMP,0x38,_7,_modnot1);
 438: 
 439: #undef OPTABLE
 440: 
 441: PTRNTAB2  aptb2ARPL[] = /* ARPL */ {
 442:         { 0x63, _r|_i64_bit,               _rm16, _r16 },
 443:         { ASM_END, 0, 0, 0 }
 444: };
 445: PTRNTAB2  aptb2BOUND[] = /* BOUND */ {
 446:         { 0x62, _r|_i64_bit|_16_bit|_modnot1,_r16,_m16 },// Should really b3 _m16_16
 447:         { 0x62, _r|_i64_bit|_32_bit|_modnot1,_r32,_m32 },// Should really be _m32_32
 448:         { ASM_END, 0, 0, 0 }
 449: };
 450: PTRNTAB2  aptb2BSF[] = /* BSF */ {
 451:         { 0x0fbc,       _cw | _16_bit,          _r16,   _rm16 },
 452:         { 0x0fbc,       _cd|_32_bit,            _r32,   _rm32 },
 453:         { 0x0fbc,       _cq|_64_bit,            _r64,   _rm64 },
 454:         { ASM_END, 0, 0, 0 }
 455: };
 456: PTRNTAB2  aptb2BSR[] = /* BSR */ {
 457:         { 0x0fbd,       _cw|_16_bit,            _r16,   _rm16 },
 458:         { 0x0fbd,       _cd|_32_bit,            _r32,   _rm32 },
 459:         { 0x0fbd,       _cq|_64_bit,            _r64,   _rm64 },
 460:         { ASM_END, 0, 0, 0 }
 461: };
 462: PTRNTAB2  aptb2BT[] = /* BT */ {
 463:         { 0x0fa3,       _cw|_16_bit|_modnot1,           _rm16,  _r16 },
 464:         { 0x0fa3,       _cd|_32_bit|_modnot1,           _rm32,  _r32 },
 465:         { 0x0fa3,       _cq|_64_bit|_modnot1,           _rm64,  _r64 },
 466:         { 0x0fba,       _4|_ib|_16_bit|_modnot1,        _rm16,  _imm8 },
 467:         { 0x0fba,       _4|_ib|_32_bit|_modnot1,        _rm32,  _imm8 },
 468:         { 0x0fba,       _4|_ib|_64_bit|_modnot1,        _rm64,  _imm8 },
 469:         { ASM_END, 0, 0, 0 }
 470: };
 471: PTRNTAB2  aptb2BTC[] = /* BTC */ {
 472:         { 0x0fbb,       _cw|_16_bit,            _rm16,  _r16 },
 473:         { 0x0fbb,       _cd|_32_bit,            _rm32,  _r32 },
 474:         { 0x0fbb,       _cq|_64_bit,            _rm64,  _r64 },
 475:         { 0x0fba,       _7|_ib|_16_bit, _rm16,  _imm8 },
 476:         { 0x0fba,       _7|_ib|_32_bit, _rm32,  _imm8 },
 477:         { 0x0fba,       _7|_ib|_64_bit, _rm64,  _imm8 },
 478:         { ASM_END, 0, 0, 0 }
 479: };
 480: PTRNTAB2  aptb2BTR[] = /* BTR */ {
 481:         { 0x0fb3,       _cw|_16_bit,            _rm16,  _r16 },
 482:         { 0x0fb3,       _cd|_32_bit,            _rm32,  _r32 },
 483:         { 0x0fb3,       _cq|_64_bit,            _rm64,  _r64 },
 484:         { 0x0fba,       _6|_ib|_16_bit,         _rm16,  _imm8 },
 485:         { 0x0fba,       _6|_ib|_32_bit,         _rm32,  _imm8 },
 486:         { 0x0fba,       _6|_ib|_64_bit,         _rm64,  _imm8 },
 487:         { ASM_END, 0, 0, 0 }
 488: };
 489: PTRNTAB2  aptb2BTS[] = /* BTS */ {
 490:         { 0x0fab,       _cw|_16_bit,            _rm16,  _r16 },
 491:         { 0x0fab,       _cd|_32_bit,            _rm32,  _r32 },
 492:         { 0x0fab,       _cq|_64_bit,            _rm64,  _r64 },
 493:         { 0x0fba,       _5|_ib|_16_bit,         _rm16,  _imm8 },
 494:         { 0x0fba,       _5|_ib|_32_bit,         _rm32,  _imm8 },
 495:         { 0x0fba,       _5|_ib|_64_bit,         _rm64,  _imm8 },
 496:         { ASM_END, 0, 0, 0 }
 497: };
 498: PTRNTAB2  aptb2CMPS[] = /* CMPS */ {
 499:         { 0xa6, _modsidi,               _m8,    _m8 },
 500:         { 0xa7, _modsidi,       _m16,   _m16 },
 501:         { 0xa7, _modsidi,       _m32,   _m32 },
 502:         { ASM_END, 0, 0, 0 }
 503: };
 504: PTRNTAB2  aptb2CMPXCHG[] = /* CMPXCHG */ {
 505:         { 0xfb0, _I386 | _cb|_mod2,     _rm8,   _r8 },
 506:                                                 // This is really a 486 only
 507:                                                 // instruction
 508:         { 0xfb1, _I386 | _cw | _16_bit|_mod2,   _rm16,  _r16 },
 509:         { 0xfb1, _I386 | _cd | _32_bit|_mod2,   _rm32,  _r32 },
 510:         { 0xfb1, _I386 | _cq | _64_bit|_mod2,   _rm64,  _r64 },
 511:         { ASM_END, 0, 0, 0 }
 512: };
 513: PTRNTAB2  aptb2DIV[] = /* DIV */ {
 514:         { 0xf6, _6,                             _al,            _rm8 },
 515:         { 0xf7, _6 | _16_bit | _moddx,          _ax,            _rm16 },
 516:         { 0xf7, _6 | _32_bit | _moddx,          _eax,           _rm32 },
 517:         { 0xf7, _6 | _64_bit | _moddx,          _rax,           _rm64 },
 518:         { 0xf6, _6 | _modax,                    _rm8,           0 },
 519:         { 0xf7, _6 | _16_bit | _modaxdx,        _rm16,          0 },
 520:         { 0xf7, _6 | _32_bit | _modaxdx,        _rm32,          0 },
 521:         { 0xf7, _6 | _64_bit | _modaxdx,        _rm64,          0 },
 522:         { ASM_END, 0, 0, 0 }
 523: };
 524: PTRNTAB2  aptb2ENTER[] = /* ENTER */ {
 525:         { 0xc8, _iw|_ib,        _imm16, _imm8 },
 526:         { ASM_END, 0, 0, 0 }
 527: };
 528: PTRNTAB2  aptb2IDIV[] = /* IDIV */ {
 529:         { 0xf6, _7,                     _al,            _rm8 },
 530:         { 0xf7, _7|_16_bit|_moddx,      _ax,            _rm16 },
 531:         { 0xf7, _7|_32_bit|_moddx,      _eax,           _rm32 },
 532:         { 0xf7, _7|_64_bit|_moddx,      _rax,           _rm64 },
 533:         { 0xf6, _7 | _modax,            _rm8,           0 },
 534:         { 0xf7, _7|_16_bit|_modaxdx,    _rm16,          0 },
 535:         { 0xf7, _7|_32_bit|_modaxdx,    _rm32,          0 },
 536:         { 0xf7, _7|_64_bit|_modaxdx,    _rm64,          0 },
 537:         { ASM_END, 0, 0, 0 }
 538: };
 539: PTRNTAB2  aptb2IN[] = /* IN */ {
 540:         { 0xe4, _ib,        _al,                _imm8 },
 541:         { 0xe5, _ib|_16_bit,_ax,                _imm8 },
 542:         { 0xe5, _ib|_32_bit,_eax,       _imm8 },
 543:         { 0xec, 0,          _al,                _dx },
 544:         { 0xed, _16_bit,    _ax,                _dx },
 545:         { 0xed, _32_bit,    _eax,       _dx },
 546:         { ASM_END, 0, 0, 0 }
 547: };
 548: PTRNTAB2  aptb2INS[] = /* INS */ {
 549:         { 0x6c, _modsi, _rm8, _dx },
 550:         { 0x6d, _modsi|_16_bit, _rm16, _dx },
 551:         { 0x6d, _32_bit|_modsi, _rm32, _dx },
 552:         { ASM_END, 0, 0, 0 }
 553: };
 554: 
 555: PTRNTAB2  aptb2LAR[] = /* LAR */ {
 556:         { 0x0f02,       _r|_16_bit,                     _r16,   _rm16 },
 557:         { 0x0f02,       _r|_32_bit,                     _r32,   _rm32 },
 558:         { ASM_END, 0, 0, 0 }
 559: };
 560: PTRNTAB2  aptb2LDS[] = /* LDS */ {
 561:         { 0xc5, _r|_i64_bit|_16_bit,                    _r16,   _m32 },
 562:         { 0xc5, _r|_i64_bit|_32_bit,                    _r32,   _m48 },
 563:         { ASM_END, 0, 0, 0 }
 564: };
 565: 
 566: PTRNTAB2  aptb2LEA[] = /* LEA */ {
 567:         { 0x8d, _r|_16_bit,             _r16,   _m8 | _m16 | _m32 | _m48 },
 568:         { 0x8d, _r|_32_bit,             _r32,   _m8 | _m16 | _m32 | _m48 },
 569:         { 0x8d, _r|_64_bit,             _r64,   _m8 | _m16 | _m32 | _m48 | _m64 },
 570:         { 0x8d, _r|_16_bit,             _r16,   _rel16 },
 571:         { 0x8d, _r|_32_bit,             _r32,   _rel32 },
 572:         { 0x8d, _r|_64_bit,             _r64,   _rel32 },
 573:         { ASM_END, 0, 0, 0 }
 574: };
 575: PTRNTAB2  aptb2LES[] = /* LES */ {
 576:         { 0xc4, _r|_i64_bit|_16_bit|_modes,             _r16,   _m32 },
 577:         { 0xc4, _r|_i64_bit|_32_bit|_modes,             _r32,   _m48 },
 578:         { ASM_END, 0, 0, 0 }
 579: };
 580: PTRNTAB2  aptb2LFS[] = /* LFS */ {
 581:         { 0x0fb4,       _r|_16_bit,                     _r16,   _m32 },
 582:         { 0x0fb4,       _r|_32_bit,                     _r32,   _m48 },
 583:         { ASM_END, 0, 0, 0 }
 584: };
 585: PTRNTAB2  aptb2LGS[] = /* LGS */ {
 586:         { 0x0fb5,       _r|_16_bit,                     _r16,   _m32  },
 587:         { 0x0fb5,       _r|_32_bit,                     _r32,   _m48 },
 588:         { ASM_END, 0, 0, 0 }
 589: };
 590: PTRNTAB2  aptb2LSS[] = /* LSS */ {
 591:         { 0x0fb2,       _r|_16_bit,                     _r16,   _m32 },
 592:         { 0x0fb2,       _r|_32_bit,                     _r32,   _m48 },
 593:         { ASM_END, 0, 0, 0 }
 594: };
 595: PTRNTAB2  aptb2LSL[] = /* LSL */ {
 596:         { 0x0f03,       _r|_16_bit,                     _r16,   _rm16 },
 597:         { 0x0f03,       _r|_32_bit,                     _r32,   _rm32 },
 598:         { ASM_END, 0, 0, 0 }
 599: };
 600: 
 601: PTRNTAB2 aptb2MOV[] = /* MOV */ {
 602: #if 0 // Let pinholeopt() do this
 603:         { 0xa0, 0,              _al,            _moffs8         },
 604:         { 0xa1, _16_bit,        _ax,            _moffs16        },
 605:         { 0xa1, _32_bit,        _eax,           _moffs32        },
 606:         { 0xa2, 0,              _moffs8,        _al             },
 607:         { 0xa3, _16_bit,        _moffs16,       _ax             },
 608:         { 0xa3, _32_bit,        _moffs32,       _eax            },
 609: #endif
 610:         { 0x88, _r,             _rm8,           _r8             },
 611:         { 0x89, _r|_16_bit,     _rm16,          _r16            },
 612:         { 0x89, _r|_32_bit,     _rm32,          _r32            },
 613:         { 0x89, _r|_64_bit,     _rm64,          _r64            },
 614:         { 0x8a, _r,             _r8,            _rm8            },
 615:         { 0x8b, _r|_16_bit,     _r16,           _rm16           },
 616:         { 0x8b, _r|_32_bit,     _r32,           _rm32           },
 617:         { 0x8b, _r|_64_bit,     _r64,           _rm64           },
 618:         { 0x8c, _r,             _rm16,          _seg|_ds|_es| _ss | _fs | _gs | _cs },
 619:         { 0x8e, _r,             _seg|_ds|_es|_ss|_fs|_gs|_cs,   _rm16 },
 620:         { 0xb0, _rb,            _r8 | _plus_r,  _imm8           },
 621:         { 0xb8, _rw | _16_bit,  _r16 | _plus_r, _imm16          },
 622:         { 0xb8, _rd|_32_bit,    _r32 | _plus_r, _imm32          },
 623:         { 0xb8, _rd|_64_bit,    _r64 | _plus_r, _imm64          },
 624:         { 0xc6, _cb,            _rm8,           _imm8           },
 625:         { 0xc7, _cw|_16_bit,    _rm16,          _imm16          },
 626:         { 0xc7, _cd|_32_bit,    _rm32,          _imm32          },
 627: #if 0 // Let pinholeopt() do this
 628:         { 0xc6, _cb,            _moffs8,        _imm8           },
 629:         { 0xc7, _cw|_16_bit,    _moffs16,       _imm16          },
 630:         { 0xc7, _cd|_32_bit,    _moffs32,       _imm32          },
 631: #endif
 632:         { 0x0f20,       _r,     _r32,           _special | _crn },
 633:         { 0x0f22,       _r,     _special|_crn,  _r32            },
 634:         { 0x0f21,       _r,     _r32,           _special | _drn },
 635:         { 0x0f23,       _r,     _special|_drn,  _r32            },
 636:         { 0x0f24,       _r,     _r32,           _special | _trn },
 637:         { 0x0f26,       _r,     _special|_trn,  _r32            },
 638:         { ASM_END, 0, 0, 0 }
 639: };
 640: 
 641: PTRNTAB2  aptb2MOVS[] = {
 642:         { 0xa4, _modsidi ,              _m8,    _m8 },
 643:         { 0xa5, _modsidi | _16_bit,     _m16,   _m16 },
 644:         { 0xa5, _modsidi | _32_bit,     _m32,   _m32 },
 645:         { ASM_END, 0, 0, 0 }
 646: };
 647: PTRNTAB2  aptb2MOVSX[] = {
 648:         { 0x0fbe,       _r|_16_bit,                     _r16,   _rm8 },
 649:         { 0x0fbe,       _r|_32_bit,                     _r32,   _rm8 },
 650: #if 1
 651:         { 0x0fbf,       _r|_16_bit,             _r16,   _rm16 },
 652:         { 0x0fbf,       _r|_32_bit,             _r32,   _rm16 },
 653: #else
 654:         { 0x0fbf,       _r,                     _r32,   _rm16 },
 655: #endif
 656:         { ASM_END, 0, 0, 0 }
 657: };
 658: PTRNTAB2  aptb2MOVZX[] = /* MOVZX */ {
 659:         { 0x0fb6,       _r|_16_bit,                     _r16,   _rm8 },
 660:         { 0x0fb6,       _r|_32_bit,                     _r32,   _rm8 },
 661: #if 1
 662:         { 0x0fb7,       _r|_16_bit,             _r16,   _rm16 },
 663:         { 0x0fb7,       _r|_32_bit,             _r32,   _rm16 },
 664: #else
 665:         { 0x0fb7,       _r,                     _r32,   _rm16 },
 666: #endif
 667:         { ASM_END, 0, 0, 0 }
 668: };
 669: PTRNTAB2  aptb2MUL[] = /* MUL */ {
 670:         { 0xf6, _4,                     _al,    _rm8 },
 671:         { 0xf7, _4|_16_bit|_moddx,      _ax,    _rm16 },
 672:         { 0xf7, _4|_32_bit|_moddx,      _eax,   _rm32 },
 673:         { 0xf7, _4|_64_bit|_moddx,      _rax,   _rm64 },
 674:         { 0xf6, _4|_modax,              _rm8,   0 },
 675:         { 0xf7, _4|_16_bit|_modaxdx,    _rm16,  0 },
 676:         { 0xf7, _4|_32_bit|_modaxdx,    _rm32,  0 },
 677:         { 0xf7, _4|_64_bit|_modaxdx,    _rm64,  0 },
 678:         { ASM_END, 0, 0, 0 }
 679: };
 680: PTRNTAB2  aptb2OUT[] = {
 681:         { 0xe6, _ib,            _imm8,  _al },
 682:         { 0xe7, _ib|_16_bit,            _imm8,  _ax },
 683:         { 0xe7, _ib|_32_bit,            _imm8,  _eax },
 684:         { 0xee, _modnot1,               _dx,            _al },
 685:         { 0xef, _16_bit|_modnot1,               _dx,            _ax },
 686:         { 0xef, _32_bit|_modnot1,               _dx,            _eax },
 687:         { ASM_END, 0, 0, 0 }
 688: };
 689: PTRNTAB2  aptb2OUTS[] = /* OUTS */ {
 690:         { 0x6e, _modsinot1,             _dx,            _rm8 },
 691:         { 0x6f, _16_bit | _I386 |_modsinot1,    _dx,            _rm16 },
 692:         { 0x6f, _32_bit | _I386| _modsinot1,    _dx,            _rm32 },
 693:         { ASM_END, 0, 0, 0 }
 694: };
 695: 
 696: #define OPTABLE(str,op) \
 697: PTRNTAB2  aptb2##str[] = {      \
 698:         { 0xd2, op,             _rm8,   _cl },  \
 699:         { 0xc0, op|_ib,         _rm8,   _imm8 },        \
 700:         { 0xd3, op|_16_bit,     _rm16,  _cl },  \
 701:         { 0xc1, op|_ib|_16_bit, _rm16,  _imm8 },        \
 702:         { 0xd3, op|_32_bit,     _rm32,  _cl },  \
 703:         { 0xc1, op|_ib|_32_bit, _rm32,  _imm8, },       \
 704:         { 0xd3, op|_64_bit,     _rm64,  _cl },  \
 705:         { 0xc1, op|_ib|_64_bit, _rm64,  _imm8, },       \
 706:         { ASM_END, 0, 0, 0 }    \
 707: }
 708: 
 709: OPTABLE(ROL,_0);
 710: OPTABLE(ROR,_1);
 711: OPTABLE(RCL,_2);
 712: OPTABLE(RCR,_3);
 713: OPTABLE(SHL,_4);
 714: OPTABLE(SHR,_5);
 715: OPTABLE(SAR,_7);
 716: 
 717: #undef OPTABLE
 718: 
 719: PTRNTAB2  aptb2TEST[] = /* TEST */ {
 720:         { 0xa8, _ib|_modnot1,           _al,    _imm8 },
 721:         { 0xa9, _iw|_16_bit|_modnot1,   _ax,    _imm16 },
 722:         { 0xa9, _id|_32_bit|_modnot1,   _eax,   _imm32 },
 723:         { 0xa9, _id|_64_bit|_modnot1,   _rax,   _imm32 },
 724:         { 0xf6, _0|_modnot1,            _rm8,   _imm8 },
 725:         { 0xf7, _0|_16_bit|_modnot1,    _rm16,  _imm16 },
 726:         { 0xf7, _0|_32_bit|_modnot1,    _rm32,  _imm32 },
 727:         { 0xf7, _0|_64_bit|_modnot1,    _rm64,  _imm32 },
 728:         { 0x84, _r|_modnot1,            _rm8,   _r8 },
 729:         { 0x85, _r|_16_bit|_modnot1,    _rm16,  _r16 },
 730:         { 0x85, _r|_32_bit|_modnot1,    _rm32,  _r32 },
 731:         { 0x85, _r|_64_bit|_modnot1,    _rm64,  _r64 },
 732:         { ASM_END, 0, 0, 0 }
 733: };
 734: PTRNTAB2  aptb2XADD[] = /* XADD */ {                    // 486 only instruction
 735: //      { 0x0fc0,       _ib | _I386|_mod2, _rm8, _r8 },
 736: //      { 0x0fc1,       _iw | _I386|_16_bit|_mod2, _rm16, _r16 },
 737: //      { 0x0fc1,       _id | _I386|_32_bit|_mod2, _rm32, _r32 },
 738:         { 0x0fc0,       _r | _I386|_mod2, _rm8, _r8 },
 739:         { 0x0fc1,       _r | _I386|_16_bit|_mod2, _rm16, _r16 },
 740:         { 0x0fc1,       _r | _I386|_32_bit|_mod2, _rm32, _r32 },
 741:         { ASM_END, 0, 0, 0 }
 742: };
 743: PTRNTAB2  aptb2XCHG[] = /* XCHG */ {
 744:         { 0x90, _r|_16_bit|_mod2,       _ax ,   _r16 | _plus_r },
 745:         { 0x90, _r|_16_bit|_mod2,       _r16 | _plus_r, _ax  },
 746:         { 0x90, _r|_32_bit|_mod2,       _eax,   _r32 | _plus_r },
 747:         { 0x90, _r|_32_bit|_mod2,       _r32 | _plus_r, _eax },
 748:         { 0x86, _r|_mod2,               _rm8,   _r8 },
 749:         { 0x86, _r|_mod2,               _r8,    _rm8 },
 750:         { 0x87, _r|_16_bit|_mod2,               _rm16,  _r16 },
 751:         { 0x87, _r|_16_bit|_mod2,               _r16, _rm16 },
 752:         { 0x87, _r|_32_bit|_mod2,               _rm32,  _r32 },
 753:         { 0x87, _r|_32_bit|_mod2,               _r32, _rm32 },
 754:         { 0x87, _r|_64_bit|_mod2,               _rm64,  _r64 },
 755:         { 0x87, _r|_64_bit|_mod2,               _r64, _rm64 },
 756:         { ASM_END, 0, 0, 0 }
 757: };
 758: 
 759: #define OPTABLE(str,op) \
 760: PTRNTAB2  aptb2##str[] = {      \
 761:         { 0x0F40|op, _r|_16_bit,   _r16,   _rm16 },     \
 762:         { 0x0F40|op, _r|_32_bit,   _r32,   _rm32 },     \
 763:         { 0x0F40|op, _r|_64_bit,   _r64,   _rm64 },     \
 764:         { ASM_END, 0, 0, 0 }    \
 765: }
 766: 
 767: OPTABLE(CMOVO,0);
 768: OPTABLE(CMOVNO,1);
 769: OPTABLE(CMOVB,2);
 770: OPTABLE(CMOVNB,3);
 771: OPTABLE(CMOVZ,4);
 772: OPTABLE(CMOVNZ,5);
 773: OPTABLE(CMOVBE,6);
 774: OPTABLE(CMOVNBE,7);
 775: OPTABLE(CMOVS,8);
 776: OPTABLE(CMOVNS,9);
 777: OPTABLE(CMOVP,0xA);
 778: OPTABLE(CMOVNP,0xB);
 779: OPTABLE(CMOVL,0xC);
 780: OPTABLE(CMOVNL,0xD);
 781: OPTABLE(CMOVLE,0xE);
 782: OPTABLE(CMOVNLE,0xF);
 783: 
 784: #undef OPTABLE
 785: 
 786: PTRNTAB3  aptb3IMUL[] = /* IMUL */ {
 787:         { 0x0faf,       _r|_16_bit,             _r16,   _rm16, 0 },
 788:         { 0x0faf,       _r|_32_bit,             _r32,   _rm32, 0 },
 789:         { 0x0faf,       _r|_64_bit,             _r64,   _rm64, 0 },
 790:         { 0xf6, _5|_modax,                      _rm8,   0, 0 },
 791:         { 0xf7, _5|_16_bit|_modaxdx,            _rm16,  0, 0 },
 792:         { 0xf7, _5|_32_bit|_modaxdx,            _rm32,  0, 0 },
 793:         { 0xf7, _5|_64_bit|_modaxdx,            _rm64,  0, 0 },
 794:         { 0x6b, _r|_ib|_16_bit,         _r16,   _imm8, 0 },
 795:         { 0x6b, _r|_ib|_32_bit,         _r32,   _imm8, 0 },
 796:         { 0x69, _r|_iw|_16_bit,         _r16,   _imm16, 0 },
 797:         { 0x69, _r|_id|_32_bit,         _r32,   _imm32, 0 },
 798:         { 0x69, _r|_id|_64_bit,         _r64,   _imm32, 0 },
 799:         { 0x6b, _r|_ib|_16_bit,         _r16,   _rm16,  _imm8 },
 800:         { 0x6b, _r|_ib|_32_bit,         _r32,   _rm32,  _imm8 },
 801:         { 0x6b, _r|_ib|_64_bit,         _r64,   _rm64,  _imm8 },
 802:         { 0x69, _r|_iw|_16_bit,         _r16,   _rm16,  _imm16 },
 803:         { 0x69, _r|_id|_32_bit,         _r32,   _rm32,  _imm32 },
 804:         { 0x69, _r|_id|_64_bit,         _r64,   _rm64,  _imm32 },
 805:         { ASM_END, 0, 0, 0 }
 806: };
 807: PTRNTAB3  aptb3SHLD[] = /* SHLD */ {
 808:         { 0x0fa4,       _cw|_16_bit, _rm16, _r16, _imm8 },
 809:         { 0x0fa4,       _cd|_32_bit, _rm32, _r32, _imm8 },
 810:         { 0x0fa4,       _cq|_64_bit, _rm64, _r64, _imm8 },
 811:         { 0x0fa5,       _cw|_16_bit, _rm16, _r16, _cl },
 812:         { 0x0fa5,       _cd|_32_bit, _rm32, _r32, _cl },
 813:         { 0x0fa5,       _cq|_64_bit, _rm64, _r64, _cl },
 814:         { ASM_END, 0, 0, 0 }
 815: };
 816: PTRNTAB3  aptb3SHRD[] = /* SHRD */ {
 817:         { 0x0fac,       _cw|_16_bit, _rm16, _r16, _imm8 },
 818:         { 0x0fac,       _cd|_32_bit, _rm32, _r32, _imm8 },
 819:         { 0x0fac,       _cq|_64_bit, _rm64, _r64, _imm8 },
 820:         { 0x0fad,       _cw|_16_bit, _rm16, _r16, _cl },
 821:         { 0x0fad,       _cd|_32_bit, _rm32, _r32, _cl },
 822:         { 0x0fad,       _cq|_64_bit, _rm64, _r64, _cl },
 823:         { ASM_END, 0, 0, 0 }
 824: };
 825: //
 826: // Floating point instructions which have entirely different flag
 827: // interpretations
 828: //
 829: 
 830: OPTABLE0(F2XM1,    0xd9f0,0);
 831: OPTABLE0(FABS,     0xd9e1,0);
 832: OPTABLE0(FCHS,     0xd9e0,0);
 833: OPTABLE0(FCLEX,    0xdbe2,_fwait);
 834: OPTABLE0(FNCLEX,   0xdbe2, _nfwait);
 835: OPTABLE0(FCOMPP,   0xded9, 0);
 836: OPTABLE0(FCOS,     0xd9ff, 0);
 837: OPTABLE0(FUCOMPP,  0xdae9, 0);
 838: OPTABLE0(FDECSTP,  0xd9f6, 0);
 839: OPTABLE0(FINCSTP,  0xd9f7, 0);
 840: OPTABLE0(FINIT,    0xdbe3, _fwait);
 841: OPTABLE0(FNINIT,   0xdbe3, _nfwait);
 842: OPTABLE0(FENI,     0xdbe0, _fwait);
 843: OPTABLE0(FNENI,    0xdbe0, _nfwait);
 844: OPTABLE0(FDISI,    0xdbe1, _fwait);
 845: OPTABLE0(FNDISI,   0xdbe1, _nfwait);
 846: OPTABLE0(FLD1,     0xd9e8, 0);
 847: OPTABLE0(FLDL2T,   0xd9e9, 0);
 848: OPTABLE0(FLDL2E,   0xd9ea, 0);
 849: OPTABLE0(FLDPI,    0xd9eb, 0);
 850: OPTABLE0(FLDLG2,   0xd9ec, 0);
 851: OPTABLE0(FLDLN2,   0xd9ed, 0);
 852: OPTABLE0(FLDZ,     0xd9ee, 0);
 853: OPTABLE0(FNOP,     0xd9d0, 0);
 854: OPTABLE0(FPATAN,   0xd9f3, 0);
 855: OPTABLE0(FPREM,    0xd9f8, 0);
 856: OPTABLE0(FPREM1,   0xd9f5, 0);
 857: OPTABLE0(FPTAN,    0xd9f2, 0);
 858: OPTABLE0(FRNDINT,  0xd9fc, 0);
 859: OPTABLE0(FSCALE,   0xd9fd, 0);
 860: OPTABLE0(FSETPM,   0xdbe4, 0);
 861: OPTABLE0(FSIN,     0xd9fe, 0);
 862: OPTABLE0(FSINCOS,  0xd9fb, 0);
 863: OPTABLE0(FSQRT,    0xd9fa, 0);
 864: OPTABLE0(FTST,     0xd9e4, 0);
 865: OPTABLE0(FWAIT,    0x9b, 0);
 866: OPTABLE0(FXAM,     0xd9e5, 0);
 867: OPTABLE0(FXTRACT,  0xd9f4, 0);
 868: OPTABLE0(FYL2X,    0xd9f1, 0);
 869: OPTABLE0(FYL2XP1,  0xd9f9, 0);
 870: //
 871: // Floating point instructions which have entirely different flag
 872: // interpretations but they overlap, only asm_determine_operator
 873: // flags needs to know the difference
 874: //      1 operand floating point instructions follow
 875: //
 876: PTRNTAB1  aptb1FBLD[] = /* FBLD */ {
 877:         { 0xdf, _4, _fm80 },
 878:         { ASM_END, 0, 0 }
 879: };
 880: 
 881: PTRNTAB1  aptb1FBSTP[] = /* FBSTP */ {
 882:         { 0xdf, _6, _fm80 },
 883:         { ASM_END, 0, 0 }
 884: };
 885: PTRNTAB2  aptb2FCMOVB[] = /* FCMOVB */ {
 886:         { 0xdac0, 0, _st, _sti | _plus_r },
 887:         { 0xdac1, 0, 0 },
 888:         { ASM_END, 0, 0 }
 889: };
 890: PTRNTAB2  aptb2FCMOVE[] = /* FCMOVE */ {
 891:         { 0xdac8, 0, _st, _sti | _plus_r },
 892:         { 0xdac9, 0, 0 },
 893:         { ASM_END, 0, 0 }
 894: };
 895: PTRNTAB2  aptb2FCMOVBE[] = /* FCMOVBE */ {
 896:         { 0xdad0, 0, _st, _sti | _plus_r },
 897:         { 0xdad1, 0, 0 },
 898:         { ASM_END, 0, 0 }
 899: };
 900: PTRNTAB2  aptb2FCMOVU[] = /* FCMOVU */ {
 901:         { 0xdad8, 0, _st, _sti | _plus_r },
 902:         { 0xdad9, 0, 0 },
 903:         { ASM_END, 0, 0 }
 904: };
 905: PTRNTAB2  aptb2FCMOVNB[] = /* FCMOVNB */ {
 906:         { 0xdbc0, 0, _st, _sti | _plus_r },
 907:         { 0xdbc1, 0, 0 },
 908:         { ASM_END, 0, 0 }
 909: };
 910: PTRNTAB2  aptb2FCMOVNE[] = /* FCMOVNE */ {
 911:         { 0xdbc8, 0, _st, _sti | _plus_r },
 912:         { 0xdbc9, 0, 0 },
 913:         { ASM_END, 0, 0 }
 914: };
 915: PTRNTAB2  aptb2FCMOVNBE[] = /* FCMOVNBE */ {
 916:         { 0xdbd0, 0, _st, _sti | _plus_r },
 917:         { 0xdbd1, 0, 0 },
 918:         { ASM_END, 0, 0 }
 919: };
 920: PTRNTAB2  aptb2FCMOVNU[] = /* FCMOVNU */ {
 921:         { 0xdbd8, 0, _st, _sti | _plus_r },
 922:         { 0xdbd9, 0, 0 },
 923:         { ASM_END, 0, 0 }
 924: };
 925: PTRNTAB1  aptb1FCOM[] = /* FCOM */ {
 926:         { 0xd8, _2, _m32 },
 927:         { 0xdc, _2, _fm64 },
 928:         { 0xd8d0, 0, _sti | _plus_r },
 929:         { 0xd8d1, 0, 0 },
 930:         { ASM_END, 0, 0 }
 931: };
 932: 
 933: PTRNTAB2  aptb2FCOMI[] = /* FCOMI */ {
 934:         { 0xdbf0, 0, _st, _sti | _plus_r },
 935:         { 0xdbf0, 0, _sti | _plus_r, 0 },
 936:         { 0xdbf1, 0, 0, 0 },
 937:         { ASM_END, 0, 0, 0 }
 938: };
 939: PTRNTAB2  aptb2FCOMIP[] = /* FCOMIP */ {
 940:         { 0xdff0, 0, _st, _sti | _plus_r },
 941:         { 0xdff0, 0, _sti | _plus_r, 0 },
 942:         { 0xdff1, 0, 0, 0 },
 943:         { ASM_END, 0, 0, 0 }
 944: };
 945: PTRNTAB2  aptb2FUCOMI[] = /* FUCOMI */ {
 946:         { 0xdbe8, 0, _st, _sti | _plus_r },
 947:         { 0xdbe8, 0, _sti | _plus_r, 0 },
 948:         { 0xdbe9, 0, 0, 0 },
 949:         { ASM_END, 0, 0, 0 }
 950: };
 951: PTRNTAB2  aptb2FUCOMIP[] = /* FUCOMIP */ {
 952:         { 0xdfe8, 0, _st, _sti | _plus_r },
 953:         { 0xdfe8, 0, _sti | _plus_r, 0 },
 954:         { 0xdfe9, 0, 0, 0 },
 955:         { ASM_END, 0, 0, 0 }
 956: };
 957: 
 958: PTRNTAB1  aptb1FCOMP[] = /* FCOMP */ {
 959:         { 0xd8, _3, _m32 },
 960:         { 0xdc, _3, _fm64 },
 961:         { 0xd8d8, 0, _sti | _plus_r },
 962:         { 0xd8d9, 0, 0 },
 963:         { ASM_END, 0, 0 }
 964: };
 965: PTRNTAB1  aptb1FFREE[] = /* FFREE */ {
 966:         { 0xddc0,       0,      _sti | _plus_r },
 967:         { ASM_END, 0, 0 }
 968: };
 969: PTRNTAB1  aptb1FICOM[] = /* FICOM */ {
 970:         { 0xde, _2, _m16 },
 971:         { 0xda, _2, _m32 },
 972:         { ASM_END, 0, 0 }
 973: };
 974: PTRNTAB1  aptb1FICOMP[] = /* FICOMP */ {
 975:         { 0xde, _3, _m16 },
 976:         { 0xda, _3, _m32 },
 977:         { ASM_END, 0, 0 }
 978: };
 979: PTRNTAB1  aptb1FILD[] = /* FILD */ {
 980:         { 0xdf, _0, _m16 },
 981:         { 0xdb, _0, _m32 },
 982:         { 0xdf, _5, _fm64 },
 983:         { ASM_END, 0, 0 }
 984: };
 985: PTRNTAB1  aptb1FIST[] = /* FIST */      {
 986:         { 0xdf, _2, _m16 },
 987:         { 0xdb, _2, _m32 },
 988:         { ASM_END, 0, 0 }
 989: };
 990: PTRNTAB1  aptb1FISTP[] = /* FISTP */ {
 991:         { 0xdf, _3, _m16 },
 992:         { 0xdb, _3, _m32 },
 993:         { 0xdf, _7, _fm64 },
 994:         { ASM_END, 0, 0 }
 995: };
 996: PTRNTAB1  aptb1FISTTP[] = /* FISTTP (Pentium 4, Prescott) */ {
 997:         { 0xdf, _1, _m16 },
 998:         { 0xdb, _1, _m32 },
 999:         { 0xdd, _1, _fm64 },
1000:         { ASM_END, 0, 0 }
1001: };
1002: PTRNTAB1  aptb1FLD[] = /* FLD */ {
1003:         { 0xd9, _0, _m32 },
1004:         { 0xdd, _0, _fm64 },
1005:         { 0xdb, _5, _fm80 },
1006:         { 0xd9c0, 0, _sti | _plus_r },
1007:         { ASM_END, 0, 0 }
1008: };
1009: PTRNTAB1  aptb1FLDCW[] = /* FLDCW */ {
1010:         { 0xd9, _5, _m16 },
1011:         { ASM_END, 0, 0 }
1012: };
1013: PTRNTAB1  aptb1FLDENV[] = /* FLDENV */ {
1014:         { 0xd9, _4, _m112 | _m224 },
1015:         { ASM_END, 0, 0 }
1016: };
1017: PTRNTAB1  aptb1FRSTOR[] = /* FRSTOR */ {
1018:         { 0xdd, _4, _m112 | _m224 },
1019:         { ASM_END, 0, 0 }
1020: };
1021: PTRNTAB1  aptb1FSAVE[] = /* FSAVE */ {
1022:         { 0xdd, _6 | _fwait, _m112 | _m224 },
1023:         { ASM_END, 0, 0 }
1024: };
1025: PTRNTAB1  aptb1FNSAVE[] = /* FNSAVE */ {
1026:         { 0xdd, _6 | _nfwait, _m112 | _m224 },
1027:         { ASM_END, 0, 0 }
1028: };
1029: PTRNTAB1  aptb1FST[] = /* FST */ {
1030:         { 0xd9, _2, _m32 },
1031:         { 0xdd, _2, _fm64 },
1032:         { 0xddd0, 0, _sti | _plus_r },
1033:         { ASM_END, 0, 0 }
1034: };
1035: 
1036: PTRNTAB1  aptb1FSTP[] = /* FSTP */ {
1037:         { 0xd9, _3, _m32 },
1038:         { 0xdd, _3, _fm64 },
1039:         { 0xdb, _7, _fm80 },
1040:         { 0xddd8, 0, _sti | _plus_r },
1041:         { ASM_END, 0, 0 }
1042: };
1043: PTRNTAB1  aptb1FSTCW[] = /* FSTCW */ {
1044:         { 0xd9, _7 | _fwait , _m16 },
1045:         { ASM_END, 0, 0 }
1046: };
1047: PTRNTAB1  aptb1FNSTCW[] = /* FNSTCW */ {
1048:         { 0xd9, _7 | _nfwait , _m16 },
1049:         { ASM_END, 0, 0 }
1050: };
1051: PTRNTAB1  aptb1FSTENV[] = /* FSTENV */ {
1052:         { 0xd9, _6 | _fwait, _m112 | _m224 },
1053:         { ASM_END, 0, 0 }
1054: };
1055: PTRNTAB1  aptb1FNSTENV[] = /* FNSTENV */ {
1056:         { 0xd9, _6 | _nfwait, _m112 | _m224 },
1057:         { ASM_END, 0, 0 }
1058: };
1059: PTRNTAB1  aptb1FSTSW[] = /* FSTSW */ {
1060:         { 0xdd, _7 | _fwait, _m16 },
1061:         { 0xdfe0, _fwait | _modax, _ax },
1062:         { ASM_END, 0, 0 }
1063: };
1064: PTRNTAB1  aptb1FNSTSW[] = /* FNSTSW */ {
1065:         { 0xdd, _7 | _nfwait, _m16 },
1066:         { 0xdfe0, _nfwait | _modax, _ax },
1067:         { ASM_END, 0, 0 }
1068: };
1069: PTRNTAB1  aptb1FUCOM[] = /* FUCOM */ {
1070:         { 0xdde0, 0, _sti | _plus_r },
1071:         { 0xdde1, 0, 0 },
1072:         { ASM_END, 0, 0 }
1073: };
1074: PTRNTAB1  aptb1FUCOMP[] = /* FUCOMP */ {
1075:         { 0xdde8, 0, _sti | _plus_r },
1076:         { 0xdde9, 0, 0 },
1077:         { ASM_END, 0, 0 }
1078: };
1079: PTRNTAB1  aptb1FXCH[] = /* FXCH */ {
1080:         { 0xd9c8, 0, _sti | _plus_r },
1081:         { 0xd9c9, 0, 0 },
1082:         { ASM_END, 0, 0 }
1083: };
1084: //
1085: // Floating point instructions which have entirely different flag
1086: // interpretations but they overlap, only asm_determine_operator
1087: // flags needs to know the difference
1088: //      2 operand floating point instructions follow
1089: //
1090: PTRNTAB2  aptb2FADD[] = /* FADD */ {
1091:         { 0xd8, _0, _m32, 0 },
1092:         { 0xdc, _0, _fm64, 0 },
1093:         { 0xd8c0, 0, _st, _sti | _plus_r },
1094:         { 0xdcc0, 0, _sti | _plus_r, _st },
1095:         { 0xdec1, 0, 0, 0 },
1096:         { ASM_END, 0, 0, 0 }
1097: };
1098: 
1099: PTRNTAB2  aptb2FADDP[] = /* FADDP */ {
1100:         { 0xdec0, 0, _sti | _plus_r, _st },
1101:         { 0xdec1, 0, 0, 0 },
1102:         { ASM_END, 0, 0, 0 }
1103: };
1104: PTRNTAB2  aptb2FIADD[] = /* FIADD */ {
1105:         { 0xda, _0, _m32, 0 },
1106:         { 0xde, _0, _m16, 0 },
1107:         { ASM_END, 0, 0, 0 }
1108: };
1109: PTRNTAB2  aptb2FDIV[] = /* FDIV */ {
1110:         { 0xd8, _6, _m32, 0 },
1111:         { 0xdc, _6, _fm64, 0 },
1112:         { 0xd8f0, 0, _st, _sti | _plus_r },
1113:         { 0xdcf8, 0, _sti | _plus_r, _st },
1114:         { 0xdef9, 0, 0, 0 },
1115:         { ASM_END, 0, 0, 0 }
1116: };
1117: PTRNTAB2  aptb2FDIVP[] = /* FDIVP */ {
1118:         { 0xdef9, 0, 0, 0 },
1119:         { 0xdef8, 0, _sti | _plus_r, _st },
1120:         { ASM_END, 0, 0, 0 }
1121: };
1122: PTRNTAB2  aptb2FIDIV[] = /* FIDIV */ {
1123:         { 0xda, _6,  _m32, 0 },
1124:         { 0xde, _6,  _m16, 0 },
1125:         { ASM_END, 0, 0, 0 }
1126: };
1127: PTRNTAB2  aptb2FDIVR[] = /* FDIVR */ {
1128:         { 0xd8, _7, _m32, 0 },
1129:         { 0xdc, _7, _fm64, 0 },
1130:         { 0xd8f8, 0, _st, _sti | _plus_r },
1131:         { 0xdcf0, 0, _sti | _plus_r, _st },
1132:         { 0xdef1, 0, 0, 0 },
1133:         { ASM_END, 0, 0, 0 }
1134: };
1135: PTRNTAB2  aptb2FDIVRP[] = /* FDIVRP */ {
1136:         { 0xdef1, 0, 0, 0 },
1137:         { 0xdef0, 0, _sti | _plus_r, _st },
1138:         { ASM_END, 0, 0, 0 }
1139: };
1140: PTRNTAB2  aptb2FIDIVR[] = /* FIDIVR */ {
1141:         { 0xda, _7,  _m32, 0 },
1142:         { 0xde, _7,  _m16, 0 },
1143:         { ASM_END, 0, 0, 0 }
1144: };
1145: PTRNTAB2  aptb2FMUL[] = /* FMUL */ {
1146:         { 0xd8, _1, _m32, 0 },
1147:         { 0xdc, _1, _fm64, 0 },
1148:         { 0xd8c8, 0, _st, _sti | _plus_r },
1149:         { 0xdcc8, 0, _sti | _plus_r, _st },
1150:         { 0xdec9, 0, 0, 0 },
1151:         { ASM_END, 0, 0, 0 }
1152: };
1153: PTRNTAB2  aptb2FMULP[] = /* FMULP */ {
1154:         { 0xdec8, 0, _sti | _plus_r, _st },
1155:         { 0xdec9, 0, 0, 0 },
1156:         { ASM_END, 0, 0, 0 }
1157: };
1158: PTRNTAB2  aptb2FIMUL[] = /* FIMUL */ {
1159:         { 0xda, _1, _m32, 0 },
1160:         { 0xde, _1, _m16, 0 },
1161:         { ASM_END, 0, 0, 0 }
1162: };
1163: PTRNTAB2  aptb2FSUB[] = /* FSUB */ {
1164:         { 0xd8, _4, _m32, 0 },
1165:         { 0xdc, _4, _fm64, 0 },
1166:         { 0xd8e0, 0, _st, _sti | _plus_r },
1167:         { 0xdce8, 0, _sti | _plus_r, _st },
1168:         { 0xdee9, 0, 0, 0 },
1169:         { ASM_END, 0, 0, 0 }
1170: };
1171: PTRNTAB2  aptb2FSUBP[] = /* FSUBP */ {
1172:         { 0xdee8, 0, _sti | _plus_r, _st },
1173:         { 0xdee9, 0, 0, 0 },
1174:         { ASM_END, 0, 0, 0 }
1175: };
1176: PTRNTAB2  aptb2FISUB[] = /* FISUB */ {
1177:         { 0xda, _4, _m32, 0 },
1178:         { 0xde, _4, _m16, 0 },
1179:         { ASM_END, 0, 0, 0 }
1180: };
1181: PTRNTAB2  aptb2FSUBR[] = /* FSUBR */ {
1182:         { 0xd8, _5, _m32, 0 },
1183:         { 0xdc, _5, _fm64, 0 },
1184:         { 0xd8e8, 0, _st, _sti | _plus_r },
1185:         { 0xdce0, 0, _sti | _plus_r, _st },
1186:         { 0xdee1, 0, 0, 0 },
1187:         { ASM_END, 0, 0, 0 }
1188: };
1189: PTRNTAB2  aptb2FSUBRP[] = /* FSUBRP */ {
1190:         { 0xdee0, 0, _sti | _plus_r, _st },
1191:         { 0xdee1, 0, 0, 0 },
1192:         { ASM_END, 0, 0, 0 }
1193: };
1194: PTRNTAB2  aptb2FISUBR[] = /* FISUBR */ {
1195:         { 0xda, _5, _m32, 0 },
1196:         { 0xde, _5, _m16, 0 },
1197:         { ASM_END, 0, 0, 0 }
1198: };
1199: 
1200: ///////////////////////////// MMX Extensions /////////////////////////
1201: 
1202: PTRNTAB0 aptb0EMMS[] = /* EMMS */       {
1203:         { 0x0F77, 0 }
1204: };
1205: 
1206: PTRNTAB2 aptb2MOVD[] = /* MOVD */ {
1207:         { 0x0F6E,_r,_mm,_rm32 },
1208:         { 0x0F7E,_r,_rm32,_mm },
1209:         { 0x660F6E,_r,_xmm,_rm32 },
1210:         { 0x660F7E,_r,_rm32,_xmm },
1211:         { ASM_END }
1212: };
1213: 
1214: PTRNTAB2 aptb2MOVQ[] = /* MOVQ */ {
1215:         { 0x0F6F,_r,_mm,_mmm64 },
1216:         { 0x0F7F,_r,_mmm64,_mm },
1217:         { 0xF30F7E,_r,_xmm,_xmm_m64 },
1218:         { 0x660FD6,_r,_xmm_m64,_xmm },
1219:         { 0x0F6E,  _r|_64_bit,_mm,  _rm64 },
1220:         { 0x0F7E,  _r|_64_bit,_rm64,_mm   },
1221:         { 0x660F6E,_r|_64_bit,_xmm, _rm64 },
1222:         { 0x660F7E,_r|_64_bit,_rm64,_xmm  },
1223:         { ASM_END }
1224: };
1225: 
1226: PTRNTAB2 aptb2PACKSSDW[] = {
1227:         { 0x0F6B, _r,_mm,_mmm64 },
1228:         { 0x660F6B, _r,_xmm,_xmm_m128 },
1229:         { ASM_END }
1230: };
1231: 
1232: PTRNTAB2 aptb2PACKSSWB[] = {
1233:         { 0x0F63, _r,_mm,_mmm64 },
1234:         { 0x660F63, _r,_xmm,_xmm_m128 },
1235:         { ASM_END }
1236: };
1237: 
1238: PTRNTAB2 aptb2PACKUSWB[] = {
1239:         { 0x0F67, _r,_mm,_mmm64 },
1240:         { 0x660F67, _r,_xmm,_xmm_m128 },
1241:         { ASM_END }
1242: };
1243: 
1244: PTRNTAB2 aptb2PADDB[] = {
1245:         { 0x0FFC, _r,_mm,_mmm64 },
1246:         { 0x660FFC, _r,_xmm,_xmm_m128 },
1247:         { ASM_END }
1248: };
1249: 
1250: PTRNTAB2 aptb2PADDD[] = {
1251:         { 0x0FFE, _r,_mm,_mmm64 },
1252:         { 0x660FFE, _r,_xmm,_xmm_m128 },
1253:         { ASM_END }
1254: };
1255: 
1256: PTRNTAB2 aptb2PADDSB[] = {
1257:         { 0x0FEC, _r,_mm,_mmm64 },
1258:         { 0x660FEC, _r,_xmm,_xmm_m128 },
1259:         { ASM_END }
1260: };
1261: 
1262: PTRNTAB2 aptb2PADDSW[] = {
1263:         { 0x0FED, _r,_mm,_mmm64 },
1264:         { 0x660FED, _r,_xmm,_xmm_m128 },
1265:         { ASM_END }
1266: };
1267: 
1268: PTRNTAB2 aptb2PADDUSB[] = {
1269:         { 0x0FDC, _r,_mm,_mmm64 },
1270:         { 0x660FDC, _r,_xmm,_xmm_m128 },
1271:         { ASM_END }
1272: };
1273: 
1274: PTRNTAB2 aptb2PADDUSW[] = {
1275:         { 0x0FDD, _r,_mm,_mmm64 },
1276:         { 0x660FDD, _r,_xmm,_xmm_m128 },
1277:         { ASM_END }
1278: };
1279: 
1280: PTRNTAB2 aptb2PADDW[] = {
1281:         { 0x0FFD, _r,_mm,_mmm64 },
1282:         { 0x660FFD, _r,_xmm,_xmm_m128 },
1283:         { ASM_END }
1284: };
1285: 
1286: PTRNTAB2 aptb2PAND[] = {
1287:         { 0x0FDB, _r,_mm,_mmm64 },
1288:         { 0x660FDB, _r,_xmm,_xmm_m128 },
1289:         { ASM_END }
1290: };
1291: 
1292: PTRNTAB2 aptb2PANDN[] = {
1293:         { 0x0FDF, _r,_mm,_mmm64 },
1294:         { 0x660FDF, _r,_xmm,_xmm_m128 },
1295:         { ASM_END }
1296: };
1297: 
1298: PTRNTAB2 aptb2PCMPEQB[] = {
1299:         { 0x0F74, _r,_mm,_mmm64 },
1300:         { 0x660F74, _r,_xmm,_xmm_m128 },
1301:         { ASM_END }
1302: };
1303: 
1304: PTRNTAB2 aptb2PCMPEQD[] = {
1305:         { 0x0F76, _r,_mm,_mmm64 },
1306:         { 0x660F76, _r,_xmm,_xmm_m128 },
1307:         { ASM_END }
1308: };
1309: 
1310: PTRNTAB2 aptb2PCMPEQW[] = {
1311:         { 0x0F75, _r,_mm,_mmm64 },
1312:         { 0x660F75, _r,_xmm,_xmm_m128 },
1313:         { ASM_END }
1314: };
1315: 
1316: PTRNTAB2 aptb2PCMPGTB[] = {
1317:         { 0x0F64, _r,_mm,_mmm64 },
1318:         { 0x660F64, _r,_xmm,_xmm_m128 },
1319:         { ASM_END }
1320: };
1321: 
1322: PTRNTAB2 aptb2PCMPGTD[] = {
1323:         { 0x0F66, _r,_mm,_mmm64 },
1324:         { 0x660F66, _r,_xmm,_xmm_m128 },
1325:         { ASM_END }
1326: };
1327: 
1328: PTRNTAB2 aptb2PCMPGTW[] = {
1329:         { 0x0F65, _r,_mm,_mmm64 },
1330:         { 0x660F65, _r,_xmm,_xmm_m128 },
1331:         { ASM_END }
1332: };
1333: 
1334: PTRNTAB2 aptb2PMADDWD[] = {
1335:         { 0x0FF5, _r,_mm,_mmm64 },
1336:         { 0x660FF5, _r,_xmm,_xmm_m128 },
1337:         { ASM_END }
1338: };
1339: 
1340: PTRNTAB2 aptb2PSLLW[] = /* PSLLW */ {
1341:         { 0x0FF1, _r,_mm,_mmm64 },
1342:         { 0x0F71, _6,_mm,_imm8 },
1343:         { 0x660FF1, _r,_xmm,_xmm_m128 },
1344:         { 0x660F71, _6,_xmm,_imm8 },
1345:         { ASM_END }
1346: };
1347: 
1348: PTRNTAB2 aptb2PSLLD[] = /* PSLLD */ {
1349:         { 0x0FF2, _r,_mm,_mmm64 },
1350:         { 0x0F72, _6,_mm,_imm8 },
1351:         { 0x660FF2, _r,_xmm,_xmm_m128 },
1352:         { 0x660F72, _6,_xmm,_imm8 },
1353:         { ASM_END }
1354: };
1355: 
1356: PTRNTAB2 aptb2PSLLQ[] = /* PSLLQ */ {
1357:         { 0x0FF3, _r,_mm,_mmm64 },
1358:         { 0x0F73, _6,_mm,_imm8 },
1359:         { 0x660FF3, _r,_xmm,_xmm_m128 },
1360:         { 0x660F73, _6,_xmm,_imm8 },
1361:         { ASM_END }
1362: };
1363: 
1364: PTRNTAB2 aptb2PSRAW[] = /* PSRAW */ {
1365:         { 0x0FE1, _r,_mm,_mmm64 },
1366:         { 0x0F71, _4,_mm,_imm8 },
1367:         { 0x660FE1, _r,_xmm,_xmm_m128 },
1368:         { 0x660F71, _4,_xmm,_imm8 },
1369:         { ASM_END }
1370: };
1371: 
1372: PTRNTAB2 aptb2PSRAD[] = /* PSRAD */ {
1373:         { 0x0FE2, _r,_mm,_mmm64 },
1374:         { 0x0F72, _4,_mm,_imm8 },
1375:         { 0x660FE2, _r,_xmm,_xmm_m128 },
1376:         { 0x660F72, _4,_xmm,_imm8 },
1377:         { ASM_END }
1378: };
1379: 
1380: PTRNTAB2 aptb2PSRLW[] = /* PSRLW */ {
1381:         { 0x0FD1, _r,_mm,_mmm64 },
1382:         { 0x0F71, _2,_mm,_imm8 },
1383:         { 0x660FD1, _r,_xmm,_xmm_m128 },
1384:         { 0x660F71, _2,_xmm,_imm8 },
1385:         { ASM_END }
1386: };
1387: 
1388: PTRNTAB2 aptb2PSRLD[] = /* PSRLD */ {
1389:         { 0x0FD2, _r,_mm,_mmm64 },
1390:         { 0x0F72, _2,_mm,_imm8 },
1391:         { 0x660FD2, _r,_xmm,_xmm_m128 },
1392:         { 0x660F72, _2,_xmm,_imm8 },
1393:         { ASM_END }
1394: };
1395: 
1396: PTRNTAB2 aptb2PSRLQ[] = /* PSRLQ */ {
1397:         { 0x0FD3, _r,_mm,_mmm64 },
1398:         { 0x0F73, _2,_mm,_imm8 },
1399:         { 0x660FD3, _r,_xmm,_xmm_m128 },
1400:         { 0x660F73, _2,_xmm,_imm8 },
1401:         { ASM_END }
1402: };
1403: 
1404: PTRNTAB2 aptb2PSUBB[] = {
1405:         { 0x0FF8, _r,_mm,_mmm64 },
1406:         { 0x660FF8, _r,_xmm,_xmm_m128 },
1407:         { ASM_END }
1408: };
1409: 
1410: PTRNTAB2 aptb2PSUBD[] = {
1411:         { 0x0FFA, _r,_mm,_mmm64 },
1412:         { 0x660FFA, _r,_xmm,_xmm_m128 },
1413:         { ASM_END }
1414: };
1415: 
1416: PTRNTAB2 aptb2PSUBSB[] = {
1417:         { 0x0FE8, _r,_mm,_mmm64 },
1418:         { 0x660FE8, _r,_xmm,_xmm_m128 },
1419:         { ASM_END }
1420: };
1421: 
1422: PTRNTAB2 aptb2PSUBSW[] = {
1423:         { 0x0FE9, _r,_mm,_mmm64 },
1424:         { 0x660FE9, _r,_xmm,_xmm_m128 },
1425:         { ASM_END }
1426: };
1427: 
1428: PTRNTAB2 aptb2PSUBUSB[] = {
1429:         { 0x0FD8, _r,_mm,_mmm64 },
1430:         { 0x660FD8, _r,_xmm,_xmm_m128 },
1431:         { ASM_END }
1432: };
1433: 
1434: PTRNTAB2 aptb2PSUBUSW[] = {
1435:         { 0x0FD9, _r,_mm,_mmm64 },
1436:         { 0x660FD9, _r,_xmm,_xmm_m128 },
1437:         { ASM_END }
1438: };
1439: 
1440: PTRNTAB2 aptb2PSUBW[] = {
1441:         { 0x0FF9, _r,_mm,_mmm64 },
1442:         { 0x660FF9, _r,_xmm,_xmm_m128 },
1443:         { ASM_END }
1444: };
1445: 
1446: PTRNTAB2 aptb2PUNPCKHBW[] = {
1447:         { 0x0F68, _r,_mm,_mmm64 },
1448:         { 0x660F68, _r,_xmm,_xmm_m128 },
1449:         { ASM_END }
1450: };
1451: 
1452: PTRNTAB2 aptb2PUNPCKHDQ[] = {
1453:         { 0x0F6A, _r,_mm,_mmm64 },
1454:         { 0x660F6A, _r,_xmm,_xmm_m128 },
1455:         { ASM_END }
1456: };
1457: 
1458: PTRNTAB2 aptb2PUNPCKHWD[] = {
1459:         { 0x0F69, _r,_mm,_mmm64 },
1460:         { 0x660F69, _r,_xmm,_xmm_m128 },
1461:         { ASM_END }
1462: };
1463: 
1464: PTRNTAB2 aptb2PUNPCKLBW[] = {
1465:         { 0x0F60, _r,_mm,_mmm64 },
1466:         { 0x660F60, _r,_xmm,_xmm_m128 },
1467:         { ASM_END }
1468: };
1469: 
1470: PTRNTAB2 aptb2PUNPCKLDQ[] = {
1471:         { 0x0F62, _r,_mm,_mmm64 },
1472:         { 0x660F62, _r,_xmm,_xmm_m128 },
1473:         { ASM_END }
1474: };
1475: 
1476: PTRNTAB2 aptb2PUNPCKLWD[] = {
1477:         { 0x0F61, _r,_mm,_mmm64 },
1478:         { 0x660F61, _r,_xmm,_xmm_m128 },
1479:         { ASM_END }
1480: };
1481: 
1482: PTRNTAB2 aptb2PXOR[] = {
1483:         { 0x0FEF, _r,_mm,_mmm64 },
1484:         { 0x660FEF, _r,_xmm,_xmm_m128 },
1485:         { ASM_END }
1486: };
1487: 
1488: ////////////////////// New Opcodes /////////////////////////////
1489: 
1490: #if 0 // Use REP NOP instead
1491: PTRNTAB0 aptb0PAUSE[] =  /* PAUSE */ {
1492:         { 0xf390, 0 }
1493: };
1494: #endif
1495: 
1496: PTRNTAB0 aptb0SYSCALL[] =  /* SYSCALL */ {
1497:         { 0x0f05, _modcxr11 }
1498: };
1499: 
1500: PTRNTAB0 aptb0SYSRET[] =  /* SYSRET */ {
1501:         { 0x0f07, 0 }
1502: };
1503: 
1504: PTRNTAB0 aptb0SYSENTER[] =  /* SYSENTER */ {
1505:         { 0x0f34, 0 }
1506: };
1507: 
1508: PTRNTAB0 aptb0SYSEXIT[] =  /* SYSEXIT */ {
1509:         { 0x0f35, 0 }
1510: };
1511: 
1512: PTRNTAB0 aptb0UD2[] =  /* UD2 */ {
1513:         { 0x0f0b, 0 }
1514: };
1515: 
1516: PTRNTAB0 aptb0LFENCE[] = /* LFENCE */   {
1517:         { 0x0FAEE8,     0 }
1518: };
1519: 
1520: PTRNTAB0 aptb0MFENCE[] = /* MFENCE */   {
1521:         { 0x0FAEF0,     0 }
1522: };
1523: 
1524: PTRNTAB0 aptb0SFENCE[] = /* SFENCE */   {
1525:         { 0x0FAEF8,     0 }
1526: };
1527: 
1528: PTRNTAB1  aptb1FXSAVE[] = /* FXSAVE */ {
1529:         { 0x0FAE, _0, _m512 },
1530:         { ASM_END, 0, 0 }
1531: };
1532: 
1533: PTRNTAB1  aptb1FXRSTOR[] = /* FXRSTOR */ {
1534:         { 0x0FAE, _1, _m512 },
1535:         { ASM_END, 0, 0 }
1536: };
1537: 
1538: PTRNTAB1  aptb1LDMXCSR[] = /* LDMXCSR */ {
1539:         { 0x0FAE, _2, _m32 },
1540:         { ASM_END, 0, 0 }
1541: };
1542: 
1543: PTRNTAB1  aptb1STMXCSR[] = /* STMXCSR */ {
1544:         { 0x0FAE, _3, _m32 },
1545:         { ASM_END, 0, 0 }
1546: };
1547: 
1548: PTRNTAB1  aptb1CLFLUSH[] = /* CLFLUSH */ {
1549:         { 0x0FAE, _7, _m8 },
1550:         { ASM_END, 0, 0 }
1551: };
1552: 
1553: PTRNTAB2 aptb2ADDPS[] = {
1554:         { 0x0F58, _r,_xmm,_xmm_m128 },
1555:         { ASM_END }
1556: };
1557: 
1558: PTRNTAB2 aptb2ADDPD[] = {
1559:         { 0x660F58, _r,_xmm,_xmm_m128 },
1560:         { ASM_END }
1561: };
1562: 
1563: PTRNTAB2 aptb2ADDSD[] = {
1564:         { 0xF20F58, _r,_xmm,_xmm_m64 },
1565:         { ASM_END }
1566: };
1567: 
1568: PTRNTAB2 aptb2ADDSS[] = {
1569:         { 0xF30F58, _r,_xmm,_xmm_m32 },
1570:         { ASM_END }
1571: };
1572: 
1573: PTRNTAB2 aptb2ANDPD[] = {
1574:         { 0x660F54, _r,_xmm,_xmm_m128 },
1575:         { ASM_END }
1576: };
1577: 
1578: PTRNTAB2 aptb2ANDPS[] = {
1579:         { 0x0F54, _r,_xmm,_xmm_m128 },
1580:         { ASM_END }
1581: };
1582: 
1583: PTRNTAB2 aptb2ANDNPD[] = {
1584:         { 0x660F55, _r,_xmm,_xmm_m128 },
1585:         { ASM_END }
1586: };
1587: 
1588: PTRNTAB2 aptb2ANDNPS[] = {
1589:         { 0x0F55, _r,_xmm,_xmm_m128 },
1590:         { ASM_END }
1591: };
1592: 
1593: PTRNTAB3 aptb3CMPPS[] = {
1594:         { 0x0FC2, _r,_xmm,_xmm_m128,_imm8 },
1595:         { ASM_END }
1596: };
1597: 
1598: PTRNTAB3 aptb3CMPPD[] = {
1599:         { 0x660FC2, _r,_xmm,_xmm_m128,_imm8 },
1600:         { ASM_END }
1601: };
1602: 
1603: PTRNTAB3 aptb3CMPSD[] = {
1604:         { 0xa7, _32_bit | _I386 | _modsidi },
1605:         { 0xF20FC2, _r,_xmm,_xmm_m64,_imm8 },
1606:         { ASM_END }
1607: };
1608: 
1609: PTRNTAB3 aptb3CMPSS[] = {
1610:         { 0xF30FC2, _r,_xmm,_xmm_m32,_imm8 },
1611:         { ASM_END }
1612: };
1613: 
1614: PTRNTAB2 aptb2COMISD[] = {
1615:         { 0x660F2F, _r,_xmm,_xmm_m64 },
1616:         { ASM_END }
1617: };
1618: 
1619: PTRNTAB2 aptb2COMISS[] = {
1620:         { 0x0F2F, _r,_xmm,_xmm_m32 },
1621:         { ASM_END }
1622: };
1623: 
1624: PTRNTAB2 aptb2CVTDQ2PD[] = {
1625:         { 0xF30FE6, _r,_xmm,_xmm_m64 },
1626:         { ASM_END }
1627: };
1628: 
1629: PTRNTAB2 aptb2CVTDQ2PS[] = {
1630:         { 0x0F5B, _r,_xmm,_xmm_m128 },
1631:         { ASM_END }
1632: };
1633: 
1634: PTRNTAB2 aptb2CVTPD2DQ[] = {
1635:         { 0xF20FE6, _r,_xmm,_xmm_m128 },
1636:         { ASM_END }
1637: };
1638: 
1639: PTRNTAB2 aptb2CVTPD2PI[] = {
1640:         { 0x660F2D, _r,_mm,_xmm_m128 },
1641:         { ASM_END }
1642: };
1643: 
1644: PTRNTAB2 aptb2CVTPD2PS[] = {
1645:         { 0x660F5A, _r,_xmm,_xmm_m128 },
1646:         { ASM_END }
1647: };
1648: 
1649: PTRNTAB2 aptb2CVTPI2PD[] = {
1650:         { 0x660F2A, _r,_xmm,_mmm64 },
1651:         { ASM_END }
1652: };
1653: 
1654: PTRNTAB2 aptb2CVTPI2PS[] = {
1655:         { 0x0F2A, _r,_xmm,_mmm64 },
1656:         { ASM_END }
1657: };
1658: 
1659: PTRNTAB2 aptb2CVTPS2DQ[] = {
1660:         { 0x660F5B, _r,_xmm,_xmm_m128 },
1661:         { ASM_END }
1662: };
1663: 
1664: PTRNTAB2 aptb2CVTPS2PD[] = {
1665:         { 0x0F5A, _r,_xmm,_xmm_m64 },
1666:         { ASM_END }
1667: };
1668: 
1669: PTRNTAB2 aptb2CVTPS2PI[] = {
1670:         { 0x0F2D, _r,_mm,_xmm_m64 },
1671:         { ASM_END }
1672: };
1673: 
1674: PTRNTAB2 aptb2CVTSD2SI[] = {
1675:         { 0xF20F2D, _r,_r32,_xmm_m64 },
1676:         { ASM_END }
1677: };
1678: 
1679: PTRNTAB2 aptb2CVTSD2SS[] = {
1680:         { 0xF20F5A, _r,_xmm,_xmm_m64 },
1681:         { ASM_END }
1682: };
1683: 
1684: PTRNTAB2 aptb2CVTSI2SD[] = {
1685:         { 0xF20F2A, _r,_xmm,_rm32 },
1686:         { ASM_END }
1687: };
1688: 
1689: PTRNTAB2 aptb2CVTSI2SS[] = {
1690:         { 0xF30F2A, _r,_xmm,_rm32 },
1691:         { ASM_END }
1692: };
1693: 
1694: PTRNTAB2 aptb2CVTSS2SD[] = {
1695:         { 0xF30F5A, _r,_xmm,_xmm_m32 },
1696:         { ASM_END }
1697: };
1698: 
1699: PTRNTAB2 aptb2CVTSS2SI[] = {
1700:         { 0xF30F2D, _r,_r32,_xmm_m32 },
1701:         { ASM_END }
1702: };
1703: 
1704: PTRNTAB2 aptb2CVTTPD2PI[] = {
1705:         { 0x660F2C, _r,_mm,_xmm_m128 },
1706:         { ASM_END }
1707: };
1708: 
1709: PTRNTAB2 aptb2CVTTPD2DQ[] = {
1710:         { 0x660FE6, _r,_xmm,_xmm_m128 },
1711:         { ASM_END }
1712: };
1713: 
1714: PTRNTAB2 aptb2CVTTPS2DQ[] = {
1715:         { 0xF30F5B, _r,_xmm,_xmm_m128 },
1716:         { ASM_END }
1717: };
1718: 
1719: PTRNTAB2 aptb2CVTTPS2PI[] = {
1720:         { 0x0F2C, _r,_mm,_xmm_m64 },
1721:         { ASM_END }
1722: };
1723: 
1724: PTRNTAB2 aptb2CVTTSD2SI[] = {
1725:         { 0xF20F2C, _r,_r32,_xmm_m64 },
1726:         { ASM_END }
1727: };
1728: 
1729: PTRNTAB2 aptb2CVTTSS2SI[] = {
1730:         { 0xF30F2C, _r,_r32,_xmm_m32 },
1731:         { ASM_END }
1732: };
1733: 
1734: PTRNTAB2 aptb2DIVPD[] = {
1735:         { 0x660F5E, _r,_xmm,_xmm_m128 },
1736:         { ASM_END }
1737: };
1738: 
1739: PTRNTAB2 aptb2DIVPS[] = {
1740:         { 0x0F5E, _r,_xmm,_xmm_m128 },
1741:         { ASM_END }
1742: };
1743: 
1744: PTRNTAB2 aptb2DIVSD[] = {
1745:         { 0xF20F5E, _r,_xmm,_xmm_m64 },
1746:         { ASM_END }
1747: };
1748: 
1749: PTRNTAB2 aptb2DIVSS[] = {
1750:         { 0xF30F5E, _r,_xmm,_xmm_m32 },
1751:         { ASM_END }
1752: };
1753: 
1754: PTRNTAB2 aptb2MASKMOVDQU[] = {
1755:         { 0x660FF7, _r,_xmm,_xmm },
1756:         { ASM_END }
1757: };
1758: 
1759: PTRNTAB2 aptb2MASKMOVQ[] = {
1760:         { 0x0FF7, _r,_mm,_mm },
1761:         { ASM_END }
1762: };
1763: 
1764: PTRNTAB2 aptb2MAXPD[] = {
1765:         { 0x660F5F, _r,_xmm,_xmm_m128 },
1766:         { ASM_END }
1767: };
1768: 
1769: PTRNTAB2 aptb2MAXPS[] = {
1770:         { 0x0F5F, _r,_xmm,_xmm_m128 },
1771:         { ASM_END }
1772: };
1773: 
1774: PTRNTAB2 aptb2MAXSD[] = {
1775:         { 0xF20F5F, _r,_xmm,_xmm_m64 },
1776:         { ASM_END }
1777: };
1778: 
1779: PTRNTAB2 aptb2MAXSS[] = {
1780:         { 0xF30F5F, _r,_xmm,_xmm_m32 },
1781:         { ASM_END }
1782: };
1783: 
1784: PTRNTAB2 aptb2MINPD[] = {
1785:         { 0x660F5D, _r,_xmm,_xmm_m128 },
1786:         { ASM_END }
1787: };
1788: 
1789: PTRNTAB2 aptb2MINPS[] = {
1790:         { 0x0F5D, _r,_xmm,_xmm_m128 },
1791:         { ASM_END }
1792: };
1793: 
1794: PTRNTAB2 aptb2MINSD[] = {
1795:         { 0xF20F5D, _r,_xmm,_xmm_m64 },
1796:         { ASM_END }
1797: };
1798: 
1799: PTRNTAB2 aptb2MINSS[] = {
1800:         { 0xF30F5D, _r,_xmm,_xmm_m32 },
1801:         { ASM_END }
1802: };
1803: 
1804: PTRNTAB2 aptb2MOVAPD[] = {
1805:         { 0x660F28, _r,_xmm,_xmm_m128 },
1806:         { 0x660F29, _r,_xmm_m128,_xmm },
1807:         { ASM_END }
1808: };
1809: 
1810: PTRNTAB2 aptb2MOVAPS[] = {
1811:         { 0x0F28, _r,_xmm,_xmm_m128 },
1812:         { 0x0F29, _r,_xmm_m128,_xmm },
1813:         { ASM_END }
1814: };
1815: 
1816: PTRNTAB2 aptb2MOVDQA[] = {
1817:         { 0x660F6F, _r,_xmm,_xmm_m128 },
1818:         { 0x660F7F, _r,_xmm_m128,_xmm },
1819:         { ASM_END }
1820: };
1821: 
1822: PTRNTAB2 aptb2MOVDQU[] = {
1823:         { 0xF30F6F, _r,_xmm,_xmm_m128 },
1824:         { 0xF30F7F, _r,_xmm_m128,_xmm },
1825:         { ASM_END }
1826: };
1827: 
1828: PTRNTAB2 aptb2MOVDQ2Q[] = {
1829:         { 0xF20FD6, _r,_mm,_xmm },
1830:         { ASM_END }
1831: };
1832: 
1833: PTRNTAB2 aptb2MOVHLPS[] = {
1834:         { 0x0F12, _r,_xmm,_xmm },
1835:         { ASM_END }
1836: };
1837: 
1838: PTRNTAB2 aptb2MOVHPD[] = {
1839:         { 0x660F16, _r,_xmm,_xmm_m64 },
1840:         { 0x660F17, _r,_xmm_m64,_xmm },
1841:         { ASM_END }
1842: };
1843: 
1844: PTRNTAB2 aptb2MOVHPS[] = {
1845:         { 0x0F16, _r,_xmm,_xmm_m64 },
1846:         { 0x0F17, _r,_xmm_m64,_xmm },
1847:         { ASM_END }
1848: };
1849: 
1850: PTRNTAB2 aptb2MOVLHPS[] = {
1851:         { 0x0F16, _r,_xmm,_xmm },
1852:         { ASM_END }
1853: };
1854: 
1855: PTRNTAB2 aptb2MOVLPD[] = {
1856:         { 0x660F12, _r,_xmm,_xmm_m64 },
1857:         { 0x660F13, _r,_xmm_m64,_xmm },
1858:         { ASM_END }
1859: };
1860: 
1861: PTRNTAB2 aptb2MOVLPS[] = {
1862:         { 0x0F12, _r,_xmm,_xmm_m64 },
1863:         { 0x0F13, _r,_xmm_m64,_xmm },
1864:         { ASM_END }
1865: };
1866: 
1867: PTRNTAB2 aptb2MOVMSKPD[] = {
1868:         { 0x660F50, _r,_r32,_xmm },
1869:         { ASM_END }
1870: };
1871: 
1872: PTRNTAB2 aptb2MOVMSKPS[] = {
1873:         { 0x0F50, _r,_r32,_xmm },
1874:         { ASM_END }
1875: };
1876: 
1877: PTRNTAB2 aptb2MOVNTDQ[] = {
1878:         { 0x660FE7, _r,_m128,_xmm },
1879:         { ASM_END }
1880: };
1881: 
1882: PTRNTAB2 aptb2MOVNTI[] = {
1883:         { 0x0FC3, _r,_m32,_r32 },
1884:         { ASM_END }
1885: };
1886: 
1887: PTRNTAB2 aptb2MOVNTPD[] = {
1888:         { 0x660F2B, _r,_m128,_xmm },
1889:         { ASM_END }
1890: };
1891: 
1892: PTRNTAB2 aptb2MOVNTPS[] = {
1893:         { 0x0F2B, _r,_m128,_xmm },
1894:         { ASM_END }
1895: };
1896: 
1897: PTRNTAB2 aptb2MOVNTQ[] = {
1898:         { 0x0FE7, _r,_m64,_mm },
1899:         { ASM_END }
1900: };
1901: 
1902: /* MOVQ */
1903: 
1904: PTRNTAB2 aptb2MOVQ2DQ[] = {
1905:         { 0xF30FD6, _r,_xmm,_mm },
1906:         { ASM_END }
1907: };
1908: 
1909: /* MOVSD */
1910: 
1911: PTRNTAB2 aptb2MOVSS[] = {
1912:         { 0xF30F10, _r,_xmm,_xmm_m32 },
1913:         { 0xF30F11, _r,_xmm_m32,_xmm },
1914:         { ASM_END }
1915: };
1916: 
1917: PTRNTAB2 aptb2MOVUPD[] = {
1918:         { 0x660F10, _r,_xmm,_xmm_m128 },
1919:         { 0x660F11, _r,_xmm_m128,_xmm },
1920:         { ASM_END }
1921: };
1922: 
1923: PTRNTAB2 aptb2MOVUPS[] = {
1924:         { 0x0F10, _r,_xmm,_xmm_m128 },
1925:         { 0x0F11, _r,_xmm_m128,_xmm },
1926:         { ASM_END }
1927: };
1928: 
1929: PTRNTAB2 aptb2MULPD[] = {
1930:         { 0x660F59, _r,_xmm,_xmm_m128 },
1931:         { ASM_END }
1932: };
1933: 
1934: PTRNTAB2 aptb2MULPS[] = {
1935:         { 0x0F59, _r,_xmm,_xmm_m128 },
1936:         { ASM_END }
1937: };
1938: 
1939: PTRNTAB2 aptb2MULSD[] = {
1940:         { 0xF20F59, _r,_xmm,_xmm_m64 },
1941:         { ASM_END }
1942: };
1943: 
1944: PTRNTAB2 aptb2MULSS[] = {
1945:         { 0xF30F59, _r,_xmm,_xmm_m32 },
1946:         { ASM_END }
1947: };
1948: 
1949: PTRNTAB2 aptb2ORPD[] = {
1950:         { 0x660F56, _r,_xmm,_xmm_m128 },
1951:         { ASM_END }
1952: };
1953: 
1954: PTRNTAB2 aptb2ORPS[] = {
1955:         { 0x0F56, _r,_xmm,_xmm_m128 },
1956:         { ASM_END }
1957: };
1958: 
1959: PTRNTAB2 aptb2PADDQ[] = {
1960:         { 0x0FD4, _r,_mm,_mmm64 },
1961:         { 0x660FD4, _r,_xmm,_xmm_m128 },
1962:         { ASM_END }
1963: };
1964: 
1965: PTRNTAB2 aptb2PAVGB[] = {
1966:         { 0x0FE0, _r,_mm,_mmm64 },
1967:         { 0x660FE0, _r,_xmm,_xmm_m128 },
1968:         { ASM_END }
1969: };
1970: 
1971: PTRNTAB2 aptb2PAVGW[] = {
1972:         { 0x0FE3, _r,_mm,_mmm64 },
1973:         { 0x660FE3, _r,_xmm,_xmm_m128 },
1974:         { ASM_END }
1975: };
1976: 
1977: PTRNTAB3 aptb3PEXTRW[] = {
1978:         { 0x0FC5, _r,_r32,_mm,_imm8 },
1979:         { 0x660FC5, _r,_r32,_xmm,_imm8 },
1980:         { 0x660FC5, _r,_r64,_xmm,_imm8 },
1981:         { 0x660F3A15, _r,_m16,_xmm,_imm8 },    // synonym for r32/r64
1982:         { ASM_END }
1983: };
1984: 
1985: PTRNTAB3 aptb3PINSRW[] = {
1986:         { 0x0FC4, _r,_mm,_r32m16,_imm8 },
1987:         { 0x660FC4, _r,_xmm,_r32m16,_imm8 },
1988:         { ASM_END }
1989: };
1990: 
1991: PTRNTAB2 aptb2PMAXSW[] = {
1992:         { 0x0FEE, _r,_mm,_mmm64 },
1993:         { 0x660FEE, _r,_xmm,_xmm_m128 },
1994:         { ASM_END }
1995: };
1996: 
1997: PTRNTAB2 aptb2PMAXUB[] = {
1998:         { 0x0FDE, _r,_mm,_mmm64 },
1999:         { 0x660FDE, _r,_xmm,_xmm_m128 },
2000:         { ASM_END }
2001: };
2002: 
2003: PTRNTAB2 aptb2PMINSW[] = {
2004:         { 0x0FEA, _r,_mm,_mmm64 },
2005:         { 0x660FEA, _r,_xmm,_xmm_m128 },
2006:         { ASM_END }
2007: };
2008: 
2009: PTRNTAB2 aptb2PMINUB[] = {
2010:         { 0x0FDA, _r,_mm,_mmm64 },
2011:         { 0x660FDA, _r,_xmm,_xmm_m128 },
2012:         { ASM_END }
2013: };
2014: 
2015: PTRNTAB2 aptb2PMOVMSKB[] = {
2016:         { 0x0FD7, _r,_r32,_mm },
2017:         { 0x660FD7, _r,_r32,_xmm },
2018:         { ASM_END }
2019: };
2020: 
2021: PTRNTAB2 aptb2PMULHUW[] = {
2022:         { 0x0FE4, _r,_mm,_mmm64 },
2023:         { 0x660FE4, _r,_xmm,_xmm_m128 },
2024:         { ASM_END }
2025: };
2026: 
2027: PTRNTAB2 aptb2PMULHW[] = {
2028:         { 0x0FE5, _r,_mm,_mmm64 },
2029:         { 0x660FE5, _r,_xmm,_xmm_m128 },
2030:         { ASM_END }
2031: };
2032: 
2033: PTRNTAB2 aptb2PMULLW[] = {
2034:         { 0x0FD5, _r,_mm,_mmm64 },
2035:         { 0x660FD5, _r,_xmm,_xmm_m128 },
2036:         { ASM_END }
2037: };
2038: 
2039: PTRNTAB2 aptb2PMULUDQ[] = {
2040:         { 0x0FF4, _r,_mm,_mmm64 },
2041:         { 0x660FF4, _r,_xmm,_xmm_m128 },
2042:         { ASM_END }
2043: };
2044: 
2045: PTRNTAB2 aptb2POR[] = {
2046:         { 0x0FEB, _r,_mm,_mmm64 },
2047:         { 0x660FEB, _r,_xmm,_xmm_m128 },
2048:         { ASM_END }
2049: };
2050: 
2051: PTRNTAB1 aptb1PREFETCHNTA[] = {
2052:         { 0x0F18, _0,_m8 },
2053:         { ASM_END }
2054: };
2055: 
2056: PTRNTAB1 aptb1PREFETCHT0[] = {
2057:         { 0x0F18, _1,_m8 },
2058:         { ASM_END }
2059: };
2060: 
2061: PTRNTAB1 aptb1PREFETCHT1[] = {
2062:         { 0x0F18, _2,_m8 },
2063:         { ASM_END }
2064: };
2065: 
2066: PTRNTAB1 aptb1PREFETCHT2[] = {
2067:         { 0x0F18, _3,_m8 },
2068:         { ASM_END }
2069: };
2070: 
2071: PTRNTAB2 aptb2PSADBW[] = {
2072:         { 0x0FF6, _r,_mm,_mmm64 },
2073:         { 0x660FF6, _r,_xmm,_xmm_m128 },
2074:         { ASM_END }
2075: };
2076: 
2077: PTRNTAB3 aptb3PSHUFD[] = {
2078:         { 0x660F70, _r,_xmm,_xmm_m128,_imm8 },
2079:         { ASM_END }
2080: };
2081: 
2082: PTRNTAB3 aptb3PSHUFHW[] = {
2083:         { 0xF30F70, _r,_xmm,_xmm_m128,_imm8 },
2084:         { ASM_END }
2085: };
2086: 
2087: PTRNTAB3 aptb3PSHUFLW[] = {
2088:         { 0xF20F70, _r,_xmm,_xmm_m128,_imm8 },
2089:         { ASM_END }
2090: };
2091: 
2092: PTRNTAB3 aptb3PSHUFW[] = {
2093:         { 0x0F70, _r,_mm,_mmm64,_imm8 },
2094:         { ASM_END }
2095: };
2096: 
2097: PTRNTAB2 aptb2PSLLDQ[] = {
2098:         { 0x660F73, _7,_xmm,_imm8 },
2099:         { ASM_END }
2100: };
2101: 
2102: PTRNTAB2 aptb2PSRLDQ[] = {
2103:         { 0x660F73, _3,_xmm,_imm8 },
2104:         { ASM_END }
2105: };
2106: 
2107: PTRNTAB2 aptb2PSUBQ[] = {
2108:         { 0x0FFB, _r,_mm,_mmm64 },
2109:         { 0x660FFB, _r,_xmm,_xmm_m128 },
2110:         { ASM_END }
2111: };
2112: 
2113: PTRNTAB2 aptb2PUNPCKHQDQ[] = {
2114:         { 0x660F6D, _r,_xmm,_xmm_m128 },
2115:         { ASM_END }
2116: };
2117: 
2118: PTRNTAB2 aptb2PUNPCKLQDQ[] = {
2119:         { 0x660F6C, _r,_xmm,_xmm_m128 },
2120:         { ASM_END }
2121: };
2122: 
2123: PTRNTAB2 aptb2RCPPS[] = {
2124:         { 0x0F53, _r,_xmm,_xmm_m128 },
2125:         { ASM_END }
2126: };
2127: 
2128: PTRNTAB2 aptb2RCPSS[] = {
2129:         { 0xF30F53, _r,_xmm,_xmm_m32 },
2130:         { ASM_END }
2131: };
2132: 
2133: PTRNTAB2 aptb2RSQRTPS[] = {
2134:         { 0x0F52, _r,_xmm,_xmm_m128 },
2135:         { ASM_END }
2136: };
2137: 
2138: PTRNTAB2 aptb2RSQRTSS[] = {
2139:         { 0xF30F52, _r,_xmm,_xmm_m32 },
2140:         { ASM_END }
2141: };
2142: 
2143: PTRNTAB3 aptb3SHUFPD[] = {
2144:         { 0x660FC6, _r,_xmm,_xmm_m128,_imm8 },
2145:         { ASM_END }
2146: };
2147: 
2148: PTRNTAB3 aptb3SHUFPS[] = {
2149:         { 0x0FC6, _r,_xmm,_xmm_m128,_imm8 },
2150:         { ASM_END }
2151: };
2152: 
2153: PTRNTAB2 aptb2SQRTPD[] = {
2154:         { 0x660F51, _r,_xmm,_xmm_m128 },
2155:         { ASM_END }
2156: };
2157: 
2158: PTRNTAB2 aptb2SQRTPS[] = {
2159:         { 0x0F51, _r,_xmm,_xmm_m128 },
2160:         { ASM_END }
2161: };
2162: 
2163: PTRNTAB2 aptb2SQRTSD[] = {
2164:         { 0xF20F51, _r,_xmm,_xmm_m64 },
2165:         { ASM_END }
2166: };
2167: 
2168: PTRNTAB2 aptb2SQRTSS[] = {
2169:         { 0xF30F51, _r,_xmm,_xmm_m32 },
2170:         { ASM_END }
2171: };
2172: 
2173: PTRNTAB2 aptb2SUBPD[] = {
2174:         { 0x660F5C, _r,_xmm,_xmm_m128 },
2175:         { ASM_END }
2176: };
2177: 
2178: PTRNTAB2 aptb2SUBPS[] = {
2179:         { 0x0F5C, _r,_xmm,_xmm_m128 },
2180:         { ASM_END }
2181: };
2182: 
2183: PTRNTAB2 aptb2SUBSD[] = {
2184:         { 0xF20F5C, _r,_xmm,_xmm_m64 },
2185:         { ASM_END }
2186: };
2187: 
2188: PTRNTAB2 aptb2SUBSS[] = {
2189:         { 0xF30F5C, _r,_xmm,_xmm_m32 },
2190:         { ASM_END }
2191: };
2192: 
2193: PTRNTAB2 aptb2UCOMISD[] = {
2194:         { 0x660F2E, _r,_xmm,_xmm_m64 },
2195:         { ASM_END }
2196: };
2197: 
2198: PTRNTAB2 aptb2UCOMISS[] = {
2199:         { 0x0F2E, _r,_xmm,_xmm_m32 },
2200:         { ASM_END }
2201: };
2202: 
2203: PTRNTAB2 aptb2UNPCKHPD[] = {
2204:         { 0x660F15, _r,_xmm,_xmm_m128 },
2205:         { ASM_END }
2206: };
2207: 
2208: PTRNTAB2 aptb2UNPCKHPS[] = {
2209:         { 0x0F15, _r,_xmm,_xmm_m128 },
2210:         { ASM_END }
2211: };
2212: 
2213: PTRNTAB2 aptb2UNPCKLPD[] = {
2214:         { 0x660F14, _r,_xmm,_xmm_m128 },
2215:         { ASM_END }
2216: };
2217: 
2218: PTRNTAB2 aptb2UNPCKLPS[] = {
2219:         { 0x0F14, _r,_xmm,_xmm_m128 },
2220:         { ASM_END }
2221: };
2222: 
2223: PTRNTAB2 aptb2XORPD[] = {
2224:         { 0x660F57, _r,_xmm,_xmm_m128 },
2225:         { ASM_END }
2226: };
2227: 
2228: PTRNTAB2 aptb2XORPS[] = {
2229:         { 0x0F57, _r,_xmm,_xmm_m128 },
2230:         { ASM_END }
2231: };
2232: 
2233: /**** AMD only instructions ****/
2234: 
2235: /*
2236:         pavgusb
2237:         pf2id
2238:         pfacc
2239:         pfadd
2240:         pfcmpeq
2241:         pfcmpge
2242:         pfcmpgt
2243:         pfmax
2244:         pfmin
2245:         pfmul
2246:         pfnacc
2247:         pfpnacc
2248:         pfrcp
2249:         pfrcpit1
2250:         pfrcpit2
2251:         pfrsqit1
2252:         pfrsqrt
2253:         pfsub
2254:         pfsubr
2255:         pi2fd
2256:         pmulhrw
2257:         pswapd
2258: */
2259: 
2260: PTRNTAB2 aptb2PAVGUSB[] = {
2261:         { 0x0F0FBF, _r,_mm,_mmm64 },
2262:         { ASM_END }
2263: };
2264: 
2265: PTRNTAB2 aptb2PF2ID[] = {
2266:         { 0x0F0F1D, _r,_mm,_mmm64 },
2267:         { ASM_END }
2268: };
2269: 
2270: PTRNTAB2 aptb2PFACC[] = {
2271:         { 0x0F0FAE, _r,_mm,_mmm64 },
2272:         { ASM_END }
2273: };
2274: 
2275: PTRNTAB2 aptb2PFADD[] = {
2276:         { 0x0F0F9E, _r,_mm,_mmm64 },
2277:         { ASM_END }
2278: };
2279: 
2280: PTRNTAB2 aptb2PFCMPEQ[] = {
2281:         { 0x0F0FB0, _r,_mm,_mmm64 },
2282:         { ASM_END }
2283: };
2284: 
2285: PTRNTAB2 aptb2PFCMPGE[] = {
2286:         { 0x0F0F90, _r,_mm,_mmm64 },
2287:         { ASM_END }
2288: };
2289: 
2290: PTRNTAB2 aptb2PFCMPGT[] = {
2291:         { 0x0F0FA0, _r,_mm,_mmm64 },
2292:         { ASM_END }
2293: };
2294: 
2295: PTRNTAB2 aptb2PFMAX[] = {
2296:         { 0x0F0FA4, _r,_mm,_mmm64 },
2297:         { ASM_END }
2298: };
2299: 
2300: PTRNTAB2 aptb2PFMIN[] = {
2301:         { 0x0F0F94, _r,_mm,_mmm64 },
2302:         { ASM_END }
2303: };
2304: 
2305: PTRNTAB2 aptb2PFMUL[] = {
2306:         { 0x0F0FB4, _r,_mm,_mmm64 },
2307:         { ASM_END }
2308: };
2309: 
2310: PTRNTAB2 aptb2PFNACC[] = {
2311:         { 0x0F0F8A, _r,_mm,_mmm64 },
2312:         { ASM_END }
2313: };
2314: 
2315: PTRNTAB2 aptb2PFPNACC[] = {
2316:         { 0x0F0F8E, _r,_mm,_mmm64 },
2317:         { ASM_END }
2318: };
2319: 
2320: PTRNTAB2 aptb2PFRCP[] = {
2321:         { 0x0F0F96, _r,_mm,_mmm64 },
2322:         { ASM_END }
2323: };
2324: 
2325: PTRNTAB2 aptb2PFRCPIT1[] = {
2326:         { 0x0F0FA6, _r,_mm,_mmm64 },
2327:         { ASM_END }
2328: };
2329: 
2330: PTRNTAB2 aptb2PFRCPIT2[] = {
2331:         { 0x0F0FB6, _r,_mm,_mmm64 },
2332:         { ASM_END }
2333: };
2334: 
2335: PTRNTAB2 aptb2PFRSQIT1[] = {
2336:         { 0x0F0FA7, _r,_mm,_mmm64 },
2337:         { ASM_END }
2338: };
2339: 
2340: PTRNTAB2 aptb2PFRSQRT[] = {
2341:         { 0x0F0F97, _r,_mm,_mmm64 },
2342:         { ASM_END }
2343: };
2344: 
2345: PTRNTAB2 aptb2PFSUB[] = {
2346:         { 0x0F0F9A, _r,_mm,_mmm64 },
2347:         { ASM_END }
2348: };
2349: 
2350: PTRNTAB2 aptb2PFSUBR[] = {
2351:         { 0x0F0FAA, _r,_mm,_mmm64 },
2352:         { ASM_END }
2353: };
2354: 
2355: PTRNTAB2 aptb2PI2FD[] = {
2356:         { 0x0F0F0D, _r,_mm,_mmm64 },
2357:         { ASM_END }
2358: };
2359: 
2360: PTRNTAB2 aptb2PMULHRW[] = {
2361:         { 0x0F0FB7, _r,_mm,_mmm64 },
2362:         { ASM_END }
2363: };
2364: 
2365: PTRNTAB2 aptb2PSWAPD[] = {
2366:         { 0x0F0FBB, _r,_mm,_mmm64 },
2367:         { ASM_END }
2368: };
2369: 
2370: /* ======================= Pentium 4 (Prescott) ======================= */
2371: 
2372: /*
2373:         ADDSUBPD
2374:         ADDSUBPS
2375:         FISTTP
2376:         HADDPD
2377:         HADDPS
2378:         HSUBPD
2379:         HSUBPS
2380:         LDDQU
2381:         MONITOR
2382:         MOVDDUP
2383:         MOVSHDUP
2384:         MOVSLDUP
2385:         MWAIT
2386:  */
2387: 
2388: PTRNTAB0 aptb0MONITOR[] =  /* MONITOR */ {
2389:         { 0x0f01c8, 0 }
2390: };
2391: 
2392: PTRNTAB0 aptb0MWAIT[] =  /* MWAIT */ {
2393:         { 0x0f01c9, 0 }
2394: };
2395: 
2396: PTRNTAB2 aptb2ADDSUBPD[] = /* ADDSUBPD */ {
2397:         { 0x660FD0, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2398:         { ASM_END, 0, 0 }
2399: };
2400: 
2401: PTRNTAB2 aptb2ADDSUBPS[] = /* ADDSUBPS */ {
2402:         { 0xF20FD0, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2403:         { ASM_END, 0, 0 }
2404: };
2405: 
2406: PTRNTAB2 aptb2HADDPD[] = /* HADDPD */ {
2407:         { 0x660F7C, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2408:         { ASM_END, 0, 0 }
2409: };
2410: 
2411: PTRNTAB2 aptb2HADDPS[] = /* HADDPS */ {
2412:         { 0xF20F7C, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2413:         { ASM_END, 0, 0 }
2414: };
2415: 
2416: PTRNTAB2 aptb2HSUBPD[] = /* HSUBPD */ {
2417:         { 0x660F7D, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2418:         { ASM_END, 0, 0 }
2419: };
2420: 
2421: PTRNTAB2 aptb2HSUBPS[] = /* HSUBPS */ {
2422:         { 0xF20F7D, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2423:         { ASM_END, 0, 0 }
2424: };
2425: 
2426: PTRNTAB2 aptb2LDDQU[] = /* LDDQU */ {
2427:         { 0xF20Ff0, _r,_xmm,_m128 },            // xmm1,mem
2428:         { ASM_END, 0, 0 }
2429: };
2430: 
2431: PTRNTAB2 aptb2MOVDDUP[] = /* MOVDDUP */ {
2432:         { 0xF20F12, _r,_xmm,_xmm_m64 },         // xmm1,xmm2/m64
2433:         { ASM_END, 0, 0 }
2434: };
2435: 
2436: PTRNTAB2 aptb2MOVSHDUP[] = /* MOVSHDUP */ {
2437:         { 0xF30F16, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2438:         { ASM_END, 0, 0 }
2439: };
2440: 
2441: PTRNTAB2 aptb2MOVSLDUP[] = /* MOVSLDUP */ {
2442:         { 0xF30F12, _r,_xmm,_xmm_m128 },        // xmm1,xmm2/m128
2443:         { ASM_END, 0, 0 }
2444: };
2445: 
2446: /* ======================= SSSE3 ======================= */
2447: 
2448: /*
2449: palignr
2450: phaddd
2451: phaddw
2452: phaddsw
2453: phsubd
2454: phsubw
2455: phsubsw
2456: pmaddubsw
2457: pmulhrsw
2458: pshufb
2459: pabsb
2460: pabsd
2461: pabsw
2462: psignb
2463: psignd
2464: psignw
2465: */
2466: 
2467: PTRNTAB3 aptb3PALIGNR[] = /* PALIGNR */ {
2468:         { 0x0F3A0F, _r,_mm,_mmm64, _imm8 },
2469:         { 0x660F3A0F, _r,_xmm,_xmm_m128, _imm8 },
2470:         { ASM_END, 0, 0 }
2471: };
2472: 
2473: PTRNTAB2 aptb2PHADDD[] = /* PHADDD */ {
2474:         { 0x0F3802, _r,_mm,_mmm64 },
2475:         { 0x660F3802, _r,_xmm,_xmm_m128 },
2476:         { ASM_END, 0, 0 }
2477: };
2478: 
2479: PTRNTAB2 aptb2PHADDW[] = /* PHADDW */ {
2480:         { 0x0F3801, _r,_mm,_mmm64 },
2481:         { 0x660F3801, _r,_xmm,_xmm_m128 },
2482:         { ASM_END, 0, 0 }
2483: };
2484: 
2485: PTRNTAB2 aptb2PHADDSW[] = /* PHADDSW */ {
2486:         { 0x0F3803, _r,_mm,_mmm64 },
2487:         { 0x660F3803, _r,_xmm,_xmm_m128 },
2488:         { ASM_END, 0, 0 }
2489: };
2490: 
2491: PTRNTAB2 aptb2PHSUBD[] = /* PHSUBD */ {
2492:         { 0x0F3806, _r,_mm,_mmm64 },
2493:         { 0x660F3806, _r,_xmm,_xmm_m128 },
2494:         { ASM_END, 0, 0 }
2495: };
2496: 
2497: PTRNTAB2 aptb2PHSUBW[] = /* PHSUBW */ {
2498:         { 0x0F3805, _r,_mm,_mmm64 },
2499:         { 0x660F3805, _r,_xmm,_xmm_m128 },
2500:         { ASM_END, 0, 0 }
2501: };
2502: 
2503: PTRNTAB2 aptb2PHSUBSW[] = /* PHSUBSW */ {
2504:         { 0x0F3807, _r,_mm,_mmm64 },
2505:         { 0x660F3807, _r,_xmm,_xmm_m128 },
2506:         { ASM_END, 0, 0 }
2507: };
2508: 
2509: PTRNTAB2 aptb2PMADDUBSW[] = /* PMADDUBSW */ {
2510:         { 0x0F3804, _r,_mm,_mmm64 },
2511:         { 0x660F3804, _r,_xmm,_xmm_m128 },
2512:         { ASM_END, 0, 0 }
2513: };
2514: 
2515: PTRNTAB2 aptb2PMULHRSW[] = /* PMULHRSW */ {
2516:         { 0x0F380B, _r,_mm,_mmm64 },
2517:         { 0x660F380B, _r,_xmm,_xmm_m128 },
2518:         { ASM_END, 0, 0 }
2519: };
2520: 
2521: PTRNTAB2 aptb2PSHUFB[] = /* PSHUFB */ {
2522:         { 0x0F3800, _r,_mm,_mmm64 },
2523:         { 0x660F3800, _r,_xmm,_xmm_m128 },
2524:         { ASM_END, 0, 0 }
2525: };
2526: 
2527: PTRNTAB2 aptb2PABSB[] = /* PABSB */ {
2528:         { 0x0F381C, _r,_mm,_mmm64 },
2529:         { 0x660F381C, _r,_xmm,_xmm_m128 },
2530:         { ASM_END, 0, 0 }
2531: };
2532: 
2533: PTRNTAB2 aptb2PABSD[] = /* PABSD */ {
2534:         { 0x0F381E, _r,_mm,_mmm64 },
2535:         { 0x660F381E, _r,_xmm,_xmm_m128 },
2536:         { ASM_END, 0, 0 }
2537: };
2538: 
2539: PTRNTAB2 aptb2PABSW[] = /* PABSW */ {
2540:         { 0x0F381D, _r,_mm,_mmm64 },
2541:         { 0x660F381D, _r,_xmm,_xmm_m128 },
2542:         { ASM_END, 0, 0 }
2543: };
2544: 
2545: PTRNTAB2 aptb2PSIGNB[] = /* PSIGNB */ {
2546:         { 0x0F3808, _r,_mm,_mmm64 },
2547:         { 0x660F3808, _r,_xmm,_xmm_m128 },
2548:         { ASM_END, 0, 0 }
2549: };
2550: 
2551: PTRNTAB2 aptb2PSIGND[] = /* PSIGND */ {
2552:         { 0x0F380A, _r,_mm,_mmm64 },
2553:         { 0x660F380A, _r,_xmm,_xmm_m128 },
2554:         { ASM_END, 0, 0 }
2555: };
2556: 
2557: PTRNTAB2 aptb2PSIGNW[] = /* PSIGNW */ {
2558:         { 0x0F3809, _r,_mm,_mmm64 },
2559:         { 0x660F3809, _r,_xmm,_xmm_m128 },
2560:         { ASM_END, 0, 0 }
2561: };
2562: 
2563: 
2564: /* ======================= SSE4.1 ======================= */
2565: 
2566: /*
2567: blendpd
2568: blendps
2569: blendvpd
2570: blendvps
2571: dppd
2572: dpps
2573: extractps
2574: insertps
2575: movntdqa
2576: mpsadbw
2577: packusdw
2578: pblendvb
2579: pblendw
2580: pcmpeqq
2581: pextrb
2582: pextrd
2583: pextrq
2584: pextrw
2585: phminposuw
2586: pinsrb
2587: pinsrd
2588: pinsrq
2589: pmaxsb
2590: pmaxsd
2591: pmaxud
2592: pmaxuw
2593: pminsb
2594: pminsd
2595: pminud
2596: pminuw
2597: pmovsxbd
2598: pmovsxbq
2599: pmovsxbw
2600: pmovsxwd
2601: pmovsxwq
2602: pmovsxdq
2603: pmovzxbd
2604: pmovzxbq
2605: pmovzxbw
2606: pmovzxwd
2607: pmovzxwq
2608: pmovzxdq
2609: pmuldq
2610: pmulld
2611: ptest
2612: roundpd
2613: roundps
2614: roundsd
2615: roundss
2616:  */
2617: 
2618: PTRNTAB3 aptb3BLENDPD[] = /* BLENDPD */ {
2619:         { 0x660F3A0D, _r, _xmm, _xmm_m128, _imm8 },
2620:         { ASM_END }
2621: };
2622: 
2623: PTRNTAB3 aptb3BLENDPS[] = /* BLENDPS */ {
2624:         { 0x660F3A0C, _r, _xmm, _xmm_m128, _imm8 },
2625:         { ASM_END }
2626: };
2627: 
2628: PTRNTAB3 aptb3BLENDVPD[] = /* BLENDVPD */ {
2629:         { 0x660F3815, _r, _xmm, _xmm_m128, _xmm0 },
2630:         { ASM_END }
2631: };
2632: 
2633: PTRNTAB3 aptb3BLENDVPS[] = /* BLENDVPS */ {
2634:         { 0x660F3814, _r, _xmm, _xmm_m128, _xmm0 },
2635:         { ASM_END }
2636: };
2637: 
2638: PTRNTAB3 aptb3DPPD[] = /* DPPD */ {
2639:         { 0x660F3A41, _r, _xmm, _xmm_m128, _imm8 },
2640:         { ASM_END }
2641: };
2642: 
2643: PTRNTAB3 aptb3DPPS[] = /* DPPS */ {
2644:         { 0x660F3A40, _r, _xmm, _xmm_m128, _imm8 },
2645:         { ASM_END }
2646: };
2647: 
2648: PTRNTAB3 aptb3EXTRACTPS[] = /* EXTRACTPS */ {
2649:         { 0x660F3A17, _r, _rm32, _xmm, _imm8 },
2650:         { ASM_END }
2651: };
2652: 
2653: PTRNTAB3 aptb3INSERTPS[] = /* INSERTPS */ {
2654:         { 0x660F3A21, _r, _xmm, _xmm_m32, _imm8 },
2655:         { ASM_END }
2656: };
2657: 
2658: PTRNTAB2 aptb2MOVNTDQA[] = /* MOVNTDQA */ {
2659:         { 0x660F382A, _r, _xmm, _m128 },
2660:         { ASM_END }
2661: };
2662: 
2663: PTRNTAB3 aptb3MPSADBW[] = /* MPSADBW */ {
2664:         { 0x660F3A42, _r, _xmm, _xmm_m128, _imm8 },
2665:         { ASM_END }
2666: };
2667: 
2668: PTRNTAB2 aptb2PACKUSDW[] = /* PACKUSDW */ {
2669:         { 0x660F382B, _r, _xmm, _xmm_m128 },
2670:         { ASM_END }
2671: };
2672: 
2673: PTRNTAB3 aptb3PBLENDVB[] = /* PBLENDVB */ {
2674:         { 0x660F3810, _r, _xmm, _xmm_m128, _xmm0 },
2675:         { ASM_END }
2676: };
2677: 
2678: PTRNTAB3 aptb3PBLENDW[] = /* PBLENDW */ {
2679:         { 0x660F3A0E, _r, _xmm, _xmm_m128, _imm8 },
2680:         { ASM_END }
2681: };
2682: 
2683: PTRNTAB2 aptb2PCMPEQQ[] = /* PCMPEQQ */ {
2684:         { 0x660F3829, _r, _xmm, _xmm_m128 },
2685:         { ASM_END }
2686: };
2687: 
2688: PTRNTAB3 aptb3PEXTRB[] = /* PEXTRB */ {
2689:         { 0x660F3A14, _r, _r32, _xmm, _imm8 },
2690:         { 0x660F3A14, _r, _r64, _xmm, _imm8 },
2691:         { 0x660F3A14, _r,  _m8, _xmm, _imm8 },
2692:         { ASM_END }
2693: };
2694: 
2695: PTRNTAB3 aptb3PEXTRD[] = /* PEXTRD */ {
2696:         { 0x660F3A16, _r, _rm32, _xmm, _imm8 },
2697:         { ASM_END }
2698: };
2699: 
2700: PTRNTAB3 aptb3PEXTRQ[] = /* PEXTRQ */ {
2701:         { 0x660F3A16, _r|_64_bit, _rm64, _xmm, _imm8 },
2702:         { ASM_END }
2703: };
2704: 
2705: PTRNTAB2 aptb2PHMINPOSUW[] = /* PHMINPOSUW  */ {
2706:         { 0x660F3841, _r, _xmm, _xmm_m128 },
2707:         { ASM_END }
2708: };
2709: 
2710: PTRNTAB3 aptb3PINSRB[] = /* PINSRB */ {
2711:         { 0x660F3A20, _r, _xmm, _r32, _imm8 },
2712:         { 0x660F3A20, _r, _xmm, _rm8, _imm8 },
2713:         { ASM_END }
2714: };
2715: 
2716: PTRNTAB3 aptb3PINSRD[] = /* PINSRD */ {
2717:         { 0x660F3A22, _r, _xmm, _rm32, _imm8 },
2718:         { ASM_END }
2719: };
2720: 
2721: PTRNTAB3 aptb3PINSRQ[] = /* PINSRQ */ {
2722:         { 0x660F3A22, _r|_64_bit, _xmm, _rm64, _imm8 },
2723:         { ASM_END }
2724: };
2725: 
2726: PTRNTAB2 aptb2PMAXSB[] = /* PMAXSB */ {
2727:         { 0x660F383C, _r, _xmm, _xmm_m128 },
2728:         { ASM_END }
2729: };
2730: 
2731: PTRNTAB2 aptb2PMAXSD[] = /* PMAXSD */ {
2732:         { 0x660F383D, _r, _xmm, _xmm_m128 },
2733:         { ASM_END }
2734: };
2735: 
2736: PTRNTAB2 aptb2PMAXUD[] = /* PMAXUD */ {
2737:         { 0x660F383F, _r, _xmm, _xmm_m128 },
2738:         { ASM_END }
2739: };
2740: 
2741: PTRNTAB2 aptb2PMAXUW[] = /* PMAXUW */ {
2742:         { 0x660F383E, _r, _xmm, _xmm_m128 },
2743:         { ASM_END }
2744: };
2745: 
2746: PTRNTAB2 aptb2PMINSB[] = /* PMINSB */ {
2747:         { 0x660F3838, _r, _xmm, _xmm_m128 },
2748:         { ASM_END }
2749: };
2750: 
2751: PTRNTAB2 aptb2PMINSD[] = /* PMINSD */ {
2752:         { 0x660F3839, _r, _xmm, _xmm_m128 },
2753:         { ASM_END }
2754: };
2755: 
2756: PTRNTAB2 aptb2PMINUD[] = /* PMINUD */ {
2757:         { 0x660F383B, _r, _xmm, _xmm_m128 },
2758:         { ASM_END }
2759: };
2760: 
2761: PTRNTAB2 aptb2PMINUW[] = /* PMINUW */ {
2762:         { 0x660F383A, _r, _xmm, _xmm_m128 },
2763:         { ASM_END }
2764: };
2765: 
2766: PTRNTAB2 aptb2PMOVSXBW[] = /* PMOVSXBW */ {
2767:         { 0x660F3820, _r, _xmm, _xmm_m64 },
2768:         { ASM_END }
2769: };
2770: 
2771: PTRNTAB2 aptb2PMOVSXBD[] = /* PMOVSXBD */ {
2772:         { 0x660F3821, _r, _xmm, _xmm_m32 },
2773:         { ASM_END }
2774: };
2775: 
2776: PTRNTAB2 aptb2PMOVSXBQ[] = /* PMOVSXBQ */ {
2777:         { 0x660F3822, _r, _xmm, _xmm_m16 },
2778:         { ASM_END }
2779: };
2780: 
2781: PTRNTAB2 aptb2PMOVSXWD[] = /* PMOVSXWD */ {
2782:         { 0x660F3823, _r, _xmm, _xmm_m64 },
2783:         { ASM_END }
2784: };
2785: 
2786: PTRNTAB2 aptb2PMOVSXWQ[] = /* PMOVSXWQ */ {
2787:         { 0x660F3824, _r, _xmm, _xmm_m32 },
2788:         { ASM_END }
2789: };
2790: 
2791: PTRNTAB2 aptb2PMOVSXDQ[] = /* PMOVSXDQ */ {
2792:         { 0x660F3825, _r, _xmm, _xmm_m64 },
2793:         { ASM_END }
2794: };
2795: 
2796: PTRNTAB2 aptb2PMOVZXBW[] = /* PMOVZXBW */ {
2797:         { 0x660F3830, _r, _xmm, _xmm_m64 },
2798:         { ASM_END }
2799: };
2800: 
2801: PTRNTAB2 aptb2PMOVZXBD[] = /* PMOVZXBD */ {
2802:         { 0x660F3831, _r, _xmm, _xmm_m32 },
2803:         { ASM_END }
2804: };
2805: 
2806: PTRNTAB2 aptb2PMOVZXBQ[] = /* PMOVZXBQ */ {
2807:         { 0x660F3832, _r, _xmm, _xmm_m16 },
2808:         { ASM_END }
2809: };
2810: 
2811: PTRNTAB2 aptb2PMOVZXWD[] = /* PMOVZXWD */ {
2812:         { 0x660F3833, _r, _xmm, _xmm_m64 },
2813:         { ASM_END }
2814: };
2815: 
2816: PTRNTAB2 aptb2PMOVZXWQ[] = /* PMOVZXWQ */ {
2817:         { 0x660F3834, _r, _xmm, _xmm_m32 },
2818:         { ASM_END }
2819: };
2820: 
2821: PTRNTAB2 aptb2PMOVZXDQ[] = /* PMOVZXDQ */ {
2822:         { 0x660F3835, _r, _xmm, _xmm_m64 },
2823:         { ASM_END }
2824: };
2825: 
2826: PTRNTAB2 aptb2PMULDQ[] = /* PMULDQ */ {
2827:         { 0x660F3828, _r, _xmm, _xmm_m128 },
2828:         { ASM_END }
2829: };
2830: 
2831: PTRNTAB2 aptb2PMULLD[] = /* PMULLD */ {
2832:         { 0x660F3840, _r, _xmm, _xmm_m128 },
2833:         { ASM_END }
2834: };
2835: 
2836: PTRNTAB2 aptb2PTEST[] = /* PTEST */ {
2837:         { 0x660F3817, _r, _xmm, _xmm_m128 },
2838:         { ASM_END }
2839: };
2840: 
2841: PTRNTAB3 aptb3ROUNDPD[] = /* ROUNDPD */ {
2842:         { 0x660F3A09, _r, _xmm, _xmm_m128, _imm8 },
2843:         { ASM_END }
2844: };
2845: 
2846: PTRNTAB3 aptb3ROUNDPS[] = /* ROUNDPS */ {
2847:         { 0x660F3A08, _r, _xmm, _xmm_m128, _imm8 },
2848:         { ASM_END }
2849: };
2850: 
2851: PTRNTAB3 aptb3ROUNDSD[] = /* ROUNDSD */ {
2852:         { 0x660F3A0B, _r, _xmm, _xmm_m64, _imm8 },
2853:         { ASM_END }
2854: };
2855: 
2856: PTRNTAB3 aptb3ROUNDSS[] = /* ROUNDSS */ {
2857:         { 0x660F3A0A, _r, _xmm, _xmm_m32, _imm8 },
2858:         { ASM_END }
2859: };
2860: 
2861: /* ======================= SSE4.2 ======================= */
2862: 
2863: /*
2864: crc32
2865: pcmpestri
2866: pcmpestrm
2867: pcmpistri
2868: pcmpistrm
2869: pcmpgtq
2870: popcnt
2871:  */
2872: 
2873: PTRNTAB2 aptb2CRC32[] = /* CRC32 */ {
2874:         { 0xF20F38F0, _r        , _r32, _rm8  },
2875:         { 0xF20F38F0, _r|_64_bit, _r64, _rm8  },
2876:         { 0xF20F38F1, _r|_16_bit, _r32, _rm16 },
2877:         { 0xF20F38F1, _r|_32_bit, _r32, _rm32 },
2878:         { 0xF20F38F1, _r|_64_bit, _r64, _rm64 },
2879:         { ASM_END }
2880: };
2881: 
2882: PTRNTAB3 aptb3PCMPESTRI [] = /* PCMPESTRI */ {
2883:         { 0x660F3A61, _r|_modcx  , _xmm, _xmm_m128, _imm8 },
2884:         { ASM_END }
2885: };
2886: 
2887: PTRNTAB3 aptb3PCMPESTRM [] = /* PCMPESTRM */ {
2888:         { 0x660F3A60, _r|_modxmm0, _xmm, _xmm_m128, _imm8 },
2889:         { ASM_END }
2890: };
2891: 
2892: PTRNTAB3 aptb3PCMPISTRI [] = /* PCMPISTRI */ {
2893:         { 0x660F3A63, _r|_modcx  , _xmm, _xmm_m128, _imm8 },
2894:         { ASM_END }
2895: };
2896: 
2897: PTRNTAB3 aptb3PCMPISTRM [] = /* PCMPISTRM */ {
2898:         { 0x660F3A62, _r|_modxmm0, _xmm, _xmm_m128, _imm8 },
2899:         { ASM_END }
2900: };
2901: 
2902: PTRNTAB2 aptb2PCMPGTQ [] = /* PCMPGTQ */ {
2903:         { 0x660F3837, _r, _xmm, _xmm_m128 },
2904:         { ASM_END }
2905: };
2906: 
2907: PTRNTAB2 aptb2POPCNT [] = /* POPCNT */ {
2908:         { 0xF30FB8, _r|_16_bit, _r16, _rm16 },
2909:         { 0xF30FB8, _r|_32_bit, _r32, _rm32 },
2910:         { 0xF30FB8, _r|_64_bit, _r64, _rm64 },
2911:         { ASM_END }
2912: };
2913: 
2914: /* ======================= VMS ======================= */
2915: 
2916: /*
2917: invept
2918: invvpid
2919: vmcall
2920: vmclear
2921: vmlaunch
2922: vmresume
2923: vmptrld
2924: vmptrst
2925: vmread
2926: vmwrite
2927: vmxoff
2928: vmxon
2929:  */
2930: 
2931: /* ======================= SMX ======================= */
2932: 
2933: /*
2934: getsec
2935:  */
2936: 
2937: 
2938: 
2939: 
2940: //////////////////////////////////////////////////////////////////////
2941: 
2942: 
2943: //
2944: // usNumops should be 0, 1, 2, or 3 other things are added into it
2945: // for flag indications
2946: // 10, 11, 12, and 13 indicate that it is a special prefix
2947: 
2948: // 20, 21, 22, and 23 indicate that this statement is a control transfer
2949: //                      and that a new block should be created when this statement is
2950: //                      finished. (All Jxx and LOOPxx instructions.)
2951: 
2952: // 30, 31, 32, 33 are reserved for instructions where the value of an
2953: // immediate operand controls the code generation.
2954: // 40, 41, 42, 43 are reserved for instructions where all of the operands
2955: // are not required
2956: // 50, 51, 52, 53 are reserved for the rotate and shift instructions that
2957: // have extremely strange encodings for the second operand which is sometimes
2958: // used to select an opcode and then discarded.  The second operand is 0
2959: // if it is immediate 1, _cl for the CL register and _imm8 for the immediate
2960: // 8 operand.  If the operand is an immediate 1 or the cl register, it should
2961: // be discarded and the opcode should be encoded as a 1 operand instruction.
2962: //
2963: //      60, 61, 62, 63  are reserved for floating point coprocessor operations
2964: //
2965: // ITdata is for the DB (_EMIT), DD, DW, DQ, DT pseudo-ops
2966: 
2967: //      BT is a 486 instruction.
2968: //      The encoding is 0f C0+reg and it is always a 32
2969: //      bit operation
2970: 
2971: #define P PPTRNTAB0
2972: 
2973: #if 0
2974: #define OPCODETABLE     \
2975:         X("aaa",        0,              aptb0AAA )
2976: #else
2977: #define OPCODETABLE1    \
2978:         X("__emit",     ITdata | OPdb,  NULL ) \
2979:         X("_emit",      ITdata | OPdb,  NULL ) \
2980:         X("aaa",        0,              aptb0AAA ) \
2981:         X("aad",        0,              aptb0AAD ) \
2982:         X("aam",        0,              aptb0AAM ) \
2983:         X("aas",        0,              aptb0AAS ) \
2984:         X("adc",        2,              (P) aptb2ADC ) \
2985:         X("add",        2,              (P) aptb2ADD ) \
2986:         X("addpd",      2,              (P) aptb2ADDPD ) \
2987:         X("addps",      2,              (P) aptb2ADDPS ) \
2988:         X("addsd",      2,              (P) aptb2ADDSD ) \
2989:         X("addss",      2,              (P) aptb2ADDSS ) \
2990:         X("addsubpd",   2,              (P) aptb2ADDSUBPD ) \
2991:         X("addsubps",   2,              (P) aptb2ADDSUBPS ) \
2992:         X("and",        2,              (P) aptb2AND ) \
2993:         X("andnpd",     2,              (P) aptb2ANDNPD ) \
2994:         X("andnps",     2,              (P) aptb2ANDNPS ) \
2995:         X("andpd",      2,              (P) aptb2ANDPD ) \
2996:         X("andps",      2,              (P) aptb2ANDPS ) \
2997:         X("arpl",       2,              (P) aptb2ARPL ) \
2998:         X("blendpd",    3,              (P) aptb3BLENDPD ) \
2999:         X("blendps",    3,              (P) aptb3BLENDPS ) \
3000:         X("blendvpd",   3,              (P) aptb3BLENDVPD ) \
3001:         X("blendvps",   3,              (P) aptb3BLENDVPS ) \
3002:         X("bound",      2,              (P) aptb2BOUND ) \
3003:         X("bsf",        2,              (P) aptb2BSF ) \
3004:         X("bsr",        2,              (P) aptb2BSR ) \
3005:         X("bswap",      1,              (P) aptb1BSWAP ) \
3006:         X("bt",         2,              (P) aptb2BT ) \
3007:         X("btc",        2,              (P) aptb2BTC ) \
3008:         X("btr",        2,              (P) aptb2BTR ) \
3009:         X("bts",        2,              (P) aptb2BTS ) \
3010:         X("call",       ITjump | 1,     (P) aptb1CALL ) \
3011:         X("cbw",        0,              aptb0CBW ) \
3012:         X("cdq",        0,              aptb0CDQ ) \
3013:         X("cdqe",       0,              aptb0CDQE ) \
3014:         X("clc",        0,              aptb0CLC ) \
3015:         X("cld",        0,              aptb0CLD ) \
3016:         X("clflush",    1,              (P) aptb1CLFLUSH ) \
3017:         X("cli",        0,              aptb0CLI ) \
3018:         X("clts",       0,              aptb0CLTS ) \
3019:         X("cmc",        0,              aptb0CMC ) \
3020:         X("cmova",      2,              (P) aptb2CMOVNBE ) \
3021:         X("cmovae",     2,              (P) aptb2CMOVNB ) \
3022:         X("cmovb",      2,              (P) aptb2CMOVB ) \
3023:         X("cmovbe",     2,              (P) aptb2CMOVBE ) \
3024:         X("cmovc",      2,              (P) aptb2CMOVB ) \
3025:         X("cmove",      2,              (P) aptb2CMOVZ ) \
3026:         X("cmovg",      2,              (P) aptb2CMOVNLE ) \
3027:         X("cmovge",     2,              (P) aptb2CMOVNL ) \
3028:         X("cmovl",      2,              (P) aptb2CMOVL ) \
3029:         X("cmovle",     2,              (P) aptb2CMOVLE ) \
3030:         X("cmovna",     2,              (P) aptb2CMOVBE ) \
3031:         X("cmovnae",    2,              (P) aptb2CMOVB ) \
3032:         X("cmovnb",     2,              (P) aptb2CMOVNB ) \
3033:         X("cmovnbe",    2,              (P) aptb2CMOVNBE ) \
3034:         X("cmovnc",     2,              (P) aptb2CMOVNB ) \
3035:         X("cmovne",     2,              (P) aptb2CMOVNZ ) \
3036:         X("cmovng",     2,              (P) aptb2CMOVLE ) \
3037:         X("cmovnge",    2,              (P) aptb2CMOVL ) \
3038:         X("cmovnl",     2,              (P) aptb2CMOVNL ) \
3039:         X("cmovnle",    2,              (P) aptb2CMOVNLE ) \
3040:         X("cmovno",     2,              (P) aptb2CMOVNO ) \
3041:         X("cmovnp",     2,              (P) aptb2CMOVNP ) \
3042:         X("cmovns",     2,              (P) aptb2CMOVNS ) \
3043:         X("cmovnz",     2,              (P) aptb2CMOVNZ ) \
3044:         X("cmovo",      2,              (P) aptb2CMOVO ) \
3045:         X("cmovp",      2,              (P) aptb2CMOVP ) \
3046:         X("cmovpe",     2,              (P) aptb2CMOVP ) \
3047:         X("cmovpo",     2,              (P) aptb2CMOVNP ) \
3048:         X("cmovs",      2,              (P) aptb2CMOVS ) \
3049:         X("cmovz",      2,              (P) aptb2CMOVZ ) \
3050:         X("cmp",        2,              (P) aptb2CMP ) \
3051:         X("cmppd",      3,              (P) aptb3CMPPD ) \
3052:         X("cmpps",      3,              (P) aptb3CMPPS ) \
3053:         X("cmps",       2,              (P) aptb2CMPS ) \
3054:         X("cmpsb",      0,              aptb0CMPSB ) \
3055:         /*X("cmpsd",    0,              aptb0CMPSD )*/ \
3056:         X("cmpsd",      ITopt|3,        (P) aptb3CMPSD ) \
3057:         X("cmpsq",      0,              aptb0CMPSQ ) \
3058:         X("cmpss",      3,              (P) aptb3CMPSS ) \
3059:         X("cmpsw",      0,              aptb0CMPSW ) \
3060:         X("cmpxchg",    2,              (P) aptb2CMPXCHG ) \
3061:         X("cmpxchg16b", 1,              (P) aptb1CMPXCH16B ) \
3062:         X("cmpxchg8b",  1,              (P) aptb1CMPXCH8B ) \
3063:         X("comisd",     2,              (P) aptb2COMISD ) \
3064:         X("comiss",     2,              (P) aptb2COMISS ) \
3065:         X("cpuid",      0,              aptb0CPUID ) \
3066:         X("cqo",        0,              aptb0CQO ) \
3067:         X("crc32",      2,              (P) aptb2CRC32 ) \
3068:         X("cvtdq2pd",   2,              (P) aptb2CVTDQ2PD ) \
3069:         X("cvtdq2ps",   2,              (P) aptb2CVTDQ2PS ) \
3070:         X("cvtpd2dq",   2,              (P) aptb2CVTPD2DQ ) \
3071:         X("cvtpd2pi",   2,              (P) aptb2CVTPD2PI ) \
3072:         X("cvtpd2ps",   2,              (P) aptb2CVTPD2PS ) \
3073:         X("cvtpi2pd",   2,              (P) aptb2CVTPI2PD ) \
3074:         X("cvtpi2ps",   2,              (P) aptb2CVTPI2PS ) \
3075:         X("cvtps2dq",   2,              (P) aptb2CVTPS2DQ ) \
3076:         X("cvtps2pd",   2,              (P) aptb2CVTPS2PD ) \
3077:         X("cvtps2pi",   2,              (P) aptb2CVTPS2PI ) \
3078:         X("cvtsd2si",   2,              (P) aptb2CVTSD2SI ) \
3079:         X("cvtsd2ss",   2,              (P) aptb2CVTSD2SS ) \
3080:         X("cvtsi2sd",   2,              (P) aptb2CVTSI2SD ) \
3081:         X("cvtsi2ss",   2,              (P) aptb2CVTSI2SS ) \
3082:         X("cvtss2sd",   2,              (P) aptb2CVTSS2SD ) \
3083:         X("cvtss2si",   2,              (P) aptb2CVTSS2SI ) \
3084:         X("cvttpd2dq",  2,              (P) aptb2CVTTPD2DQ ) \
3085:         X("cvttpd2pi",  2,              (P) aptb2CVTTPD2PI ) \
3086:         X("cvttps2dq",  2,              (P) aptb2CVTTPS2DQ ) \
3087:         X("cvttps2pi",  2,              (P) aptb2CVTTPS2PI ) \
3088:         X("cvttsd2si",  2,              (P) aptb2CVTTSD2SI ) \
3089:         X("cvttss2si",  2,              (P) aptb2CVTTSS2SI ) \
3090:         X("cwd",        0,              aptb0CWD ) \
3091:         X("cwde",       0,              aptb0CWDE ) \
3092:         X("da",         ITaddr | 4,     NULL ) \
3093:         X("daa",        0,              aptb0DAA ) \
3094:         X("das",        0,              aptb0DAS ) \
3095:         X("db",         ITdata | OPdb,  NULL ) \
3096:         X("dd",         ITdata | OPdd,  NULL ) \
3097:         X("de",         ITdata | OPde,  NULL ) \
3098:         X("dec",        1,              (P) aptb1DEC ) \
3099:         X("df",         ITdata | OPdf,  NULL ) \
3100:         X("di",         ITdata | OPdi,  NULL ) \
3101:         X("div",        ITopt  | 2,     (P) aptb2DIV ) \
3102:         X("divpd",      2,              (P) aptb2DIVPD ) \
3103:         X("divps",      2,              (P) aptb2DIVPS ) \
3104:         X("divsd",      2,              (P) aptb2DIVSD ) \
3105:         X("divss",      2,              (P) aptb2DIVSS ) \
3106:         X("dl",         ITdata | OPdl,  NULL ) \
3107:         X("dppd",       3,              (P) aptb3DPPD ) \
3108:         X("dpps",       3,              (P) aptb3DPPS ) \
3109:         X("dq",         ITdata | OPdq,  NULL ) \
3110:         X("ds",         ITdata | OPds,  NULL ) \
3111:         X("dt",         ITdata | OPdt,  NULL ) \
3112:         X("dw",         ITdata | OPdw,  NULL ) \
3113:         X("emms",       0,              aptb0EMMS ) \
3114:         X("enter",      2,              (P) aptb2ENTER ) \
3115:         X("extractps",  3,              (P) aptb3EXTRACTPS ) \
3116:         X("f2xm1",      ITfloat | 0,    aptb0F2XM1 ) \
3117:         X("fabs",       ITfloat | 0,    aptb0FABS ) \
3118:         X("fadd",       ITfloat | 2,    (P) aptb2FADD ) \
3119:         X("faddp",      ITfloat | 2,    (P) aptb2FADDP ) \
3120:         X("fbld",       ITfloat | 1,    (P) aptb1FBLD ) \
3121:         X("fbstp",      ITfloat | 1,    (P) aptb1FBSTP ) \
3122:         X("fchs",       ITfloat | 0,    aptb0FCHS ) \
3123:         X("fclex",      ITfloat | 0,    aptb0FCLEX ) \
3124:         X("fcmovb",     ITfloat | 2,    (P) aptb2FCMOVB ) \
3125:         X("fcmovbe",    ITfloat | 2,    (P) aptb2FCMOVBE ) \
3126:         X("fcmove",     ITfloat | 2,    (P) aptb2FCMOVE ) \
3127:         X("fcmovnb",    ITfloat | 2,    (P) aptb2FCMOVNB ) \
3128:         X("fcmovnbe",   ITfloat | 2,    (P) aptb2FCMOVNBE ) \
3129:         X("fcmovne",    ITfloat | 2,    (P) aptb2FCMOVNE ) \
3130:         X("fcmovnu",    ITfloat | 2,    (P) aptb2FCMOVNU ) \
3131:         X("fcmovu",     ITfloat | 2,    (P) aptb2FCMOVU ) \
3132:         X("fcom",       ITfloat | 1,    (P) aptb1FCOM ) \
3133:         X("fcomi",      ITfloat | 2,    (P) aptb2FCOMI ) \
3134:         X("fcomip",     ITfloat | 2,    (P) aptb2FCOMIP ) \
3135:         X("fcomp",      ITfloat | 1,    (P) aptb1FCOMP ) \
3136:         X("fcompp",     ITfloat | 0,    aptb0FCOMPP ) \
3137:         X("fcos",       ITfloat | 0,    aptb0FCOS ) \
3138:         X("fdecstp",    ITfloat | 0,    aptb0FDECSTP ) \
3139:         X("fdisi",      ITfloat | 0,    aptb0FDISI ) \
3140:         X("fdiv",       ITfloat | 2,    (P) aptb2FDIV ) \
3141:         X("fdivp",      ITfloat | 2,    (P) aptb2FDIVP ) \
3142:         X("fdivr",      ITfloat | 2,    (P) aptb2FDIVR ) \
3143:         X("fdivrp",     ITfloat | 2,    (P) aptb2FDIVRP ) \
3144:         X("feni",       ITfloat | 0,    aptb0FENI ) \
3145:         X("ffree",      ITfloat | 1,    (P) aptb1FFREE ) \
3146:         X("fiadd",      ITfloat | 2,    (P) aptb2FIADD ) \
3147:         X("ficom",      ITfloat | 1,    (P) aptb1FICOM ) \
3148:         X("ficomp",     ITfloat | 1,    (P) aptb1FICOMP ) \
3149:         X("fidiv",      ITfloat | 2,    (P) aptb2FIDIV ) \
3150:         X("fidivr",     ITfloat | 2,    (P) aptb2FIDIVR ) \
3151:         X("fild",       ITfloat | 1,    (P) aptb1FILD ) \
3152:         X("fimul",      ITfloat | 2,    (P) aptb2FIMUL ) \
3153:         X("fincstp",    ITfloat | 0,    aptb0FINCSTP ) \
3154:         X("finit",      ITfloat | 0,    aptb0FINIT ) \
3155:         X("fist",       ITfloat | 1,    (P) aptb1FIST ) \
3156:         X("fistp",      ITfloat | 1,    (P) aptb1FISTP ) \
3157:         X("fisttp",     ITfloat | 1,    (P) aptb1FISTTP ) \
3158:         X("fisub",      ITfloat | 2,    (P) aptb2FISUB ) \
3159:         X("fisubr",     ITfloat | 2,    (P) aptb2FISUBR ) \
3160:         X("fld",        ITfloat | 1,    (P) aptb1FLD ) \
3161:         X("fld1",       ITfloat | 0,    aptb0FLD1 ) \
3162:         X("fldcw",      ITfloat | 1,    (P) aptb1FLDCW ) \
3163:         X("fldenv",     ITfloat | 1,    (P) aptb1FLDENV ) \
3164:         X("fldl2e",     ITfloat | 0,    aptb0FLDL2E ) \
3165:         X("fldl2t",     ITfloat | 0,    aptb0FLDL2T ) \
3166:         X("fldlg2",     ITfloat | 0,    aptb0FLDLG2 ) \
3167:         X("fldln2",     ITfloat | 0,    aptb0FLDLN2 ) \
3168:         X("fldpi",      ITfloat | 0,    aptb0FLDPI ) \
3169:         X("fldz",       ITfloat | 0,    aptb0FLDZ ) \
3170:         X("fmul",       ITfloat | 2,    (P) aptb2FMUL ) \
3171:         X("fmulp",      ITfloat | 2,    (P) aptb2FMULP ) \
3172:         X("fnclex",     ITfloat | 0,    aptb0FNCLEX ) \
3173:         X("fndisi",     ITfloat | 0,    aptb0FNDISI ) \
3174:         X("fneni",      ITfloat | 0,    aptb0FNENI ) \
3175:         X("fninit",     ITfloat | 0,    aptb0FNINIT ) \
3176:         X("fnop",       ITfloat | 0,    aptb0FNOP ) \
3177:         X("fnsave",     ITfloat | 1,    (P) aptb1FNSAVE ) \
3178:         X("fnstcw",     ITfloat | 1,    (P) aptb1FNSTCW ) \
3179:         X("fnstenv",    ITfloat | 1,    (P) aptb1FNSTENV ) \
3180:         X("fnstsw",     1,              (P) aptb1FNSTSW ) \
3181:         X("fpatan",     ITfloat | 0,    aptb0FPATAN ) \
3182:         X("fprem",      ITfloat | 0,    aptb0FPREM ) \
3183:         X("fprem1",     ITfloat | 0,    aptb0FPREM1 ) \
3184:         X("fptan",      ITfloat | 0,    aptb0FPTAN ) \
3185:         X("frndint",    ITfloat | 0,    aptb0FRNDINT ) \
3186:         X("frstor",     ITfloat | 1,    (P) aptb1FRSTOR ) \
3187:         X("fsave",      ITfloat | 1,    (P) aptb1FSAVE ) \
3188:         X("fscale",     ITfloat | 0,    aptb0FSCALE ) \
3189:         X("fsetpm",     ITfloat | 0,    aptb0FSETPM ) \
3190:         X("fsin",       ITfloat | 0,    aptb0FSIN ) \
3191:         X("fsincos",    ITfloat | 0,    aptb0FSINCOS ) \
3192:         X("fsqrt",      ITfloat | 0,    aptb0FSQRT ) \
3193:         X("fst",        ITfloat | 1,    (P) aptb1FST ) \
3194:         X("fstcw",      ITfloat | 1,    (P) aptb1FSTCW ) \
3195:         X("fstenv",     ITfloat | 1,    (P) aptb1FSTENV ) \
3196:         X("fstp",       ITfloat | 1,    (P) aptb1FSTP ) \
3197:         X("fstsw",      1,              (P) aptb1FSTSW ) \
3198:         X("fsub",       ITfloat | 2,    (P) aptb2FSUB ) \
3199:         X("fsubp",      ITfloat | 2,    (P) aptb2FSUBP ) \
3200:         X("fsubr",      ITfloat | 2,    (P) aptb2FSUBR ) \
3201:         X("fsubrp",     ITfloat | 2,    (P) aptb2FSUBRP ) \
3202:         X("ftst",       ITfloat | 0,    aptb0FTST ) \
3203:         X("fucom",      ITfloat | 1,    (P) aptb1FUCOM ) \
3204:         X("fucomi",     ITfloat | 2,    (P) aptb2FUCOMI ) \
3205:         X("fucomip",    ITfloat | 2,    (P) aptb2FUCOMIP ) \
3206:         X("fucomp",     ITfloat | 1,    (P) aptb1FUCOMP ) \
3207:         X("fucompp",    ITfloat | 0,    aptb0FUCOMPP ) \
3208:         X("fwait",      ITfloat | 0,    aptb0FWAIT ) \
3209:         X("fxam",       ITfloat | 0,    aptb0FXAM ) \
3210:         X("fxch",       ITfloat | 1,    (P) aptb1FXCH ) \
3211:         X("fxrstor",    ITfloat | 1,    (P) aptb1FXRSTOR ) \
3212:         X("fxsave",     ITfloat | 1,    (P) aptb1FXSAVE ) \
3213:         X("fxtract",    ITfloat | 0,    aptb0FXTRACT ) \
3214:         X("fyl2x",      ITfloat | 0,    aptb0FYL2X ) \
3215:         X("fyl2xp1",    ITfloat | 0,    aptb0FYL2XP1 ) \
3216:         X("haddpd",     2,              (P) aptb2HADDPD ) \
3217:         X("haddps",     2,              (P) aptb2HADDPS ) \
3218:         X("hlt",        0,              aptb0HLT ) \
3219:         X("hsubpd",     2,              (P) aptb2HSUBPD ) \
3220:         X("hsubps",     2,              (P) aptb2HSUBPS ) \
3221:         X("idiv",       ITopt | 2,      (P) aptb2IDIV ) \
3222:         X("imul",       ITopt | 3,      (P) aptb3IMUL ) \
3223:         X("in",         2,              (P) aptb2IN ) \
3224:         X("inc",        1,              (P) aptb1INC ) \
3225:         X("ins",        2,              (P) aptb2INS ) \
3226:         X("insb",       0,              aptb0INSB ) \
3227:         X("insd",       0,              aptb0INSD ) \
3228:         X("insertps",   3,              (P) aptb3INSERTPS ) \
3229:         X("insw",       0,              aptb0INSW ) \
3230:         X("int",        ITimmed | 1,    (P) aptb1INT ) \
3231:         X("into",       0,              aptb0INTO ) \
3232:         X("invd",       0,              aptb0INVD ) \
3233:         X("invlpg",     1,              (P) aptb1INVLPG ) \
3234:         X("iret",       0,              aptb0IRET ) \
3235:         X("iretd",      0,              aptb0IRETD ) \
3236:         X("ja",         ITjump | 1,     (P) aptb1JNBE ) \
3237:         X("jae",        ITjump | 1,     (P) aptb1JNB ) \
3238:         X("jb",         ITjump | 1,     (P) aptb1JB ) \
3239:         X("jbe",        ITjump | 1,     (P) aptb1JBE ) \
3240:         X("jc",         ITjump | 1,     (P) aptb1JB ) \
3241:         X("jcxz",       ITjump | 1,     (P) aptb1JCXZ ) \
3242:         X("je",         ITjump | 1,     (P) aptb1JZ ) \
3243:         X("jecxz",      ITjump | 1,     (P) aptb1JECXZ ) \
3244:         X("jg",         ITjump | 1,     (P) aptb1JNLE ) \
3245:         X("jge",        ITjump | 1,     (P) aptb1JNL ) \
3246:         X("jl",         ITjump | 1,     (P) aptb1JL ) \
3247:         X("jle",        ITjump | 1,     (P) aptb1JLE ) \
3248:         X("jmp",        ITjump | 1,     (P) aptb1JMP ) \
3249:         X("jna",        ITjump | 1,     (P) aptb1JBE ) \
3250:         X("jnae",       ITjump | 1,     (P) aptb1JB ) \
3251:         X("jnb",        ITjump | 1,     (P) aptb1JNB ) \
3252:         X("jnbe",       ITjump | 1,     (P) aptb1JNBE ) \
3253:         X("jnc",        ITjump | 1,     (P) aptb1JNB ) \
3254:         X("jne",        ITjump | 1,     (P) aptb1JNZ ) \
3255:         X("jng",        ITjump | 1,     (P) aptb1JLE ) \
3256:         X("jnge",       ITjump | 1,     (P) aptb1JL ) \
3257:         X("jnl",        ITjump | 1,     (P) aptb1JNL ) \
3258:         X("jnle",       ITjump | 1,     (P) aptb1JNLE ) \
3259:         X("jno",        ITjump | 1,     (P) aptb1JNO ) \
3260:         X("jnp",        ITjump | 1,     (P) aptb1JNP ) \
3261:         X("jns",        ITjump | 1,     (P) aptb1JNS ) \
3262:         X("jnz",        ITjump | 1,     (P) aptb1JNZ ) \
3263:         X("jo",         ITjump | 1,     (P) aptb1JO ) \
3264:         X("jp",         ITjump | 1,     (P) aptb1JP ) \
3265:         X("jpe",        ITjump | 1,     (P) aptb1JP ) \
3266:         X("jpo",        ITjump | 1,     (P) aptb1JNP ) \
3267:         X("js",         ITjump | 1,     (P) aptb1JS ) \
3268:         X("jz",         ITjump | 1,     (P) aptb1JZ ) \
3269: 
3270: 
3271: #define OPCODETABLE2    \
3272:         X("lahf",       0,              aptb0LAHF ) \
3273:         X("lar",        2,              (P) aptb2LAR ) \
3274:         X("lddqu",      2,              (P) aptb2LDDQU ) \
3275:         X("ldmxcsr",    1,              (P) aptb1LDMXCSR ) \
3276:         X("lds",        2,              (P) aptb2LDS ) \
3277:         X("lea",        2,              (P) aptb2LEA ) \
3278:         X("leave",      0,              aptb0LEAVE ) \
3279:         X("les",        2,              (P) aptb2LES ) \
3280:         X("lfence",     0,              aptb0LFENCE) \
3281:         X("lfs",        2,              (P) aptb2LFS ) \
3282:         X("lgdt",       1,              (P) aptb1LGDT ) \
3283:         X("lgs",        2,              (P) aptb2LGS ) \
3284:         X("lidt",       1,              (P) aptb1LIDT ) \
3285:         X("lldt",       1,              (P) aptb1LLDT ) \
3286:         X("lmsw",       1,              (P) aptb1LMSW ) \
3287:         X("lock",       ITprefix | 0,   aptb0LOCK ) \
3288:         X("lods",       1,              (P) aptb1LODS ) \
3289:         X("lodsb",      0,              aptb0LODSB ) \
3290:         X("lodsd",      0,              aptb0LODSD ) \
3291:         X("lodsq",      0,              aptb0LODSQ ) \
3292:         X("lodsw",      0,              aptb0LODSW ) \
3293:         X("loop",       ITjump | 1,     (P) aptb1LOOP ) \
3294:         X("loope",      ITjump | 1,     (P) aptb1LOOPE ) \
3295:         X("loopne",     ITjump | 1,     (P) aptb1LOOPNE ) \
3296:         X("loopnz",     ITjump | 1,     (P) aptb1LOOPNE ) \
3297:         X("loopz",      ITjump | 1,     (P) aptb1LOOPE ) \
3298:         X("lsl",        2,              (P) aptb2LSL ) \
3299:         X("lss",        2,              (P) aptb2LSS ) \
3300:         X("ltr",        1,              (P) aptb1LTR ) \
3301:         X("maskmovdqu", 2,              (P) aptb2MASKMOVDQU ) \
3302:         X("maskmovq",   2,              (P) aptb2MASKMOVQ ) \
3303:         X("maxpd",      2,              (P) aptb2MAXPD ) \
3304:         X("maxps",      2,              (P) aptb2MAXPS ) \
3305:         X("maxsd",      2,              (P) aptb2MAXSD ) \
3306:         X("maxss",      2,              (P) aptb2MAXSS ) \
3307:         X("mfence",     0,              aptb0MFENCE) \
3308:         X("minpd",      2,              (P) aptb2MINPD ) \
3309:         X("minps",      2,              (P) aptb2MINPS ) \
3310:         X("minsd",      2,              (P) aptb2MINSD ) \
3311:         X("minss",      2,              (P) aptb2MINSS ) \
3312:         X("monitor",    0,              (P) aptb0MONITOR ) \
3313:         X("mov",        2,              (P) aptb2MOV ) \
3314:         X("movapd",     2,              (P) aptb2MOVAPD ) \
3315:         X("movaps",     2,              (P) aptb2MOVAPS ) \
3316:         X("movd",       2,              (P) aptb2MOVD ) \
3317:         X("movddup",    2,              (P) aptb2MOVDDUP ) \
3318:         X("movdq2q",    2,              (P) aptb2MOVDQ2Q ) \
3319:         X("movdqa",     2,              (P) aptb2MOVDQA ) \
3320:         X("movdqu",     2,              (P) aptb2MOVDQU ) \
3321:         X("movhlps",    2,              (P) aptb2MOVHLPS ) \
3322:         X("movhpd",     2,              (P) aptb2MOVHPD ) \
3323:         X("movhps",     2,              (P) aptb2MOVHPS ) \
3324:         X("movlhps",    2,              (P) aptb2MOVLHPS ) \
3325:         X("movlpd",     2,              (P) aptb2MOVLPD ) \
3326:         X("movlps",     2,              (P) aptb2MOVLPS ) \
3327:         X("movmskpd",   2,              (P) aptb2MOVMSKPD ) \
3328:         X("movmskps",   2,              (P) aptb2MOVMSKPS ) \
3329:         X("movntdq",    2,              (P) aptb2MOVNTDQ ) \
3330:         X("movntdqa",   2,              (P) aptb2MOVNTDQA ) \
3331:         X("movnti",     2,              (P) aptb2MOVNTI ) \
3332:         X("movntpd",    2,              (P) aptb2MOVNTPD ) \
3333:         X("movntps",    2,              (P) aptb2MOVNTPS ) \
3334:         X("movntq",     2,              (P) aptb2MOVNTQ ) \
3335:         X("movq",       2,              (P) aptb2MOVQ ) \
3336:         X("movq2dq",    2,              (P) aptb2MOVQ2DQ ) \
3337:         X("movs",       2,              (P) aptb2MOVS ) \
3338:         X("movsb",      0,              aptb0MOVSB ) \
3339:         X("movsd",      ITopt | 2,      (P) aptb2MOVSD ) \
3340:         X("movshdup",   2,              (P) aptb2MOVSHDUP ) \
3341:         X("movsldup",   2,              (P) aptb2MOVSLDUP ) \
3342:         X("movsq",      0,              aptb0MOVSQ ) \
3343:         X("movss",      2,              (P) aptb2MOVSS ) \
3344:         X("movsw",      0,              aptb0MOVSW ) \
3345:         X("movsx",      2,              (P) aptb2MOVSX ) \
3346:         X("movupd",     2,              (P) aptb2MOVUPD ) \
3347:         X("movups",     2,              (P) aptb2MOVUPS ) \
3348:         X("movzx",      2,              (P) aptb2MOVZX ) \
3349:         X("mpsadbw",    3,              (P) aptb3MPSADBW ) \
3350:         X("mul",        ITopt | 2,      (P) aptb2MUL ) \
3351:         X("mulpd",      2,              (P) aptb2MULPD ) \
3352:         X("mulps",      2,              (P) aptb2MULPS ) \
3353:         X("mulsd",      2,              (P) aptb2MULSD ) \
3354:         X("mulss",      2,              (P) aptb2MULSS ) \
3355:         X("mwait",      0,              (P) aptb0MWAIT ) \
3356:         X("neg",        1,              (P) aptb1NEG ) \
3357:         X("nop",        0,              aptb0NOP ) \
3358:         X("not",        1,              (P) aptb1NOT ) \
3359:         X("or",         2,              (P) aptb2OR ) \
3360:         X("orpd",       2,              (P) aptb2ORPD ) \
3361:         X("orps",       2,              (P) aptb2ORPS ) \
3362:         X("out",        2,              (P) aptb2OUT ) \
3363:         X("outs",       2,              (P) aptb2OUTS ) \
3364:         X("outsb",      0,              aptb0OUTSB ) \
3365:         X("outsd",      0,              aptb0OUTSD ) \
3366:         X("outsw",      0,              aptb0OUTSW ) \
3367:         X("pabsb",      2,              (P) aptb2PABSB ) \
3368:         X("pabsd",      2,              (P) aptb2PABSD ) \
3369:         X("pabsw",      2,              (P) aptb2PABSW ) \
3370:         X("packssdw",   2,              (P) aptb2PACKSSDW ) \
3371:         X("packsswb",   2,              (P) aptb2PACKSSWB ) \
3372:         X("packusdw",   2,              (P) aptb2PACKUSDW ) \
3373:         X("packuswb",   2,              (P) aptb2PACKUSWB ) \
3374:         X("paddb",      2,              (P) aptb2PADDB ) \
3375:         X("paddd",      2,              (P) aptb2PADDD ) \
3376:         X("paddq",      2,              (P) aptb2PADDQ ) \
3377:         X("paddsb",     2,              (P) aptb2PADDSB ) \
3378:         X("paddsw",     2,              (P) aptb2PADDSW ) \
3379:         X("paddusb",    2,              (P) aptb2PADDUSB ) \
3380:         X("paddusw",    2,              (P) aptb2PADDUSW ) \
3381:         X("paddw",      2,              (P) aptb2PADDW ) \
3382:         X("palignr",    3,              (P) aptb3PALIGNR ) \
3383:         X("pand",       2,              (P) aptb2PAND ) \
3384:         X("pandn",      2,              (P) aptb2PANDN ) \
3385:         /* X("pause",   0,              aptb0PAUSE) */ \
3386:         X("pavgb",      2,              (P) aptb2PAVGB ) \
3387:         X("pavgusb",    2,              (P) aptb2PAVGUSB ) \
3388:         X("pavgw",      2,              (P) aptb2PAVGW ) \
3389:         X("pblendvb",   3,              (P) aptb3PBLENDVB ) \
3390:         X("pblendw",    3,              (P) aptb3PBLENDW ) \
3391:         X("pcmpeqb",    2,              (P) aptb2PCMPEQB ) \
3392:         X("pcmpeqd",    2,              (P) aptb2PCMPEQD ) \
3393:         X("pcmpeqq",    2,              (P) aptb2PCMPEQQ ) \
3394:         X("pcmpeqw",    2,              (P) aptb2PCMPEQW ) \
3395:         X("pcmpestri",  3,              (P) aptb3PCMPESTRI ) \
3396:         X("pcmpestrm",  3,              (P) aptb3PCMPESTRM ) \
3397:         X("pcmpgtb",    2,              (P) aptb2PCMPGTB ) \
3398:         X("pcmpgtd",    2,              (P) aptb2PCMPGTD ) \
3399:         X("pcmpgtq",    2,              (P) aptb2PCMPGTQ ) \
3400:         X("pcmpgtw",    2,              (P) aptb2PCMPGTW ) \
3401:         X("pcmpistri",  3,              (P) aptb3PCMPISTRI ) \
3402:         X("pcmpistrm",  3,              (P) aptb3PCMPISTRM ) \
3403:         X("pextrb",     3,              (P) aptb3PEXTRB ) \
3404:         X("pextrd",     3,              (P) aptb3PEXTRD ) \
3405:         X("pextrq",     3,              (P) aptb3PEXTRQ ) \
3406:         X("pextrw",     3,              (P) aptb3PEXTRW ) \
3407:         X("pf2id",      2,              (P) aptb2PF2ID ) \
3408:         X("pfacc",      2,              (P) aptb2PFACC ) \
3409:         X("pfadd",      2,              (P) aptb2PFADD ) \
3410:         X("pfcmpeq",    2,              (P) aptb2PFCMPEQ ) \
3411:         X("pfcmpge",    2,              (P) aptb2PFCMPGE ) \
3412:         X("pfcmpgt",    2,              (P) aptb2PFCMPGT ) \
3413:         X("pfmax",      2,              (P) aptb2PFMAX ) \
3414:         X("pfmin",      2,              (P) aptb2PFMIN ) \
3415:         X("pfmul",      2,              (P) aptb2PFMUL ) \
3416:         X("pfnacc",     2,              (P) aptb2PFNACC ) \
3417:         X("pfpnacc",    2,              (P) aptb2PFPNACC ) \
3418:         X("pfrcp",      2,              (P) aptb2PFRCP ) \
3419:         X("pfrcpit1",   2,              (P) aptb2PFRCPIT1 ) \
3420:         X("pfrcpit2",   2,              (P) aptb2PFRCPIT2 ) \
3421:         X("pfrsqit1",   2,              (P) aptb2PFRSQIT1 ) \
3422:         X("pfrsqrt",    2,              (P) aptb2PFRSQRT ) \
3423:         X("pfsub",      2,              (P) aptb2PFSUB ) \
3424:         X("pfsubr",     2,              (P) aptb2PFSUBR ) \
3425:         X("phaddd",     2,              (P) aptb2PHADDD ) \
3426:         X("phaddsw",    2,              (P) aptb2PHADDSW ) \
3427:         X("phaddw",     2,              (P) aptb2PHADDW ) \
3428:         X("phminposuw", 2,              (P) aptb2PHMINPOSUW ) \
3429:         X("phsubd",     2,              (P) aptb2PHSUBD ) \
3430:         X("phsubsw",    2,              (P) aptb2PHSUBSW ) \
3431:         X("phsubw",     2,              (P) aptb2PHSUBW ) \
3432:         X("pi2fd",      2,              (P) aptb2PI2FD ) \
3433:         X("pinsrb",     3,              (P) aptb3PINSRB ) \
3434:         X("pinsrd",     3,              (P) aptb3PINSRD ) \
3435:         X("pinsrq",     3,              (P) aptb3PINSRQ ) \
3436:         X("pinsrw",     3,              (P) aptb3PINSRW ) \
3437:         X("pmaddubsw",  2,              (P) aptb2PMADDUBSW ) \
3438:         X("pmaddwd",    2,              (P) aptb2PMADDWD ) \
3439:         X("pmaxsb",     2,              (P) aptb2PMAXSB ) \
3440:         X("pmaxsd",     2,              (P) aptb2PMAXSD ) \
3441:         X("pmaxsw",     2,              (P) aptb2PMAXSW ) \
3442:         X("pmaxub",     2,              (P) aptb2PMAXUB ) \
3443:         X("pmaxud",     2,              (P) aptb2PMAXUD ) \
3444:         X("pmaxuw",     2,              (P) aptb2PMAXUW ) \
3445:         X("pminsb",     2,              (P) aptb2PMINSB ) \
3446:         X("pminsd",     2,              (P) aptb2PMINSD ) \
3447:         X("pminsw",     2,              (P) aptb2PMINSW ) \
3448:         X("pminub",     2,              (P) aptb2PMINUB ) \
3449:         X("pminud",     2,              (P) aptb2PMINUD ) \
3450:         X("pminuw",     2,              (P) aptb2PMINUW ) \
3451:         X("pmovmskb",   2,              (P) aptb2PMOVMSKB ) \
3452:         X("pmovsxbd",   2,              (P) aptb2PMOVSXBD ) \
3453:         X("pmovsxbq",   2,              (P) aptb2PMOVSXBQ ) \
3454:         X("pmovsxbw",   2,              (P) aptb2PMOVSXBW ) \
3455:         X("pmovsxdq",   2,              (P) aptb2PMOVSXDQ ) \
3456:         X("pmovsxwd",   2,              (P) aptb2PMOVSXWD ) \
3457:         X("pmovsxwq",   2,              (P) aptb2PMOVSXWQ ) \
3458:         X("pmovzxbd",   2,              (P) aptb2PMOVZXBD ) \
3459:         X("pmovzxbq",   2,              (P) aptb2PMOVZXBQ ) \
3460:         X("pmovzxbw",   2,              (P) aptb2PMOVZXBW ) \
3461:         X("pmovzxdq",   2,              (P) aptb2PMOVZXDQ ) \
3462:         X("pmovzxwd",   2,              (P) aptb2PMOVZXWD ) \
3463:         X("pmovzxwq",   2,              (P) aptb2PMOVZXWQ ) \
3464:         X("pmuldq",     2,              (P) aptb2PMULDQ ) \
3465:         X("pmulhrsw",   2,              (P) aptb2PMULHRSW ) \
3466:         X("pmulhrw",    2,              (P) aptb2PMULHRW ) \
3467:         X("pmulhuw",    2,              (P) aptb2PMULHUW ) \
3468:         X("pmulhw",     2,              (P) aptb2PMULHW ) \
3469:         X("pmulld",     2,              (P) aptb2PMULLD ) \
3470:         X("pmullw",     2,              (P) aptb2PMULLW ) \
3471:         X("pmuludq",    2,              (P) aptb2PMULUDQ ) \
3472:         X("pop",        1,              (P) aptb1POP ) \
3473:         X("popa",       0,              aptb0POPA ) \
3474:         X("popad",      0,              aptb0POPAD ) \
3475:         X("popcnt",     2,              (P) aptb2POPCNT ) \
3476:         X("popf",       0,              aptb0POPF ) \
3477:         X("popfd",      0,              aptb0POPFD ) \
3478:         X("popfq",      0,              aptb0POPFQ ) \
3479:         X("por",        2,              (P) aptb2POR ) \
3480:         X("prefetchnta",1,              (P) aptb1PREFETCHNTA ) \
3481:         X("prefetcht0", 1,              (P) aptb1PREFETCHT0 ) \
3482:         X("prefetcht1", 1,              (P) aptb1PREFETCHT1 ) \
3483:         X("prefetcht2", 1,              (P) aptb1PREFETCHT2 ) \
3484:         X("psadbw",     2,              (P) aptb2PSADBW ) \
3485:         X("pshufb",     2,              (P) aptb2PSHUFB ) \
3486:         X("pshufd",     3,              (P) aptb3PSHUFD ) \
3487:         X("pshufhw",    3,              (P) aptb3PSHUFHW ) \
3488:         X("pshuflw",    3,              (P) aptb3PSHUFLW ) \
3489:         X("pshufw",     3,              (P) aptb3PSHUFW ) \
3490:         X("psignb",     2,              (P) aptb2PSIGNB ) \
3491:         X("psignd",     2,              (P) aptb2PSIGND ) \
3492:         X("psignw",     2,              (P) aptb2PSIGNW ) \
3493:         X("pslld",      2,              (P) aptb2PSLLD ) \
3494:         X("pslldq",     2,              (P) aptb2PSLLDQ ) \
3495:         X("psllq",      2,              (P) aptb2PSLLQ ) \
3496:         X("psllw",      2,              (P) aptb2PSLLW ) \
3497:         X("psrad",      2,              (P) aptb2PSRAD ) \
3498:         X("psraw",      2,              (P) aptb2PSRAW ) \
3499:         X("psrld",      2,              (P) aptb2PSRLD ) \
3500:         X("psrldq",     2,              (P) aptb2PSRLDQ ) \
3501:         X("psrlq",      2,              (P) aptb2PSRLQ ) \
3502:         X("psrlw",      2,              (P) aptb2PSRLW ) \
3503:         X("psubb",      2,              (P) aptb2PSUBB ) \
3504:         X("psubd",      2,              (P) aptb2PSUBD ) \
3505:         X("psubq",      2,              (P) aptb2PSUBQ ) \
3506:         X("psubsb",     2,              (P) aptb2PSUBSB ) \
3507:         X("psubsw",     2,              (P) aptb2PSUBSW ) \
3508:         X("psubusb",    2,              (P) aptb2PSUBUSB ) \
3509:         X("psubusw",    2,              (P) aptb2PSUBUSW ) \
3510:         X("psubw",      2,              (P) aptb2PSUBW ) \
3511:         X("pswapd",     2,              (P) aptb2PSWAPD ) \
3512:         X("ptest",      2,              (P) aptb2PTEST ) \
3513:         X("punpckhbw",  2,              (P) aptb2PUNPCKHBW ) \
3514:         X("punpckhdq",  2,              (P) aptb2PUNPCKHDQ ) \
3515:         X("punpckhqdq", 2,              (P) aptb2PUNPCKHQDQ ) \
3516:         X("punpckhwd",  2,              (P) aptb2PUNPCKHWD ) \
3517:         X("punpcklbw",  2,              (P) aptb2PUNPCKLBW ) \
3518:         X("punpckldq",  2,              (P) aptb2PUNPCKLDQ ) \
3519:         X("punpcklqdq", 2,              (P) aptb2PUNPCKLQDQ ) \
3520:         X("punpcklwd",  2,              (P) aptb2PUNPCKLWD ) \
3521:         X("push",       1,              (P) aptb1PUSH ) \
3522:         X("pusha",      0,              aptb0PUSHA ) \
3523:         X("pushad",     0,              aptb0PUSHAD ) \
3524:         X("pushf",      0,              aptb0PUSHF ) \
3525:         X("pushfd",     0,              aptb0PUSHFD ) \
3526:         X("pushfq",     0,              aptb0PUSHFQ ) \
3527:         X("pxor",       2,              (P) aptb2PXOR ) \
3528:         X("rcl",        ITshift | 2,    (P) aptb2RCL ) \
3529:         X("rcpps",      2,              (P) aptb2RCPPS ) \
3530:         X("rcpss",      2,              (P) aptb2RCPSS ) \
3531:         X("rcr",        ITshift | 2,    (P) aptb2RCR ) \
3532:         X("rdmsr",      0,              aptb0RDMSR ) \
3533:         X("rdpmc",      0,              aptb0RDPMC ) \
3534:         X("rdtsc",      0,              aptb0RDTSC ) \
3535:         X("rep",        ITprefix | 0,   aptb0REP ) \
3536:         X("repe",       ITprefix | 0,   aptb0REP ) \
3537:         X("repne",      ITprefix | 0,   aptb0REPNE ) \
3538:         X("repnz",      ITprefix | 0,   aptb0REPNE ) \
3539:         X("repz",       ITprefix | 0,   aptb0REP ) \
3540:         X("ret",        ITopt | 1,      (P) aptb1RET ) \
3541:         X("retf",       ITopt | 1,      (P) aptb1RETF ) \
3542:         X("rol",        ITshift | 2,    (P) aptb2ROL ) \
3543:         X("ror",        ITshift | 2,    (P) aptb2ROR ) \
3544:         X("roundpd",    3,              (P) aptb3ROUNDPD ) \
3545:         X("roundps",    3,              (P) aptb3ROUNDPS ) \
3546:         X("roundsd",    3,              (P) aptb3ROUNDSD ) \
3547:         X("roundss",    3,              (P) aptb3ROUNDSS ) \
3548:         X("rsm",        0,              aptb0RSM ) \
3549:         X("rsqrtps",    2,              (P) aptb2RSQRTPS ) \
3550:         X("rsqrtss",    2,              (P) aptb2RSQRTSS ) \
3551:         X("sahf",       0,              aptb0SAHF ) \
3552:         X("sal",        ITshift | 2,    (P) aptb2SHL ) \
3553:         X("sar",        ITshift | 2,    (P) aptb2SAR ) \
3554:         X("sbb",        2,              (P) aptb2SBB ) \
3555:         X("scas",       1,              (P) aptb1SCAS ) \
3556:         X("scasb",      0,              aptb0SCASB ) \
3557:         X("scasd",      0,              aptb0SCASD ) \
3558:         X("scasq",      0,              aptb0SCASQ ) \
3559:         X("scasw",      0,              aptb0SCASW ) \
3560:         X("seta",       1,              (P) aptb1SETNBE ) \
3561:         X("setae",      1,              (P) aptb1SETNB ) \
3562:         X("setb",       1,              (P) aptb1SETB ) \
3563:         X("setbe",      1,              (P) aptb1SETBE ) \
3564:         X("setc",       1,              (P) aptb1SETB ) \
3565:         X("sete",       1,              (P) aptb1SETZ ) \
3566:         X("setg",       1,              (P) aptb1SETNLE ) \
3567:         X("setge",      1,              (P) aptb1SETNL ) \
3568:         X("setl",       1,              (P) aptb1SETL ) \
3569:         X("setle",      1,              (P) aptb1SETLE ) \
3570:         X("setna",      1,              (P) aptb1SETBE ) \
3571:         X("setnae",     1,              (P) aptb1SETB ) \
3572:         X("setnb",      1,              (P) aptb1SETNB ) \
3573:         X("setnbe",     1,              (P) aptb1SETNBE ) \
3574:         X("setnc",      1,              (P) aptb1SETNB ) \
3575:         X("setne",      1,              (P) aptb1SETNZ ) \
3576:         X("setng",      1,              (P) aptb1SETLE ) \
3577:         X("setnge",     1,              (P) aptb1SETL ) \
3578:         X("setnl",      1,              (P) aptb1SETNL ) \
3579:         X("setnle",     1,              (P) aptb1SETNLE ) \
3580:         X("setno",      1,              (P) aptb1SETNO ) \
3581:         X("setnp",      1,              (P) aptb1SETNP ) \
3582:         X("setns",      1,              (P) aptb1SETNS ) \
3583:         X("setnz",      1,              (P) aptb1SETNZ ) \
3584:         X("seto",       1,              (P) aptb1SETO ) \
3585:         X("setp",       1,              (P) aptb1SETP ) \
3586:         X("setpe",      1,              (P) aptb1SETP ) \
3587:         X("setpo",      1,              (P) aptb1SETNP ) \
3588:         X("sets",       1,              (P) aptb1SETS ) \
3589:         X("setz",       1,              (P) aptb1SETZ ) \
3590:         X("sfence",     0,              aptb0SFENCE) \
3591:         X("sgdt",       1,              (P) aptb1SGDT ) \
3592:         X("shl",        ITshift | 2,    (P) aptb2SHL ) \
3593:         X("shld",       3,              (P) aptb3SHLD ) \
3594:         X("shr",        ITshift | 2,    (P) aptb2SHR ) \
3595:         X("shrd",       3,              (P) aptb3SHRD ) \
3596:         X("shufpd",     3,              (P) aptb3SHUFPD ) \
3597:         X("shufps",     3,              (P) aptb3SHUFPS ) \
3598:         X("sidt",       1,              (P) aptb1SIDT ) \
3599:         X("sldt",       1,              (P) aptb1SLDT ) \
3600:         X("smsw",       1,              (P) aptb1SMSW ) \
3601:         X("sqrtpd",     2,              (P) aptb2SQRTPD ) \
3602:         X("sqrtps",     2,              (P) aptb2SQRTPS ) \
3603:         X("sqrtsd",     2,              (P) aptb2SQRTSD ) \
3604:         X("sqrtss",     2,              (P) aptb2SQRTSS ) \
3605:         X("stc",        0,              aptb0STC ) \
3606:         X("std",        0,              aptb0STD ) \
3607:         X("sti",        0,              aptb0STI ) \
3608:         X("stmxcsr",    1,              (P) aptb1STMXCSR ) \
3609:         X("stos",       1,              (P) aptb1STOS ) \
3610:         X("stosb",      0,              aptb0STOSB ) \
3611:         X("stosd",      0,              aptb0STOSD ) \
3612:         X("stosq",      0,              aptb0STOSQ ) \
3613:         X("stosw",      0,              aptb0STOSW ) \
3614:         X("str",        1,              (P) aptb1STR ) \
3615:         X("sub",        2,              (P) aptb2SUB ) \
3616:         X("subpd",      2,              (P) aptb2SUBPD ) \
3617:         X("subps",      2,              (P) aptb2SUBPS ) \
3618:         X("subsd",      2,              (P) aptb2SUBSD ) \
3619:         X("subss",      2,              (P) aptb2SUBSS ) \
3620:         X("syscall",    0,              aptb0SYSCALL ) \
3621:         X("sysenter",   0,              aptb0SYSENTER ) \
3622:         X("sysexit",    0,              aptb0SYSEXIT ) \
3623:         X("sysret",     0,              aptb0SYSRET ) \
3624:         X("test",       2,              (P) aptb2TEST ) \
3625:         X("ucomisd",    2,              (P) aptb2UCOMISD ) \
3626:         X("ucomiss",    2,              (P) aptb2UCOMISS ) \
3627:         X("ud2",        0,              aptb0UD2 ) \
3628:         X("unpckhpd",   2,              (P) aptb2UNPCKHPD ) \
3629:         X("unpckhps",   2,              (P) aptb2UNPCKHPS ) \
3630:         X("unpcklpd",   2,              (P) aptb2UNPCKLPD ) \
3631:         X("unpcklps",   2,              (P) aptb2UNPCKLPS ) \
3632:         X("verr",       1,              (P) aptb1VERR ) \
3633:         X("verw",       1,              (P) aptb1VERW ) \
3634:         X("wait",       0,              aptb0WAIT ) \
3635:         X("wbinvd",     0,              aptb0WBINVD ) \
3636:         X("wrmsr",      0,              aptb0WRMSR ) \
3637:         X("xadd",       2,              (P) aptb2XADD ) \
3638:         X("xchg",       2,              (P) aptb2XCHG ) \
3639:         X("xlat",       ITopt | 1,      (P) aptb1XLAT ) \
3640:         X("xlatb",      0,              aptb0XLATB ) \
3641:         X("xor",        2,              (P) aptb2XOR ) \
3642:         X("xorpd",      2,              (P) aptb2XORPD ) \
3643:         X("xorps",      2,              (P) aptb2XORPS ) \
3644: 
3645: #endif
3646: 
3647: static const char *opcodestr[] =
3648: {
3649:     #define X(a,b,c)    a,
3650:         OPCODETABLE1
3651:         OPCODETABLE2
3652:     #undef X
3653: };
3654: 
3655: static OP optab[] =
3656: {
3657:     #define X(a,b,c)    b,c,
3658:         OPCODETABLE1
3659:         OPCODETABLE2
3660:     #undef X
3661: };
3662: 
3663: 
3664: /*******************************
3665:  */
3666: 
3667: const char *asm_opstr(OP *pop)
3668: {
3669:     return opcodestr[pop - optab];
3670: }
3671: 
3672: /*******************************
3673:  */
3674: 
3675: OP *asm_op_lookup(const char *s)
3676: {
3677:     int i;
3678:     char szBuf[12];
3679: 
3680:     //dbg_printf("asm_op_lookup('%s')\n",s);
3681:     if (strlen(s) >= sizeof(szBuf))
3682:         return NULL;
3683:     strcpy(szBuf,s);
warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : see declaration of 'strcpy'
3684: #if SCPP 3685: strlwr(szBuf); 3686: #endif 3687: 3688: i = binary(szBuf,opcodestr,sizeof(opcodestr)/sizeof(opcodestr[0])); 3689: return (i == -1) ? NULL : &optab[i]; 3690: } 3691: 3692: /******************************* 3693: */ 3694: 3695: void init_optab() 3696: { int i;
warning C4101: 'i' : unreferenced local variable
3697: 3698: #ifdef DEBUG 3699: for (i = 0; i < arraysize(opcodestr) - 1; i++) 3700: { 3701: if (strcmp(opcodestr[i],opcodestr[i + 1]) >= 0) 3702: { 3703: dbg_printf("opcodestr[%d] = '%s', [%d] = '%s'\n",i,opcodestr[i],i + 1,opcodestr[i + 1]); 3704: assert(0); 3705: } 3706: } 3707: #endif 3708: } 3709: 3710: 3711: 3712: #endif // !SPP 3713: