Kaynağa Gözat

+ initial release of x86-64 target code

florian 23 yıl önce
ebeveyn
işleme
52dbda43c3

+ 1808 - 0
compiler/x86_64/aasmcpu.pas

@@ -0,0 +1,1808 @@
+{
+    $Id$
+    Copyright (c) 1998-2002 by Florian Klaempfl and Peter Vreman
+
+    Contains the abstract assembler implementation for the i386
+
+    * Portions of this code was inspired by the NASM sources
+      The Netwide Assembler is Copyright (c) 1996 Simon Tatham and
+      Julian Hall. All rights reserved.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit aasmcpu;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+      cclasses,globals,verbose,
+      cpuinfo,cpubase,
+      aasmbase,aasmtai;
+
+    const
+    { Operand types }
+      OT_NONE      = $00000000;
+
+      OT_BITS8     = $00000001;  { size, and other attributes, of the operand  }
+      OT_BITS16    = $00000002;
+      OT_BITS32    = $00000004;
+      OT_BITS64    = $00000008;  { FPU only  }
+      OT_BITS80    = $00000010;
+      OT_FAR       = $00000020;  { this means 16:16 or 16:32, like in CALL/JMP }
+      OT_NEAR      = $00000040;
+      OT_SHORT     = $00000080;
+
+      OT_SIZE_MASK = $000000FF;  { all the size attributes  }
+      OT_NON_SIZE  = longint(not OT_SIZE_MASK);
+
+      OT_SIGNED    = $00000100;  { the operand need to be signed -128-127 }
+
+      OT_TO        = $00000200;  { operand is followed by a colon  }
+                                 { reverse effect in FADD, FSUB &c  }
+      OT_COLON     = $00000400;
+
+      OT_REGISTER  = $00001000;
+      OT_IMMEDIATE = $00002000;
+      OT_IMM8      = $00002001;
+      OT_IMM16     = $00002002;
+      OT_IMM32     = $00002004;
+      OT_IMM64     = $00002008;
+      OT_IMM80     = $00002010;
+      OT_REGMEM    = $00200000;  { for r/m, ie EA, operands  }
+      OT_REGNORM   = $00201000;  { 'normal' reg, qualifies as EA  }
+      OT_REG8      = $00201001;
+      OT_REG16     = $00201002;
+      OT_REG32     = $00201004;
+      OT_REG64     = $00201008;
+      OT_MMXREG    = $00201008;  { MMX registers  }
+      OT_XMMREG    = $00201010;  { Katmai registers  }
+      OT_MEMORY    = $00204000;  { register number in 'basereg'  }
+      OT_MEM8      = $00204001;
+      OT_MEM16     = $00204002;
+      OT_MEM32     = $00204004;
+      OT_MEM64     = $00204008;
+      OT_MEM80     = $00204010;
+      OT_FPUREG    = $01000000;  { floating point stack registers  }
+      OT_FPU0      = $01000800;  { FPU stack register zero  }
+      OT_REG_SMASK = $00070000;  { special register operands: these may be treated differently  }
+                                 { a mask for the following  }
+      OT_REG_ACCUM = $00211000;  { accumulator: AL, AX or EAX  }
+      OT_REG_AL    = $00211001;    { REG_ACCUM | BITSxx  }
+      OT_REG_AX    = $00211002;    { ditto  }
+      OT_REG_EAX   = $00211004;    { and again  }
+      OT_REG_RAX   = $00211008;
+      OT_REG_COUNT = $00221000;  { counter: CL, CX or ECX  }
+      OT_REG_CL    = $00221001;    { REG_COUNT | BITSxx  }
+      OT_REG_CX    = $00221002;    { ditto  }
+      OT_REG_ECX   = $00221004;    { another one  }
+      OT_REG_RCX   = $00221008;
+      OT_REG_DX    = $00241002;
+      OT_REG_RIP   = OT_REG64;     { subject to be changed FK }
+
+      OT_REG_SREG  = $00081002;  { any segment register  }
+      OT_REG_CS    = $01081002;  { CS  }
+      OT_REG_DESS  = $02081002;  { DS, ES, SS (non-CS 86 registers)  }
+      OT_REG_FSGS  = $04081002;  { FS, GS (386 extended registers)  }
+
+      OT_REG_CDT   = $00101004;  { CRn, DRn and TRn  }
+      OT_REG_CREG  = $08101004;  { CRn  }
+      OT_REG_CR4   = $08101404;  { CR4 (Pentium only)  }
+      OT_REG_DREG  = $10101004;  { DRn  }
+      OT_REG_TREG  = $20101004;  { TRn  }
+
+      OT_MEM_OFFS  = $00604000;  { special type of EA  }
+                                 { simple [address] offset  }
+      OT_ONENESS   = $00800000;  { special type of immediate operand  }
+                                 { so UNITY == IMMEDIATE | ONENESS  }
+      OT_UNITY     = $00802000;  { for shift/rotate instructions  }
+
+      { Size of the instruction table converted by nasmconv.pas }
+      instabentries = {$i i386nop.inc}
+      maxinfolen    = 8;
+
+    type
+      TOperandOrder = (op_intel,op_att);
+
+      tinsentry=packed record
+        opcode  : tasmop;
+        ops     : byte;
+        optypes : array[0..2] of longint;
+        code    : array[0..maxinfolen] of char;
+        flags   : longint;
+      end;
+      pinsentry=^tinsentry;
+
+      { alignment for operator }
+      tai_align = class(tai_align_abstract)
+         reg       : tregister;
+         constructor create(b:byte);
+         constructor create_op(b: byte; _op: byte);
+         function getfillbuf:pchar;override;
+      end;
+
+      taicpu = class(taicpu_abstract)
+         opsize    : topsize;
+         constructor op_none(op : tasmop;_size : topsize);
+
+         constructor op_reg(op : tasmop;_size : topsize;_op1 : tregister);
+         constructor op_const(op : tasmop;_size : topsize;_op1 : aword);
+         constructor op_ref(op : tasmop;_size : topsize;const _op1 : treference);
+
+         constructor op_reg_reg(op : tasmop;_size : topsize;_op1,_op2 : tregister);
+         constructor op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;const _op2 : treference);
+         constructor op_reg_const(op:tasmop; _size: topsize; _op1: tregister; _op2: aword);
+
+         constructor op_const_reg(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister);
+         constructor op_const_const(op : tasmop;_size : topsize;_op1,_op2 : aword);
+         constructor op_const_ref(op : tasmop;_size : topsize;_op1 : aword;const _op2 : treference);
+
+         constructor op_ref_reg(op : tasmop;_size : topsize;const _op1 : treference;_op2 : tregister);
+
+         constructor op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
+         constructor op_const_reg_reg(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister;_op3 : tregister);
+         constructor op_const_ref_reg(op : tasmop;_size : topsize;_op1 : aword;const _op2 : treference;_op3 : tregister);
+         constructor op_reg_reg_ref(op : tasmop;_size : topsize;_op1,_op2 : tregister; const _op3 : treference);
+         constructor op_const_reg_ref(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister;const _op3 : treference);
+
+         { this is for Jmp instructions }
+         constructor op_cond_sym(op : tasmop;cond:TAsmCond;_size : topsize;_op1 : tasmsymbol);
+
+         constructor op_sym(op : tasmop;_size : topsize;_op1 : tasmsymbol);
+         constructor op_sym_ofs(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint);
+         constructor op_sym_ofs_reg(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint;_op2 : tregister);
+         constructor op_sym_ofs_ref(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint;const _op2 : treference);
+
+         procedure changeopsize(siz:topsize);
+
+         function  GetString:string;
+         procedure CheckNonCommutativeOpcodes;
+      private
+         FOperandOrder : TOperandOrder;
+         procedure init(_size : topsize); { this need to be called by all constructor }
+    {$ifndef NOAG386BIN}
+      public
+         { the next will reset all instructions that can change in pass 2 }
+         procedure ResetPass1;
+         procedure ResetPass2;
+         function  CheckIfValid:boolean;
+         function  Pass1(offset:longint):longint;virtual;
+         procedure Pass2(sec:TAsmObjectdata);virtual;
+         procedure SetOperandOrder(order:TOperandOrder);
+      private
+         { next fields are filled in pass1, so pass2 is faster }
+         insentry  : PInsEntry;
+         insoffset,
+         inssize   : longint;
+         LastInsOffset : longint; { need to be public to be reset }
+         function  InsEnd:longint;
+         procedure create_ot;
+         function  Matches(p:PInsEntry):longint;
+         function  calcsize(p:PInsEntry):longint;
+         procedure gencode(sec:TAsmObjectData);
+         function  NeedAddrPrefix(opidx:byte):boolean;
+         procedure Swatoperands;
+    {$endif NOAG386BIN}
+      end;
+
+
+    procedure InitAsm;
+    procedure DoneAsm;
+
+
+implementation
+
+     uses
+       cutils,
+       agx64att;
+
+{*****************************************************************************
+                              Instruction table
+*****************************************************************************}
+
+    const
+     {Instruction flags }
+       IF_NONE   = $00000000;
+       IF_SM     = $00000001;        { size match first two operands  }
+       IF_SM2    = $00000002;
+       IF_SB     = $00000004;  { unsized operands can't be non-byte  }
+       IF_SW     = $00000008;  { unsized operands can't be non-word  }
+       IF_SD     = $00000010;  { unsized operands can't be nondword  }
+       IF_AR0    = $00000020;  { SB, SW, SD applies to argument 0  }
+       IF_AR1    = $00000040;  { SB, SW, SD applies to argument 1  }
+       IF_AR2    = $00000060;  { SB, SW, SD applies to argument 2  }
+       IF_ARMASK = $00000060;  { mask for unsized argument spec  }
+       IF_PRIV   = $00000100;  { it's a privileged instruction  }
+       IF_SMM    = $00000200;  { it's only valid in SMM  }
+       IF_PROT   = $00000400;  { it's protected mode only  }
+       IF_UNDOC  = $00001000;  { it's an undocumented instruction  }
+       IF_FPU    = $00002000;  { it's an FPU instruction  }
+       IF_MMX    = $00004000;  { it's an MMX instruction  }
+       IF_3DNOW  = $00008000;  { it's a 3DNow! instruction  }
+       IF_SSE    = $00010000;  { it's a SSE (KNI, MMX2) instruction  }
+       IF_PMASK  = longint($FF000000);  { the mask for processor types  }
+       IF_PFMASK = longint($F001FF00);  { the mask for disassembly "prefer"  }
+       IF_8086   = $00000000;  { 8086 instruction  }
+       IF_186    = $01000000;  { 186+ instruction  }
+       IF_286    = $02000000;  { 286+ instruction  }
+       IF_386    = $03000000;  { 386+ instruction  }
+       IF_486    = $04000000;  { 486+ instruction  }
+       IF_PENT   = $05000000;  { Pentium instruction  }
+       IF_P6     = $06000000;  { P6 instruction  }
+       IF_KATMAI = $07000000;  { Katmai instructions  }
+       IF_CYRIX  = $10000000;  { Cyrix-specific instruction  }
+       IF_AMD    = $20000000;  { AMD-specific instruction  }
+       { added flags }
+       IF_PRE    = $40000000;  { it's a prefix instruction }
+       IF_PASS2  = longint($80000000);  { if the instruction can change in a second pass }
+
+     type
+       TInsTabCache=array[TasmOp] of longint;
+       PInsTabCache=^TInsTabCache;
+
+     const
+       InsTab:array[0..instabentries-1] of TInsEntry={$i x86_64ta.inc}
+
+     var
+       InsTabCache : PInsTabCache;
+
+     const
+       { Intel style operands ! }
+       opsize_2_type:array[0..2,topsize] of longint=(
+         (OT_NONE,
+          OT_BITS8,OT_BITS16,OT_BITS32,OT_BITS16,OT_BITS32,OT_BITS32,
+          OT_BITS16,OT_BITS32,OT_BITS64,
+          OT_BITS32,OT_BITS64,OT_BITS80,OT_BITS64,OT_BITS64,OT_BITS64,
+          OT_NEAR,OT_FAR,OT_SHORT
+         ),
+         (OT_NONE,
+          OT_BITS8,OT_BITS16,OT_BITS32,OT_BITS8,OT_BITS8,OT_BITS16,
+          OT_BITS16,OT_BITS32,OT_BITS64,
+          OT_BITS32,OT_BITS64,OT_BITS80,OT_BITS64,OT_BITS64,OT_BITS64,
+          OT_NEAR,OT_FAR,OT_SHORT
+         ),
+         (OT_NONE,
+          OT_BITS8,OT_BITS16,OT_BITS32,OT_NONE,OT_NONE,OT_NONE,
+          OT_BITS16,OT_BITS32,OT_BITS64,
+          OT_BITS32,OT_BITS64,OT_BITS80,OT_BITS64,OT_BITS64,OT_BITS64,
+          OT_NEAR,OT_FAR,OT_SHORT
+         )
+       );
+
+       { Convert reg to operand type }
+       reg2type : array[firstreg..lastreg] of longint = (OT_NONE,
+         OT_REG_RAX,OT_REG_RCX,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,
+         OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG64,OT_REG_RIP,
+         OT_REG_EAX,OT_REG_ECX,OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,
+         OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,OT_REG32,
+         OT_REG_AX,OT_REG_CX,OT_REG_DX,OT_REG16,OT_REG16,OT_REG16,OT_REG16,OT_REG16,
+         OT_REG16,OT_REG16,OT_REG16,OT_REG16,OT_REG16,OT_REG16,OT_REG16,OT_REG16,
+         OT_REG_AL,OT_REG_CL,OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,
+         OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,OT_REG8,
+         OT_REG8,OT_REG8,OT_REG8,OT_REG8,
+         OT_REG_CS,OT_REG_DESS,OT_REG_DESS,OT_REG_DESS,OT_REG_FSGS,OT_REG_FSGS,
+         OT_FPU0,OT_FPU0,OT_FPUREG,OT_FPUREG,OT_FPUREG,OT_FPUREG,OT_FPUREG,OT_FPUREG,OT_FPUREG,
+         OT_REG_DREG,OT_REG_DREG,OT_REG_DREG,OT_REG_DREG,OT_REG_DREG,OT_REG_DREG,
+         OT_REG_CREG,OT_REG_CREG,OT_REG_CREG,OT_REG_CR4,
+         OT_REG_TREG,OT_REG_TREG,OT_REG_TREG,OT_REG_TREG,OT_REG_TREG,
+         OT_MMXREG,OT_MMXREG,OT_MMXREG,OT_MMXREG,OT_MMXREG,OT_MMXREG,OT_MMXREG,OT_MMXREG,
+         OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,
+         OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG,OT_XMMREG
+       );
+
+
+{****************************************************************************
+                              TAI_ALIGN
+ ****************************************************************************}
+
+    constructor tai_align.create(b: byte);
+      begin
+        inherited create(b);
+        reg := R_ECX;
+      end;
+
+
+    constructor tai_align.create_op(b: byte; _op: byte);
+      begin
+        inherited create_op(b,_op);
+        reg := R_NO;
+      end;
+
+
+    function tai_align.getfillbuf:pchar;
+      const
+        alignarray:array[0..5] of string[8]=(
+          #$8D#$B4#$26#$00#$00#$00#$00,
+          #$8D#$B6#$00#$00#$00#$00,
+          #$8D#$74#$26#$00,
+          #$8D#$76#$00,
+          #$89#$F6,
+          #$90
+        );
+      var
+        bufptr : pchar;
+        j : longint;
+      begin
+        if not use_op then
+         begin
+           bufptr:=@buf;
+           while (fillsize>0) do
+            begin
+              for j:=0 to 5 do
+               if (fillsize>=length(alignarray[j])) then
+                break;
+              move(alignarray[j][1],bufptr^,length(alignarray[j]));
+              inc(bufptr,length(alignarray[j]));
+              dec(fillsize,length(alignarray[j]));
+            end;
+         end;
+        getfillbuf:=pchar(@buf);
+      end;
+
+
+{*****************************************************************************
+                                 Taicpu Constructors
+*****************************************************************************}
+
+    procedure taicpu.changeopsize(siz:topsize);
+      begin
+        opsize:=siz;
+      end;
+
+
+    procedure taicpu.init(_size : topsize);
+      begin
+         { default order is att }
+         FOperandOrder:=op_att;
+         segprefix:=R_NO;
+         opsize:=_size;
+{$ifndef NOAG386BIN}
+         insentry:=nil;
+         LastInsOffset:=-1;
+         InsOffset:=0;
+         InsSize:=0;
+{$endif}
+      end;
+
+
+    constructor taicpu.op_none(op : tasmop;_size : topsize);
+      begin
+         inherited create(op);
+         init(_size);
+      end;
+
+
+    constructor taicpu.op_reg(op : tasmop;_size : topsize;_op1 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=1;
+         loadreg(0,_op1);
+      end;
+
+
+    constructor taicpu.op_const(op : tasmop;_size : topsize;_op1 : aword);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=1;
+         loadconst(0,_op1);
+      end;
+
+
+    constructor taicpu.op_ref(op : tasmop;_size : topsize;const _op1 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=1;
+         loadref(0,_op1);
+      end;
+
+
+    constructor taicpu.op_reg_reg(op : tasmop;_size : topsize;_op1,_op2 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadreg(0,_op1);
+         loadreg(1,_op2);
+      end;
+
+
+    constructor taicpu.op_reg_const(op:tasmop; _size: topsize; _op1: tregister; _op2: aword);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadreg(0,_op1);
+         loadconst(1,_op2);
+      end;
+
+
+    constructor taicpu.op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;const _op2 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadreg(0,_op1);
+         loadref(1,_op2);
+      end;
+
+
+    constructor taicpu.op_const_reg(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadconst(0,_op1);
+         loadreg(1,_op2);
+      end;
+
+
+    constructor taicpu.op_const_const(op : tasmop;_size : topsize;_op1,_op2 : aword);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadconst(0,_op1);
+         loadconst(1,_op2);
+      end;
+
+
+    constructor taicpu.op_const_ref(op : tasmop;_size : topsize;_op1 : aword;const _op2 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadconst(0,_op1);
+         loadref(1,_op2);
+      end;
+
+
+    constructor taicpu.op_ref_reg(op : tasmop;_size : topsize;const _op1 : treference;_op2 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadref(0,_op1);
+         loadreg(1,_op2);
+      end;
+
+
+    constructor taicpu.op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=3;
+         loadreg(0,_op1);
+         loadreg(1,_op2);
+         loadreg(2,_op3);
+      end;
+
+
+    constructor taicpu.op_const_reg_reg(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister;_op3 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=3;
+         loadconst(0,_op1);
+         loadreg(1,_op2);
+         loadreg(2,_op3);
+      end;
+
+
+    constructor taicpu.op_reg_reg_ref(op : tasmop;_size : topsize;_op1,_op2 : tregister;const _op3 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=3;
+         loadreg(0,_op1);
+         loadreg(1,_op2);
+         loadref(2,_op3);
+      end;
+
+
+    constructor taicpu.op_const_ref_reg(op : tasmop;_size : topsize;_op1 : aword;const _op2 : treference;_op3 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=3;
+         loadconst(0,_op1);
+         loadref(1,_op2);
+         loadreg(2,_op3);
+      end;
+
+
+    constructor taicpu.op_const_reg_ref(op : tasmop;_size : topsize;_op1 : aword;_op2 : tregister;const _op3 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=3;
+         loadconst(0,_op1);
+         loadreg(1,_op2);
+         loadref(2,_op3);
+      end;
+
+
+    constructor taicpu.op_cond_sym(op : tasmop;cond:TAsmCond;_size : topsize;_op1 : tasmsymbol);
+      begin
+         inherited create(op);
+         init(_size);
+         condition:=cond;
+         ops:=1;
+         loadsymbol(0,_op1,0);
+      end;
+
+
+    constructor taicpu.op_sym(op : tasmop;_size : topsize;_op1 : tasmsymbol);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=1;
+         loadsymbol(0,_op1,0);
+      end;
+
+
+    constructor taicpu.op_sym_ofs(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=1;
+         loadsymbol(0,_op1,_op1ofs);
+      end;
+
+
+    constructor taicpu.op_sym_ofs_reg(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint;_op2 : tregister);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadsymbol(0,_op1,_op1ofs);
+         loadreg(1,_op2);
+      end;
+
+
+    constructor taicpu.op_sym_ofs_ref(op : tasmop;_size : topsize;_op1 : tasmsymbol;_op1ofs:longint;const _op2 : treference);
+      begin
+         inherited create(op);
+         init(_size);
+         ops:=2;
+         loadsymbol(0,_op1,_op1ofs);
+         loadref(1,_op2);
+      end;
+
+
+    function taicpu.GetString:string;
+      var
+        i : longint;
+        s : string;
+        addsize : boolean;
+      begin
+        s:='['+std_op2str[opcode];
+        for i:=1to ops do
+         begin
+           if i=1 then
+            s:=s+' '
+           else
+            s:=s+',';
+           { type }
+           addsize:=false;
+           if (oper[i-1].ot and OT_XMMREG)=OT_XMMREG then
+            s:=s+'xmmreg'
+           else
+             if (oper[i-1].ot and OT_MMXREG)=OT_MMXREG then
+              s:=s+'mmxreg'
+           else
+             if (oper[i-1].ot and OT_FPUREG)=OT_FPUREG then
+              s:=s+'fpureg'
+           else
+            if (oper[i-1].ot and OT_REGISTER)=OT_REGISTER then
+             begin
+               s:=s+'reg';
+               addsize:=true;
+             end
+           else
+            if (oper[i-1].ot and OT_IMMEDIATE)=OT_IMMEDIATE then
+             begin
+               s:=s+'imm';
+               addsize:=true;
+             end
+           else
+            if (oper[i-1].ot and OT_MEMORY)=OT_MEMORY then
+             begin
+               s:=s+'mem';
+               addsize:=true;
+             end
+           else
+             s:=s+'???';
+           { size }
+           if addsize then
+            begin
+              if (oper[i-1].ot and OT_BITS8)<>0 then
+                s:=s+'8'
+              else
+               if (oper[i-1].ot and OT_BITS16)<>0 then
+                s:=s+'16'
+              else
+               if (oper[i-1].ot and OT_BITS32)<>0 then
+                s:=s+'32'
+              else
+                s:=s+'??';
+              { signed }
+              if (oper[i-1].ot and OT_SIGNED)<>0 then
+               s:=s+'s';
+            end;
+         end;
+        GetString:=s+']';
+      end;
+
+
+    procedure taicpu.Swatoperands;
+      var
+        p : TOper;
+      begin
+        { Fix the operands which are in AT&T style and we need them in Intel style }
+        case ops of
+          2 : begin
+                { 0,1 -> 1,0 }
+                p:=oper[0];
+                oper[0]:=oper[1];
+                oper[1]:=p;
+              end;
+          3 : begin
+                { 0,1,2 -> 2,1,0 }
+                p:=oper[0];
+                oper[0]:=oper[2];
+                oper[2]:=p;
+              end;
+        end;
+      end;
+
+
+    procedure taicpu.SetOperandOrder(order:TOperandOrder);
+      begin
+        if FOperandOrder<>order then
+         begin
+           Swatoperands;
+           FOperandOrder:=order;
+         end;
+      end;
+
+
+    { This check must be done with the operand in ATT order
+      i.e.after swapping in the intel reader
+      but before swapping in the NASM and TASM writers PM }
+    procedure taicpu.CheckNonCommutativeOpcodes;
+      begin
+        if ((ops=2) and
+           (oper[0].typ=top_reg) and
+           (oper[1].typ=top_reg) and
+           { if the first is ST and the second is also a register
+             it is necessarily ST1 .. ST7 }
+           (oper[0].reg=R_ST)) or
+           { ((ops=1) and
+            (oper[0].typ=top_reg) and
+            (oper[0].reg in [R_ST1..R_ST7]))  or}
+           (ops=0) then
+            if opcode=A_FSUBR then
+              opcode:=A_FSUB
+            else if opcode=A_FSUB then
+              opcode:=A_FSUBR
+            else if opcode=A_FDIVR then
+              opcode:=A_FDIV
+            else if opcode=A_FDIV then
+              opcode:=A_FDIVR
+            else if opcode=A_FSUBRP then
+              opcode:=A_FSUBP
+            else if opcode=A_FSUBP then
+              opcode:=A_FSUBRP
+            else if opcode=A_FDIVRP then
+              opcode:=A_FDIVP
+            else if opcode=A_FDIVP then
+              opcode:=A_FDIVRP;
+         if  ((ops=1) and
+            (oper[0].typ=top_reg) and
+            (oper[0].reg in [R_ST1..R_ST7])) then
+            if opcode=A_FSUBRP then
+              opcode:=A_FSUBP
+            else if opcode=A_FSUBP then
+              opcode:=A_FSUBRP
+            else if opcode=A_FDIVRP then
+              opcode:=A_FDIVP
+            else if opcode=A_FDIVP then
+              opcode:=A_FDIVRP;
+      end;
+
+
+{*****************************************************************************
+                                Assembler
+*****************************************************************************}
+
+{$ifndef NOAG386BIN}
+
+    type
+      ea=packed record
+        sib_present : boolean;
+        bytes : byte;
+        size  : byte;
+        modrm : byte;
+        sib   : byte;
+      end;
+
+    procedure taicpu.create_ot;
+      {
+        this function will also fix some other fields which only needs to be once
+      }
+      var
+        i,l,relsize : longint;
+      begin
+        if ops=0 then
+         exit;
+        { update oper[].ot field }
+        for i:=0 to ops-1 do
+         with oper[i] do
+          begin
+            case typ of
+              top_reg :
+                ot:=reg2type[reg];
+              top_ref :
+                begin
+                { create ot field }
+                  if (ot and OT_SIZE_MASK)=0 then
+                    ot:=OT_MEMORY or opsize_2_type[i,opsize]
+                  else
+                    ot:=OT_MEMORY or (ot and OT_SIZE_MASK);
+                  if (ref^.base=R_NO) and (ref^.index=R_NO) then
+                    ot:=ot or OT_MEM_OFFS;
+                { fix scalefactor }
+                  if (ref^.index=R_NO) then
+                   ref^.scalefactor:=0
+                  else
+                   if (ref^.scalefactor=0) then
+                    ref^.scalefactor:=1;
+                end;
+              top_const :
+                begin
+                  if (opsize<>S_W) and (longint(val)>=-128) and (val<=127) then
+                    ot:=OT_IMM8 or OT_SIGNED
+                  else
+                    ot:=OT_IMMEDIATE or opsize_2_type[i,opsize];
+                end;
+              top_symbol :
+                begin
+                  if LastInsOffset=-1 then
+                   l:=0
+                  else
+                   l:=InsOffset-LastInsOffset;
+                  inc(l,symofs);
+                  if assigned(sym) then
+                   inc(l,sym.address);
+                  { instruction size will then always become 2 (PFV) }
+                  relsize:=(InsOffset+2)-l;
+                  if (not assigned(sym) or
+                      ((sym.currbind<>AB_EXTERNAL) and (sym.address<>0))) and
+                     (relsize>=-128) and (relsize<=127) then
+                   ot:=OT_IMM32 or OT_SHORT
+                  else
+                   ot:=OT_IMM32 or OT_NEAR;
+                end;
+            end;
+          end;
+      end;
+
+
+    function taicpu.InsEnd:longint;
+      begin
+        InsEnd:=InsOffset+InsSize;
+      end;
+
+
+      function taicpu.Matches(p:PInsEntry):longint;
+      { * IF_SM stands for Size Match: any operand whose size is not
+       * explicitly specified by the template is `really' intended to be
+       * the same size as the first size-specified operand.
+       * Non-specification is tolerated in the input instruction, but
+       * _wrong_ specification is not.
+       *
+       * IF_SM2 invokes Size Match on only the first _two_ operands, for
+       * three-operand instructions such as SHLD: it implies that the
+       * first two operands must match in size, but that the third is
+       * required to be _unspecified_.
+       *
+       * IF_SB invokes Size Byte: operands with unspecified size in the
+       * template are really bytes, and so no non-byte specification in
+       * the input instruction will be tolerated. IF_SW similarly invokes
+       * Size Word, and IF_SD invokes Size Doubleword.
+       *
+       * (The default state if neither IF_SM nor IF_SM2 is specified is
+       * that any operand with unspecified size in the template is
+       * required to have unspecified size in the instruction too...)
+      }
+      var
+        i,j,asize,oprs : longint;
+        siz : array[0..2] of longint;
+      begin
+        Matches:=100;
+
+        { Check the opcode and operands }
+        if (p^.opcode<>opcode) or (p^.ops<>ops) then
+         begin
+           Matches:=0;
+           exit;
+         end;
+
+        { Check that no spurious colons or TOs are present }
+        for i:=0 to p^.ops-1 do
+         if (oper[i].ot and (not p^.optypes[i]) and (OT_COLON or OT_TO))<>0 then
+          begin
+            Matches:=0;
+            exit;
+          end;
+
+        { Check that the operand flags all match up }
+        for i:=0 to p^.ops-1 do
+         begin
+           if ((p^.optypes[i] and (not oper[i].ot)) or
+               ((p^.optypes[i] and OT_SIZE_MASK) and
+                ((p^.optypes[i] xor oper[i].ot) and OT_SIZE_MASK)))<>0 then
+            begin
+              if ((p^.optypes[i] and (not oper[i].ot) and OT_NON_SIZE) or
+                  (oper[i].ot and OT_SIZE_MASK))<>0 then
+               begin
+                 Matches:=0;
+                 exit;
+               end
+              else
+               Matches:=1;
+            end;
+         end;
+
+      { Check operand sizes }
+        { as default an untyped size can get all the sizes, this is different
+          from nasm, but else we need to do a lot checking which opcodes want
+          size or not with the automatic size generation }
+        asize:=longint($ffffffff);
+        if (p^.flags and IF_SB)<>0 then
+          asize:=OT_BITS8
+        else if (p^.flags and IF_SW)<>0 then
+          asize:=OT_BITS16
+        else if (p^.flags and IF_SD)<>0 then
+          asize:=OT_BITS32;
+        if (p^.flags and IF_ARMASK)<>0 then
+         begin
+           siz[0]:=0;
+           siz[1]:=0;
+           siz[2]:=0;
+           if (p^.flags and IF_AR0)<>0 then
+            siz[0]:=asize
+           else if (p^.flags and IF_AR1)<>0 then
+            siz[1]:=asize
+           else if (p^.flags and IF_AR2)<>0 then
+            siz[2]:=asize;
+         end
+        else
+         begin
+         { we can leave because the size for all operands is forced to be
+           the same
+           but not if IF_SB IF_SW or IF_SD is set PM }
+           if asize=-1 then
+             exit;
+           siz[0]:=asize;
+           siz[1]:=asize;
+           siz[2]:=asize;
+         end;
+
+        if (p^.flags and (IF_SM or IF_SM2))<>0 then
+         begin
+           if (p^.flags and IF_SM2)<>0 then
+            oprs:=2
+           else
+            oprs:=p^.ops;
+           for i:=0 to oprs-1 do
+            if ((p^.optypes[i] and OT_SIZE_MASK) <> 0) then
+             begin
+               for j:=0 to oprs-1 do
+                siz[j]:=p^.optypes[i] and OT_SIZE_MASK;
+               break;
+             end;
+          end
+         else
+          oprs:=2;
+
+        { Check operand sizes }
+        for i:=0 to p^.ops-1 do
+         begin
+           if ((p^.optypes[i] and OT_SIZE_MASK)=0) and
+              ((oper[i].ot and OT_SIZE_MASK and (not siz[i]))<>0) and
+              { Immediates can always include smaller size }
+              ((oper[i].ot and OT_IMMEDIATE)=0) and
+               (((p^.optypes[i] and OT_SIZE_MASK) or siz[i])<(oper[i].ot and OT_SIZE_MASK)) then
+            Matches:=2;
+         end;
+      end;
+
+
+    procedure taicpu.ResetPass1;
+      begin
+        { we need to reset everything here, because the choosen insentry
+          can be invalid for a new situation where the previously optimized
+          insentry is not correct }
+        InsEntry:=nil;
+        InsSize:=0;
+        LastInsOffset:=-1;
+      end;
+
+
+    procedure taicpu.ResetPass2;
+      begin
+        { we are here in a second pass, check if the instruction can be optimized }
+        if assigned(InsEntry) and
+           ((InsEntry^.flags and IF_PASS2)<>0) then
+         begin
+           InsEntry:=nil;
+           InsSize:=0;
+         end;
+        LastInsOffset:=-1;
+      end;
+
+
+    function taicpu.CheckIfValid:boolean;
+      var
+        m,i : longint;
+      begin
+        CheckIfValid:=false;
+      { Things which may only be done once, not when a second pass is done to
+        optimize }
+        if (Insentry=nil) or ((InsEntry^.flags and IF_PASS2)<>0) then
+         begin
+           { We need intel style operands }
+           SetOperandOrder(op_intel);
+           { create the .ot fields }
+           create_ot;
+           { set the file postion }
+           aktfilepos:=fileinfo;
+         end
+        else
+         begin
+           { we've already an insentry so it's valid }
+           CheckIfValid:=true;
+           exit;
+         end;
+      { Lookup opcode in the table }
+        InsSize:=-1;
+        i:=instabcache^[opcode];
+        if i=-1 then
+         begin
+           Message1(asmw_e_opcode_not_in_table,att_op2str[opcode]);
+           exit;
+         end;
+        insentry:=@instab[i];
+        while (insentry^.opcode=opcode) do
+         begin
+           m:=matches(insentry);
+           if m=100 then
+            begin
+              InsSize:=calcsize(insentry);
+              if (segprefix<>R_NO) then
+               inc(InsSize);
+              { For opsize if size if forced }
+              if (insentry^.flags and (IF_SB or IF_SW or IF_SD))<>0 then
+                 begin
+                   if (insentry^.flags and IF_ARMASK)=0 then
+                     begin
+                       if (insentry^.flags and IF_SB)<>0 then
+                         begin
+                           if opsize=S_NO then
+                             opsize:=S_B;
+                         end
+                       else if (insentry^.flags and IF_SW)<>0 then
+                         begin
+                           if opsize=S_NO then
+                             opsize:=S_W;
+                         end
+                       else if (insentry^.flags and IF_SD)<>0 then
+                         begin
+                           if opsize=S_NO then
+                             opsize:=S_L;
+                         end;
+                     end;
+                 end;
+              CheckIfValid:=true;
+              exit;
+            end;
+           inc(i);
+           insentry:=@instab[i];
+         end;
+        if insentry^.opcode<>opcode then
+         Message1(asmw_e_invalid_opcode_and_operands,GetString);
+      { No instruction found, set insentry to nil and inssize to -1 }
+        insentry:=nil;
+        inssize:=-1;
+      end;
+
+
+
+    function taicpu.Pass1(offset:longint):longint;
+      begin
+        Pass1:=0;
+      { Save the old offset and set the new offset }
+        InsOffset:=Offset;
+      { Things which may only be done once, not when a second pass is done to
+        optimize }
+        if Insentry=nil then
+         begin
+           { Check if error last time then InsSize=-1 }
+           if InsSize=-1 then
+            exit;
+           { set the file postion }
+           aktfilepos:=fileinfo;
+         end
+        else
+         begin
+{$ifdef PASS2FLAG}
+           { we are here in a second pass, check if the instruction can be optimized }
+           if (InsEntry^.flags and IF_PASS2)=0 then
+            begin
+              Pass1:=InsSize;
+              exit;
+            end;
+           { update the .ot fields, some top_const can be updated }
+           create_ot;
+{$endif PASS2FLAG}
+         end;
+      { Check if it's a valid instruction }
+        if CheckIfValid then
+         begin
+           LastInsOffset:=InsOffset;
+           Pass1:=InsSize;
+           exit;
+         end;
+        LastInsOffset:=-1;
+      end;
+
+
+    procedure taicpu.Pass2(sec:TAsmObjectData);
+      var
+        c : longint;
+      begin
+        { error in pass1 ? }
+        if insentry=nil then
+         exit;
+        aktfilepos:=fileinfo;
+        { Segment override }
+        if (segprefix<>R_NO) then
+         begin
+           case segprefix of
+             R_CS : c:=$2e;
+             R_DS : c:=$3e;
+             R_ES : c:=$26;
+             R_FS : c:=$64;
+             R_GS : c:=$65;
+             R_SS : c:=$36;
+           end;
+           sec.writebytes(c,1);
+           { fix the offset for GenNode }
+           inc(InsOffset);
+         end;
+        { Generate the instruction }
+        GenCode(sec);
+      end;
+
+
+    function taicpu.NeedAddrPrefix(opidx:byte):boolean;
+      var
+        i,b : tregister;
+      begin
+        if (OT_MEMORY and (not oper[opidx].ot))=0 then
+         begin
+           i:=oper[opidx].ref^.index;
+           b:=oper[opidx].ref^.base;
+           if not(i in [R_NO,R_EAX,R_EBX,R_ECX,R_EDX,R_EBP,R_ESP,R_ESI,R_EDI]) or
+              not(b in [R_NO,R_EAX,R_EBX,R_ECX,R_EDX,R_EBP,R_ESP,R_ESI,R_EDI]) then
+            begin
+              NeedAddrPrefix:=true;
+              exit;
+            end;
+         end;
+        NeedAddrPrefix:=false;
+      end;
+
+
+    function regval(r:tregister):byte;
+      begin
+        case r of
+          R_EAX,R_AX,R_AL,R_ES,R_CR0,R_DR0,R_ST,R_ST0,R_MM0,R_XMM0 :
+            regval:=0;
+          R_ECX,R_CX,R_CL,R_CS,R_DR1,R_ST1,R_MM1,R_XMM1 :
+            regval:=1;
+          R_EDX,R_DX,R_DL,R_SS,R_CR2,R_DR2,R_ST2,R_MM2,R_XMM2 :
+            regval:=2;
+          R_EBX,R_BX,R_BL,R_DS,R_CR3,R_DR3,R_TR3,R_ST3,R_MM3,R_XMM3 :
+            regval:=3;
+          R_ESP,R_SP,R_AH,R_FS,R_CR4,R_TR4,R_ST4,R_MM4,R_XMM4 :
+            regval:=4;
+          R_EBP,R_BP,R_CH,R_GS,R_TR5,R_ST5,R_MM5,R_XMM5 :
+            regval:=5;
+          R_ESI,R_SI,R_DH,R_DR6,R_TR6,R_ST6,R_MM6,R_XMM6 :
+            regval:=6;
+          R_EDI,R_DI,R_BH,R_DR7,R_TR7,R_ST7,R_MM7,R_XMM7 :
+            regval:=7;
+          else
+            begin
+              internalerror(777001);
+              regval:=0;
+            end;
+        end;
+      end;
+
+
+    function process_ea(const input:toper;var output:ea;rfield:longint):boolean;
+      const
+        regs : array[0..63] of tregister=(
+          R_MM0, R_EAX, R_AX, R_AL, R_XMM0, R_NO, R_NO, R_NO,
+          R_MM1, R_ECX, R_CX, R_CL, R_XMM1, R_NO, R_NO, R_NO,
+          R_MM2, R_EDX, R_DX, R_DL, R_XMM2, R_NO, R_NO, R_NO,
+          R_MM3, R_EBX, R_BX, R_BL, R_XMM3, R_NO, R_NO, R_NO,
+          R_MM4, R_ESP, R_SP, R_AH, R_XMM4, R_NO, R_NO, R_NO,
+          R_MM5, R_EBP, R_BP, R_CH, R_XMM5, R_NO, R_NO, R_NO,
+          R_MM6, R_ESI, R_SI, R_DH, R_XMM6, R_NO, R_NO, R_NO,
+          R_MM7, R_EDI, R_DI, R_BH, R_XMM7, R_NO, R_NO, R_NO
+        );
+      var
+        j     : longint;
+        i,b   : tregister;
+        sym   : tasmsymbol;
+        md,s  : byte;
+        base,index,scalefactor,
+        o     : longint;
+      begin
+        process_ea:=false;
+      { register ? }
+        if (input.typ=top_reg) then
+         begin
+           j:=0;
+           while (j<=high(regs)) do
+            begin
+              if input.reg=regs[j] then
+               break;
+              inc(j);
+            end;
+           if j<=high(regs) then
+            begin
+              output.sib_present:=false;
+              output.bytes:=0;
+              output.modrm:=$c0 or (rfield shl 3) or (j shr 3);
+              output.size:=1;
+              process_ea:=true;
+            end;
+           exit;
+         end;
+      { memory reference }
+        i:=input.ref^.index;
+        b:=input.ref^.base;
+        s:=input.ref^.scalefactor;
+        o:=input.ref^.offset+input.ref^.offsetfixup;
+        sym:=input.ref^.symbol;
+      { it's direct address }
+        if (b=R_NO) and (i=R_NO) then
+         begin
+           { it's a pure offset }
+           output.sib_present:=false;
+           output.bytes:=4;
+           output.modrm:=5 or (rfield shl 3);
+         end
+        else
+        { it's an indirection }
+         begin
+           { 16 bit address? }
+           if not((i in [R_NO,R_EAX,R_EBX,R_ECX,R_EDX,R_EBP,R_ESP,R_ESI,R_EDI]) and
+                  (b in [R_NO,R_EAX,R_EBX,R_ECX,R_EDX,R_EBP,R_ESP,R_ESI,R_EDI])) then
+            Message(asmw_e_16bit_not_supported);
+{$ifdef OPTEA}
+           { make single reg base }
+           if (b=R_NO) and (s=1) then
+            begin
+              b:=i;
+              i:=R_NO;
+            end;
+           { convert [3,5,9]*EAX to EAX+[2,4,8]*EAX }
+           if (b=R_NO) and
+              (((s=2) and (i<>R_ESP)) or
+                (s=3) or (s=5) or (s=9)) then
+            begin
+              b:=i;
+              dec(s);
+            end;
+           { swap ESP into base if scalefactor is 1 }
+           if (s=1) and (i=R_ESP) then
+            begin
+              i:=b;
+              b:=R_ESP;
+            end;
+{$endif OPTEA}
+           { wrong, for various reasons }
+           if (i=R_ESP) or ((s<>1) and (s<>2) and (s<>4) and (s<>8) and (i<>R_NO)) then
+            exit;
+           { base }
+           case b of
+             R_EAX : base:=0;
+             R_ECX : base:=1;
+             R_EDX : base:=2;
+             R_EBX : base:=3;
+             R_ESP : base:=4;
+             R_NO,
+             R_EBP : base:=5;
+             R_ESI : base:=6;
+             R_EDI : base:=7;
+           else
+             exit;
+           end;
+           { index }
+           case i of
+             R_EAX : index:=0;
+             R_ECX : index:=1;
+             R_EDX : index:=2;
+             R_EBX : index:=3;
+             R_NO  : index:=4;
+             R_EBP : index:=5;
+             R_ESI : index:=6;
+             R_EDI : index:=7;
+           else
+             exit;
+           end;
+           case s of
+            0,
+            1 : scalefactor:=0;
+            2 : scalefactor:=1;
+            4 : scalefactor:=2;
+            8 : scalefactor:=3;
+           else
+            exit;
+           end;
+           if (b=R_NO) or
+              ((b<>R_EBP) and (o=0) and (sym=nil)) then
+            md:=0
+           else
+            if ((o>=-128) and (o<=127) and (sym=nil)) then
+             md:=1
+            else
+             md:=2;
+           if (b=R_NO) or (md=2) then
+            output.bytes:=4
+           else
+            output.bytes:=md;
+           { SIB needed ? }
+           if (i=R_NO) and (b<>R_ESP) then
+            begin
+              output.sib_present:=false;
+              output.modrm:=(md shl 6) or (rfield shl 3) or base;
+            end
+           else
+            begin
+              output.sib_present:=true;
+              output.modrm:=(md shl 6) or (rfield shl 3) or 4;
+              output.sib:=(scalefactor shl 6) or (index shl 3) or base;
+            end;
+         end;
+        if output.sib_present then
+         output.size:=2+output.bytes
+        else
+         output.size:=1+output.bytes;
+        process_ea:=true;
+      end;
+
+
+    function taicpu.calcsize(p:PInsEntry):longint;
+      var
+        codes : pchar;
+        c     : byte;
+        len     : longint;
+        ea_data : ea;
+      begin
+        len:=0;
+        codes:=@p^.code;
+        repeat
+          c:=ord(codes^);
+          inc(codes);
+          case c of
+            0 :
+              break;
+            1,2,3 :
+              begin
+                inc(codes,c);
+                inc(len,c);
+              end;
+            8,9,10 :
+              begin
+                inc(codes);
+                inc(len);
+              end;
+            4,5,6,7 :
+              begin
+                if opsize=S_W then
+                  inc(len,2)
+                else
+                  inc(len);
+              end;
+            15,
+            12,13,14,
+            16,17,18,
+            20,21,22,
+            40,41,42 :
+              inc(len);
+            24,25,26,
+            31,
+            48,49,50 :
+              inc(len,2);
+            28,29,30, { we don't have 16 bit immediates code }
+            32,33,34,
+            52,53,54,
+            56,57,58 :
+              inc(len,4);
+            192,193,194 :
+              if NeedAddrPrefix(c-192) then
+               inc(len);
+            208 :
+              inc(len);
+            200,
+            201,
+            202,
+            209,
+            210,
+            217,218,219 : ;
+            216 :
+              begin
+                inc(codes);
+                inc(len);
+              end;
+            224,225,226 :
+              begin
+                InternalError(777002);
+              end;
+            else
+              begin
+                if (c>=64) and (c<=191) then
+                 begin
+                   if not process_ea(oper[(c shr 3) and 7], ea_data, 0) then
+                    Message(asmw_e_invalid_effective_address)
+                   else
+                    inc(len,ea_data.size);
+                 end
+                else
+                 InternalError(777003);
+              end;
+          end;
+        until false;
+        calcsize:=len;
+      end;
+
+
+    procedure taicpu.GenCode(sec:TAsmObjectData);
+      {
+       * the actual codes (C syntax, i.e. octal):
+       * \0            - terminates the code. (Unless it's a literal of course.)
+       * \1, \2, \3    - that many literal bytes follow in the code stream
+       * \4, \6        - the POP/PUSH (respectively) codes for CS, DS, ES, SS
+       *                 (POP is never used for CS) depending on operand 0
+       * \5, \7        - the second byte of POP/PUSH codes for FS, GS, depending
+       *                 on operand 0
+       * \10, \11, \12 - a literal byte follows in the code stream, to be added
+       *                 to the register value of operand 0, 1 or 2
+       * \17           - encodes the literal byte 0. (Some compilers don't take
+       *                 kindly to a zero byte in the _middle_ of a compile time
+       *                 string constant, so I had to put this hack in.)
+       * \14, \15, \16 - a signed byte immediate operand, from operand 0, 1 or 2
+       * \20, \21, \22 - a byte immediate operand, from operand 0, 1 or 2
+       * \24, \25, \26 - an unsigned byte immediate operand, from operand 0, 1 or 2
+       * \30, \31, \32 - a word immediate operand, from operand 0, 1 or 2
+       * \34, \35, \36 - select between \3[012] and \4[012] depending on 16/32 bit
+       *                 assembly mode or the address-size override on the operand
+       * \37           - a word constant, from the _segment_ part of operand 0
+       * \40, \41, \42 - a long immediate operand, from operand 0, 1 or 2
+       * \50, \51, \52 - a byte relative operand, from operand 0, 1 or 2
+       * \60, \61, \62 - a word relative operand, from operand 0, 1 or 2
+       * \64, \65, \66 - select between \6[012] and \7[012] depending on 16/32 bit
+       *                 assembly mode or the address-size override on the operand
+       * \70, \71, \72 - a long relative operand, from operand 0, 1 or 2
+       * \1ab          - a ModRM, calculated on EA in operand a, with the spare
+       *                 field the register value of operand b.
+       * \2ab          - a ModRM, calculated on EA in operand a, with the spare
+       *                 field equal to digit b.
+       * \30x          - might be an 0x67 byte, depending on the address size of
+       *                 the memory reference in operand x.
+       * \310          - indicates fixed 16-bit address size, i.e. optional 0x67.
+       * \311          - indicates fixed 32-bit address size, i.e. optional 0x67.
+       * \320          - indicates fixed 16-bit operand size, i.e. optional 0x66.
+       * \321          - indicates fixed 32-bit operand size, i.e. optional 0x66.
+       * \322          - indicates that this instruction is only valid when the
+       *                 operand size is the default (instruction to disassembler,
+       *                 generates no code in the assembler)
+       * \330          - a literal byte follows in the code stream, to be added
+       *                 to the condition code value of the instruction.
+       * \340          - reserve <operand 0> bytes of uninitialised storage.
+       *                 Operand 0 had better be a segmentless constant.
+      }
+
+      var
+        currval : longint;
+        currsym : tasmsymbol;
+
+        procedure getvalsym(opidx:longint);
+        begin
+          case oper[opidx].typ of
+            top_ref :
+              begin
+                currval:=oper[opidx].ref^.offset+oper[opidx].ref^.offsetfixup;
+                currsym:=oper[opidx].ref^.symbol;
+              end;
+            top_const :
+              begin
+                currval:=longint(oper[opidx].val);
+                currsym:=nil;
+              end;
+            top_symbol :
+              begin
+                currval:=oper[opidx].symofs;
+                currsym:=oper[opidx].sym;
+              end;
+            else
+              Message(asmw_e_immediate_or_reference_expected);
+          end;
+        end;
+
+      const
+        CondVal:array[TAsmCond] of byte=($0,
+         $7, $3, $2, $6, $2, $4, $F, $D, $C, $E, $6, $2,
+         $3, $7, $3, $5, $E, $C, $D, $F, $1, $B, $9, $5,
+         $0, $A, $A, $B, $8, $4);
+      var
+        c : byte;
+        pb,
+        codes : pchar;
+        bytes : array[0..3] of byte;
+        rfield,
+        data,s,opidx : longint;
+        ea_data : ea;
+      begin
+{$ifdef EXTDEBUG}
+        { safety check }
+        if sec.sects[sec.currsec].datasize<>insoffset then
+         internalerror(200130121);
+{$endif EXTDEBUG}
+        { load data to write }
+        codes:=insentry^.code;
+        { Force word push/pop for registers }
+        if (opsize=S_W) and ((codes[0]=#4) or (codes[0]=#6) or
+            ((codes[0]=#1) and ((codes[2]=#5) or (codes[2]=#7)))) then
+          begin
+            bytes[0]:=$66;
+            sec.writebytes(bytes,1);
+          end;
+        repeat
+          c:=ord(codes^);
+          inc(codes);
+          case c of
+            0 :
+              break;
+            1,2,3 :
+              begin
+                sec.writebytes(codes^,c);
+                inc(codes,c);
+              end;
+            4,6 :
+              begin
+                case oper[0].reg of
+                  R_CS :
+                    begin
+                      if c=4 then
+                       bytes[0]:=$f
+                      else
+                       bytes[0]:=$e;
+                    end;
+                  R_NO,
+                  R_DS :
+                    begin
+                      if c=4 then
+                       bytes[0]:=$1f
+                      else
+                       bytes[0]:=$1e;
+                    end;
+                  R_ES :
+                    begin
+                      if c=4 then
+                       bytes[0]:=$7
+                      else
+                       bytes[0]:=$6;
+                    end;
+                  R_SS :
+                    begin
+                      if c=4 then
+                       bytes[0]:=$17
+                      else
+                       bytes[0]:=$16;
+                    end;
+                  else
+                    InternalError(777004);
+                end;
+                sec.writebytes(bytes,1);
+              end;
+            5,7 :
+              begin
+                case oper[0].reg of
+                  R_FS :
+                    begin
+                      if c=5 then
+                       bytes[0]:=$a1
+                      else
+                       bytes[0]:=$a0;
+                    end;
+                  R_GS :
+                    begin
+                      if c=5 then
+                       bytes[0]:=$a9
+                      else
+                       bytes[0]:=$a8;
+                    end;
+                  else
+                    InternalError(777005);
+                end;
+                sec.writebytes(bytes,1);
+              end;
+            8,9,10 :
+              begin
+                bytes[0]:=ord(codes^)+regval(oper[c-8].reg);
+                inc(codes);
+                sec.writebytes(bytes,1);
+              end;
+            15 :
+              begin
+                bytes[0]:=0;
+                sec.writebytes(bytes,1);
+              end;
+            12,13,14 :
+              begin
+                getvalsym(c-12);
+                if (currval<-128) or (currval>127) then
+                 Message2(asmw_e_value_exceeds_bounds,'signed byte',tostr(currval));
+                if assigned(currsym) then
+                  sec.writereloc(currval,1,currsym,RELOC_ABSOLUTE)
+                else
+                  sec.writebytes(currval,1);
+              end;
+            16,17,18 :
+              begin
+                getvalsym(c-16);
+                if (currval<-256) or (currval>255) then
+                 Message2(asmw_e_value_exceeds_bounds,'byte',tostr(currval));
+                if assigned(currsym) then
+                 sec.writereloc(currval,1,currsym,RELOC_ABSOLUTE)
+                else
+                 sec.writebytes(currval,1);
+              end;
+            20,21,22 :
+              begin
+                getvalsym(c-20);
+                if (currval<0) or (currval>255) then
+                 Message2(asmw_e_value_exceeds_bounds,'unsigned byte',tostr(currval));
+                if assigned(currsym) then
+                 sec.writereloc(currval,1,currsym,RELOC_ABSOLUTE)
+                else
+                 sec.writebytes(currval,1);
+              end;
+            24,25,26 :
+              begin
+                getvalsym(c-24);
+                if (currval<-65536) or (currval>65535) then
+                 Message2(asmw_e_value_exceeds_bounds,'word',tostr(currval));
+                if assigned(currsym) then
+                 sec.writereloc(currval,2,currsym,RELOC_ABSOLUTE)
+                else
+                 sec.writebytes(currval,2);
+              end;
+            28,29,30 :
+              begin
+                getvalsym(c-28);
+                if assigned(currsym) then
+                 sec.writereloc(currval,4,currsym,RELOC_ABSOLUTE)
+                else
+                 sec.writebytes(currval,4);
+              end;
+            32,33,34 :
+              begin
+                getvalsym(c-32);
+                if assigned(currsym) then
+                 sec.writereloc(currval,4,currsym,RELOC_ABSOLUTE)
+                else
+                 sec.writebytes(currval,4);
+              end;
+            40,41,42 :
+              begin
+                getvalsym(c-40);
+                data:=currval-insend;
+                if assigned(currsym) then
+                 inc(data,currsym.address);
+                if (data>127) or (data<-128) then
+                 Message1(asmw_e_short_jmp_out_of_range,tostr(data));
+                sec.writebytes(data,1);
+              end;
+            52,53,54 :
+              begin
+                getvalsym(c-52);
+                if assigned(currsym) then
+                 sec.writereloc(currval,4,currsym,RELOC_RELATIVE)
+                else
+                 sec.writereloc(currval-insend,4,nil,RELOC_ABSOLUTE)
+              end;
+            56,57,58 :
+              begin
+                getvalsym(c-56);
+                if assigned(currsym) then
+                 sec.writereloc(currval,4,currsym,RELOC_RELATIVE)
+                else
+                 sec.writereloc(currval-insend,4,nil,RELOC_ABSOLUTE)
+              end;
+            192,193,194 :
+              begin
+                if NeedAddrPrefix(c-192) then
+                 begin
+                   bytes[0]:=$67;
+                   sec.writebytes(bytes,1);
+                 end;
+              end;
+            200 :
+              begin
+                bytes[0]:=$67;
+                sec.writebytes(bytes,1);
+              end;
+            208 :
+              begin
+                bytes[0]:=$66;
+                sec.writebytes(bytes,1);
+              end;
+            216 :
+              begin
+                bytes[0]:=ord(codes^)+condval[condition];
+                inc(codes);
+                sec.writebytes(bytes,1);
+              end;
+            201,
+            202,
+            209,
+            210,
+            217,218,219 :
+              begin
+                { these are dissambler hints or 32 bit prefixes which
+                  are not needed }
+              end;
+            31,
+            48,49,50,
+            224,225,226 :
+              begin
+                InternalError(777006);
+              end
+            else
+              begin
+                if (c>=64) and (c<=191) then
+                 begin
+                   if (c<127) then
+                    begin
+                      if (oper[c and 7].typ=top_reg) then
+                        rfield:=regval(oper[c and 7].reg)
+                      else
+                        rfield:=regval(oper[c and 7].ref^.base);
+                    end
+                   else
+                    rfield:=c and 7;
+                   opidx:=(c shr 3) and 7;
+                   if not process_ea(oper[opidx], ea_data, rfield) then
+                    Message(asmw_e_invalid_effective_address);
+
+                   pb:=@bytes;
+                   pb^:=chr(ea_data.modrm);
+                   inc(pb);
+                   if ea_data.sib_present then
+                    begin
+                      pb^:=chr(ea_data.sib);
+                      inc(pb);
+                    end;
+
+                   s:=pb-pchar(@bytes);
+                   sec.writebytes(bytes,s);
+
+                   case ea_data.bytes of
+                     0 : ;
+                     1 :
+                       begin
+                         if (oper[opidx].ot and OT_MEMORY)=OT_MEMORY then
+                          sec.writereloc(oper[opidx].ref^.offset+oper[opidx].ref^.offsetfixup,1,oper[opidx].ref^.symbol,RELOC_ABSOLUTE)
+                         else
+                          begin
+                            bytes[0]:=oper[opidx].ref^.offset+oper[opidx].ref^.offsetfixup;
+                            sec.writebytes(bytes,1);
+                          end;
+                         inc(s);
+                       end;
+                     2,4 :
+                       begin
+                         sec.writereloc(oper[opidx].ref^.offset+oper[opidx].ref^.offsetfixup,ea_data.bytes,
+                           oper[opidx].ref^.symbol,RELOC_ABSOLUTE);
+                         inc(s,ea_data.bytes);
+                       end;
+                   end;
+                 end
+                else
+                 InternalError(777007);
+              end;
+          end;
+        until false;
+      end;
+{$endif NOAG386BIN}
+
+{*****************************************************************************
+                              Instruction table
+*****************************************************************************}
+
+    procedure BuildInsTabCache;
+{$ifndef NOAG386BIN}
+      var
+        i : longint;
+{$endif}
+      begin
+{$ifndef NOAG386BIN}
+        new(instabcache);
+        FillChar(instabcache^,sizeof(tinstabcache),$ff);
+        i:=0;
+        while (i<InsTabEntries) do
+         begin
+           if InsTabCache^[InsTab[i].OPcode]=-1 then
+            InsTabCache^[InsTab[i].OPcode]:=i;
+           inc(i);
+         end;
+{$endif NOAG386BIN}
+      end;
+
+
+    procedure InitAsm;
+      begin
+{$ifndef NOAG386BIN}
+        if not assigned(instabcache) then
+          BuildInsTabCache;
+{$endif NOAG386BIN}
+      end;
+
+
+    procedure DoneAsm;
+      begin
+{$ifndef NOAG386BIN}
+        if assigned(instabcache) then
+         dispose(instabcache);
+{$endif NOAG386BIN}
+      end;
+
+
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+  Revision 1.1  2002/07/01 18:46:29  peter
+    * internal linker
+    * reorganized aasm layer
+}

+ 288 - 0
compiler/x86_64/agx64att.pas

@@ -0,0 +1,288 @@
+{
+    $Id$
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    This unit implements an asmoutput class for i386 AT&T syntax
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This unit implements an asmoutput class for x86-64 AT&T syntax
+}
+unit agx64att;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+      cclasses,cpubase,
+      globals,
+      aasmbase,aasmtai,aasmcpu,assemble,aggas;
+
+    type
+      Tx86_64ATTAssembler=class(TGNUassembler)
+      public
+        procedure WriteInstruction(hp: tai);override;
+      end;
+
+    TAttSuffix = (AttSufNONE,AttSufINT,AttSufFPU,AttSufFPUint);
+
+    const
+      att_op2str:op2strtable={$i x64att.inc}
+      att_needsuffix:array[tasmop] of TAttSuffix={$i x64atts.inc}
+
+      att_reg2str : reg2strtable = ('',
+         '%rax','%rcx','%rdx','%rbx','%rsp','%rbp','%rsi','%rdi',
+         '%r8','%r9','%r10','%r11','%r12','%r13','%r14','%r15','%rip',
+         '%eax','%ecx','%edx','%ebx','%esp','%ebp','%esi','%edi',
+         '%r8d','%r9d','%r10d','%r11d','%r12d','%r13d','%r14d','%r15d',
+         '%ax','%cx','%dx','%bx','%sp','%bp','%si','%di',
+         '%r8w','%r9w','%r10w','%r11w','%r12w','%r13w','%r14w','%r15w',
+         '%al','%cl','%dl','%bl','%spl','%bpl','%sil','%dil',
+         '%r8b','%r9b','%r10b','%r11b','%r12b','%r13b','%r14b','%r15b',
+         '%ah','%ch','%bh','%dh',
+         '%cs','%ds','%es','%ss','%fs','%gs',
+         '%st','%st(0)','%st(1)','%st(2)','%st(3)','%st(4)','%st(5)','%st(6)','%st(7)',
+         '%dr0','%dr1','%dr2','%dr3','%dr6','%dr7',
+         '%cr0','%cr2','%cr3','%cr4',
+         '%tr3','%tr4','%tr5','%tr6','%tr7',
+         '%mm0','%mm1','%mm2','%mm3','%mm4','%mm5','%mm6','%mm7',
+         '%xmm0','%xmm1','%xmm2','%xmm3','%xmm4','%xmm5','%xmm6','%xmm7',
+         '%xmm8','%xmm9','%xmm10','%xmm11','%xmm12','%xmm13','%xmm14','%xmm15'
+       );
+
+     att_opsize2str : array[topsize] of string[2] = ('',
+       'b','w','l','bw','bl','wl',
+       's','l','q',
+       's','l','t','d','q','v',
+       '','',''
+     );
+
+  implementation
+
+    uses
+      cutils,systems,
+      verbose;
+
+
+
+    function getreferencestring(var ref : treference) : string;
+    var
+      s : string;
+    begin
+      with ref do
+       begin
+         inc(offset,offsetfixup);
+         offsetfixup:=0;
+       { have we a segment prefix ? }
+       { These are probably not correctly handled under GAS }
+       { should be replaced by coding the segment override  }
+       { directly! - DJGPP FAQ                              }
+         if segment<>R_NO then
+          s:=att_reg2str[segment]+':'
+         else
+          s:='';
+         if assigned(symbol) then
+          s:=s+symbol.name;
+         if offset<0 then
+          s:=s+tostr(offset)
+         else
+          if (offset>0) then
+           begin
+             if assigned(symbol) then
+              s:=s+'+'+tostr(offset)
+             else
+              s:=s+tostr(offset);
+           end
+         else if (index=R_NO) and (base=R_NO) and not assigned(symbol) then
+           s:=s+'0';
+         if (index<>R_NO) and (base=R_NO) then
+          begin
+            s:=s+'(,'+att_reg2str[index];
+            if scalefactor<>0 then
+             s:=s+','+tostr(scalefactor)+')'
+            else
+             s:=s+')';
+          end
+         else
+          if (index=R_NO) and (base<>R_NO) then
+           s:=s+'('+att_reg2str[base]+')'
+          else
+           if (index<>R_NO) and (base<>R_NO) then
+            begin
+              s:=s+'('+att_reg2str[base]+','+att_reg2str[index];
+              if scalefactor<>0 then
+               s:=s+','+tostr(scalefactor)+')'
+              else
+               s := s+')';
+            end;
+       end;
+      getreferencestring:=s;
+    end;
+
+    function getopstr(const o:toper) : string;
+    var
+      hs : string;
+    begin
+      case o.typ of
+        top_reg :
+          getopstr:=att_reg2str[o.reg];
+        top_ref :
+          getopstr:=getreferencestring(o.ref^);
+        top_const :
+          getopstr:='$'+tostr(longint(o.val));
+        top_symbol :
+          begin
+            if assigned(o.sym) then
+              hs:='$'+o.sym.name
+            else
+              hs:='$';
+            if o.symofs>0 then
+             hs:=hs+'+'+tostr(o.symofs)
+            else
+             if o.symofs<0 then
+              hs:=hs+tostr(o.symofs)
+            else
+             if not(assigned(o.sym)) then
+               hs:=hs+'0';
+            getopstr:=hs;
+          end;
+        else
+          internalerror(10001);
+      end;
+    end;
+
+    function getopstr_jmp(const o:toper) : string;
+    var
+      hs : string;
+    begin
+      case o.typ of
+        top_reg :
+          getopstr_jmp:='*'+att_reg2str[o.reg];
+        top_ref :
+          getopstr_jmp:='*'+getreferencestring(o.ref^);
+        top_const :
+          getopstr_jmp:=tostr(longint(o.val));
+        top_symbol :
+          begin
+            hs:=o.sym.name;
+            if o.symofs>0 then
+             hs:=hs+'+'+tostr(o.symofs)
+            else
+             if o.symofs<0 then
+              hs:=hs+tostr(o.symofs);
+            getopstr_jmp:=hs;
+          end;
+        else
+          internalerror(10001);
+      end;
+    end;
+
+
+{****************************************************************************
+                            TI386ATTASMOUTPUT
+ ****************************************************************************}
+
+
+
+    procedure Tx86_64AttAssembler. WriteInstruction(hp: tai);
+    var
+      op       : tasmop;
+      s        : string;
+      sep      : char;
+      calljmp  : boolean;
+      i        : integer;
+     begin
+       if hp.typ <> ait_instruction then exit;
+       taicpu(hp).SetOperandOrder(op_att);
+       op:=taicpu(hp).opcode;
+       calljmp:=is_calljmp(op);
+       { call maybe not translated to call }
+       s:=#9+att_op2str[op]+cond2str[taicpu(hp).condition];
+       { suffix needed ?  fnstsw,fldcw don't support suffixes
+         with binutils 2.9.5 under linux }
+       if (not calljmp) and
+           (att_needsuffix[op]<>AttSufNONE) and
+           (op<>A_FNSTSW) and (op<>A_FSTSW) and
+           (op<>A_FNSTCW) and (op<>A_FSTCW) and
+           (op<>A_FLDCW) and not(
+           (taicpu(hp).oper[0].typ=top_reg) and
+           (taicpu(hp).oper[0].reg in [R_ST..R_ST7])
+          ) then
+              s:=s+att_opsize2str[taicpu(hp).opsize];
+       { process operands }
+       if taicpu(hp).ops<>0 then
+         begin
+           { call and jmp need an extra handling                          }
+           { this code is only called if jmp isn't a labeled instruction  }
+           { quick hack to overcome a problem with manglednames=255 chars }
+           if calljmp then
+              begin
+                AsmWrite(s+#9);
+                s:=getopstr_jmp(taicpu(hp).oper[0]);
+              end
+            else
+              begin
+                for i:=0 to taicpu(hp).ops-1 do
+                  begin
+                    if i=0 then
+                      sep:=#9
+                    else
+                      sep:=',';
+                    s:=s+sep+getopstr(taicpu(hp).oper[i])
+                  end;
+              end;
+         end;
+         AsmWriteLn(s);
+     end;
+
+
+{*****************************************************************************
+                                  Initialize
+*****************************************************************************}
+
+    const
+       as_x86_64_as_info : tasminfo =
+          (
+            id     : as_x86_64_as;
+            idtxt  : 'AS';
+            asmbin : 'as';
+            asmcmd : '-o $OBJ $ASM';
+            supported_target : target_any;
+            outputbinary: false;
+            allowdirect : true;
+            externals : false;
+            needar : true;
+            labelprefix_only_inside_procedure : false;
+            labelprefix : '.L';
+            comment : '# ';
+            secnames : ('',
+              '.text','.data','.bss',
+              '','','','','','',
+              '.stab','.stabstr','COMMON')
+          );
+
+
+initialization
+  RegisterAssembler(as_x86_64_as_info,Tx86_64ATTAssembler);
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 180 - 0
compiler/x86_64/cga.pas

@@ -0,0 +1,180 @@
+{
+    $Id$
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    Helper routines for the x86-64 code generator
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+
+unit cga;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+       cpuinfo,cpubase,cginfo,
+       symconst,symtype,symdef,aasmbase,aasmtai,aasmcpu;
+
+{$define TESTGETTEMP to store const that
+ are written into temps for later release PM }
+
+    function def_opsize(p1:tdef):topsize;
+    function def_getreg(p1:tdef):tregister;
+
+    procedure emitjmp(c : tasmcond;var l : tasmlabel);
+
+    procedure emit_none(i : tasmop;s : topsize);
+
+    procedure emit_const(i : tasmop;s : topsize;c : longint);
+    procedure emit_reg(i : tasmop;s : topsize;reg : tregister);
+    procedure emit_ref(i : tasmop;s : topsize;const ref : treference);
+
+    procedure emit_const_reg(i : tasmop;s : topsize;c : longint;reg : tregister);
+    procedure emit_const_ref(i : tasmop;s : topsize;c : longint;const ref : treference);
+    procedure emit_ref_reg(i : tasmop;s : topsize;const ref : treference;reg : tregister);
+    procedure emit_reg_ref(i : tasmop;s : topsize;reg : tregister;const ref : treference);
+    procedure emit_reg_reg(i : tasmop;s : topsize;reg1,reg2 : tregister);
+
+    procedure emit_const_reg_reg(i : tasmop;s : topsize;c : longint;reg1,reg2 : tregister);
+    procedure emit_reg_reg_reg(i : tasmop;s : topsize;reg1,reg2,reg3 : tregister);
+
+
+    procedure emit_sym(i : tasmop;s : topsize;op : tasmsymbol);
+
+
+implementation
+
+    uses
+       cutils,
+       systems,globals,verbose,
+       cgbase,cgobj,tgobj,rgobj,rgcpu;
+
+
+{*****************************************************************************
+                                Helpers
+*****************************************************************************}
+
+    function def_opsize(p1:tdef):topsize;
+      begin
+        case p1.size of
+         1 : def_opsize:=S_B;
+         2 : def_opsize:=S_W;
+         4 : def_opsize:=S_L;
+         { I don't know if we need it (FK) }
+         8 : def_opsize:=S_L;
+        else
+         internalerror(130820001);
+        end;
+      end;
+
+
+    function def_getreg(p1:tdef):tregister;
+      begin
+        def_getreg:=rg.makeregsize(rg.getregisterint(exprasmlist),int_cgsize(p1.size));
+      end;
+
+
+{*****************************************************************************
+                              Emit Assembler
+*****************************************************************************}
+
+    procedure emitjmp(c : tasmcond;var l : tasmlabel);
+      var
+        ai : taicpu;
+      begin
+        if c=C_None then
+          ai := Taicpu.Op_sym(A_JMP,S_NO,l)
+        else
+          begin
+            ai:=Taicpu.Op_sym(A_Jcc,S_NO,l);
+            ai.SetCondition(c);
+          end;
+        ai.is_jmp:=true;
+        exprasmList.concat(ai);
+      end;
+
+
+    procedure emit_none(i : tasmop;s : topsize);
+      begin
+         exprasmList.concat(Taicpu.Op_none(i,s));
+      end;
+
+    procedure emit_reg(i : tasmop;s : topsize;reg : tregister);
+      begin
+         exprasmList.concat(Taicpu.Op_reg(i,s,reg));
+      end;
+
+    procedure emit_ref(i : tasmop;s : topsize;const ref : treference);
+      begin
+         exprasmList.concat(Taicpu.Op_ref(i,s,ref));
+      end;
+
+    procedure emit_const(i : tasmop;s : topsize;c : longint);
+      begin
+         exprasmList.concat(Taicpu.Op_const(i,s,aword(c)));
+      end;
+
+    procedure emit_const_reg(i : tasmop;s : topsize;c : longint;reg : tregister);
+      begin
+         exprasmList.concat(Taicpu.Op_const_reg(i,s,aword(c),reg));
+      end;
+
+    procedure emit_const_ref(i : tasmop;s : topsize;c : longint;const ref : treference);
+      begin
+         exprasmList.concat(Taicpu.Op_const_ref(i,s,aword(c),ref));
+      end;
+
+    procedure emit_ref_reg(i : tasmop;s : topsize;const ref : treference;reg : tregister);
+      begin
+         exprasmList.concat(Taicpu.Op_ref_reg(i,s,ref,reg));
+      end;
+
+    procedure emit_reg_ref(i : tasmop;s : topsize;reg : tregister;const ref : treference);
+      begin
+         exprasmList.concat(Taicpu.Op_reg_ref(i,s,reg,ref));
+      end;
+
+    procedure emit_reg_reg(i : tasmop;s : topsize;reg1,reg2 : tregister);
+      begin
+         if (reg1<>reg2) or (i<>A_MOV) then
+           exprasmList.concat(Taicpu.Op_reg_reg(i,s,reg1,reg2));
+      end;
+
+    procedure emit_const_reg_reg(i : tasmop;s : topsize;c : longint;reg1,reg2 : tregister);
+      begin
+         exprasmList.concat(Taicpu.Op_const_reg_reg(i,s,c,reg1,reg2));
+      end;
+
+    procedure emit_reg_reg_reg(i : tasmop;s : topsize;reg1,reg2,reg3 : tregister);
+      begin
+         exprasmList.concat(Taicpu.Op_reg_reg_reg(i,s,reg1,reg2,reg3));
+      end;
+
+    procedure emit_sym(i : tasmop;s : topsize;op : tasmsymbol);
+      begin
+        exprasmList.concat(Taicpu.Op_sym(i,s,op));
+      end;
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 57 - 0
compiler/x86_64/cgcpu.pas

@@ -0,0 +1,57 @@
+{
+    $Id$
+    Copyright (c) 2002 by Florian Klaempfl
+
+    This unit implements the code generator for the x86-64.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This unit implements the code generator for the x86-64.
+}
+unit cgcpu;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       cginfo,cgbase,cgobj,cg64f64,cgx86,
+       aasmbase,aasmtai,aasmcpu,
+       cpubase,cpuinfo,cpupara,
+       node,symconst;
+
+    type
+      tcgx86_64 = class(tcgx86)
+      end;
+
+  implementation
+
+    uses
+       globtype,globals,verbose,systems,cutils,
+       symdef,symsym,defbase,paramgr,
+       rgobj,tgobj,rgcpu;
+
+begin
+  cg:=tcgx86_64.create;
+  cg64:=tcg64f64.create;
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 497 - 0
compiler/x86_64/cpubase.pas

@@ -0,0 +1,497 @@
+{
+    $Id$
+    Copyright (c) 1998-2000 by Florian Klaempfl and Peter Vreman
+
+    Contains the basic declarations for the x86-64 architecture
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This unit contains the basic declarations for the x86-64 architecture.
+}
+unit cpubase;
+
+{$i fpcdefs.inc}
+
+interface
+
+uses
+  globals,cutils,cclasses,
+  aasmbase,
+  cpuinfo,
+  cginfo;
+
+{*****************************************************************************
+                                Assembler Opcodes
+*****************************************************************************}
+
+    type
+      TAsmOp={$i x86_64op.inc}
+
+      { This should define the array of instructions as string }
+      op2strtable=array[tasmop] of string[11];
+
+    Const
+      { First value of opcode enumeration }
+      firstop = low(tasmop);
+      { Last value of opcode enumeration }
+      lastop  = high(tasmop);
+
+
+{*****************************************************************************
+                                Operand Sizes
+*****************************************************************************}
+
+type
+  topsize = (S_NO,
+    S_B,S_W,S_L,S_BW,S_BL,S_WL,
+    S_IS,S_IL,S_IQ,
+    S_FS,S_FL,S_FX,S_D,S_Q,S_FV,
+    S_NEAR,S_FAR,S_SHORT
+  );
+
+{*****************************************************************************
+                                  Registers
+*****************************************************************************}
+
+type
+  { don't change the order }
+  { it's used by the register size conversions }
+  { Enumeration of all registers of the CPU }
+  tregister = (R_NO,
+    R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,
+    R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15,R_RIP,
+    R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
+    R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D,
+    R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
+    R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W,
+    R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,
+    R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B,
+    R_AH,R_CH,R_BH,R_DH,
+    R_CS,R_DS,R_ES,R_SS,R_FS,R_GS,
+    R_ST,R_ST0,R_ST1,R_ST2,R_ST3,R_ST4,R_ST5,R_ST6,R_ST7,
+    R_DR0,R_DR1,R_DR2,R_DR3,R_DR6,R_DR7,
+    R_CR0,R_CR2,R_CR3,R_CR4,
+    R_TR3,R_TR4,R_TR5,R_TR6,R_TR7,
+    R_MM0,R_MM1,R_MM2,R_MM3,R_MM4,R_MM5,R_MM6,R_MM7,
+    R_XMM0,R_XMM1,R_XMM2,R_XMM3,R_XMM4,R_XMM5,R_XMM6,R_XMM7,
+    R_XMM8,R_XMM9,R_XMM10,R_XMM11,R_XMM12,R_XMM13,R_XMM14,R_XMM15
+  );
+
+   { A type to store register locations for 64 Bit values. }
+      tregister64 = tregister;
+
+   { alias for compact code }
+   treg64 = tregister64;
+
+   { Set type definition for registers }
+    tregisterset = set of tregister;
+
+   { Type definition for the array of string of register names }
+   reg2strtable = array[tregister] of string[6];
+
+const
+  firstreg = low(tregister);
+  lastreg  = high(tregister);
+
+  firstsreg = R_CS;
+  lastsreg  = R_GS;
+
+  regset8bit  : tregisterset = [R_AL..R_DH];
+  regset16bit : tregisterset = [R_AX..R_DI,R_CS..R_SS];
+  regset32bit : tregisterset = [R_EAX..R_EDI];
+
+  { Convert reg to opsize }
+  reg2opsize:array[firstreg..lastreg] of topsize = (S_NO,
+    S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,
+    S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,S_Q,
+    S_L,S_L,S_L,S_L,S_L,S_L,S_L,S_L,
+    S_L,S_L,S_L,S_L,S_L,S_L,S_L,S_L,
+    S_W,S_W,S_W,S_W,S_W,S_W,S_W,S_W,
+    S_W,S_W,S_W,S_W,S_W,S_W,S_W,S_W,
+    S_B,S_B,S_B,S_B,S_B,S_B,S_B,S_B,
+    S_B,S_B,S_B,S_B,S_B,S_B,S_B,S_B,
+    S_B,S_B,S_B,S_B,
+    S_W,S_W,S_W,S_W,S_W,S_W,
+    S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,S_FL,
+    S_L,S_L,S_L,S_L,S_L,S_L,
+    S_L,S_L,S_L,S_L,
+    S_L,S_L,S_L,S_L,S_L,
+    S_D,S_D,S_D,S_D,S_D,S_D,S_D,S_D,
+    S_D,S_D,S_D,S_D,S_D,S_D,S_D,S_D,
+    S_D,S_D,S_D,S_D,S_D,S_D,S_D,S_D
+  );
+
+  { Standard opcode string table (for each tasmop enumeration). The
+    opcode strings should conform to the names as defined by the
+    processor manufacturer.
+  }
+  std_op2str:op2strtable={$i x86_64in.inc}
+
+  { Standard register table (for each tregister enumeration). The
+    register strings should conform to the the names as defined
+    by the processor manufacturer
+  }
+  std_reg2str : reg2strtable = ('',
+    'rax','rcx','rdx','rbx','rsp','rbp','rsi','rdi',
+    'r8','r9','r10','r11','r12','r13','r14','r15','rip',
+    'eax','ecx','edx','ebx','esp','ebp','esi','edi',
+    'r8d','r9d','r10d','r11d','r12d','r13d','r14d','r15d',
+    'ax','cx','dx','bx','sp','bp','si','di',
+    'r8w','r9w','r10w','r11w','r12w','r13w','r14w','r15w',
+    'al','cl','dl','bl','spl','bpl','sil','dil',
+    'r8b','r9b','r10b','r11b','r12b','r13b','r14b','r15b',
+    'ah','ch','bh','dh',
+    'cs','ds','es','ss','fs','gs',
+    'st','st(0)','st(1)','st(2)','st(3)','st(4)','st(5)','st(6)','st(7)',
+    'dr0','dr1','dr2','dr3','dr6','dr7',
+    'cr0','cr2','cr3','cr4',
+    'tr3','tr4','tr5','tr6','tr7',
+    'mm0','mm1','mm2','mm3','mm4','mm5','mm6','mm7',
+    'xmm0','xmm1','xmm2','xmm3','xmm4','xmm5','xmm6','xmm7',
+    'xmm8','xmm9','xmm10','xmm11','xmm12','xmm13','xmm14','xmm15');
+
+{*****************************************************************************
+                                Conditions
+*****************************************************************************}
+
+type
+  TAsmCond=(C_None,
+    C_A,C_AE,C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_NA,C_NAE,
+    C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_NO,C_NP,
+    C_NS,C_NZ,C_O,C_P,C_PE,C_PO,C_S,C_Z
+  );
+
+const
+  cond2str:array[TAsmCond] of string[3]=('',
+    'a','ae','b','be','c','e','g','ge','l','le','na','nae',
+    'nb','nbe','nc','ne','ng','nge','nl','nle','no','np',
+    'ns','nz','o','p','pe','po','s','z'
+  );
+  inverse_cond:array[TAsmCond] of TAsmCond=(C_None,
+    C_NA,C_NAE,C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_A,C_AE,
+    C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_O,C_P,
+    C_S,C_Z,C_NO,C_NP,C_NP,C_P,C_NS,C_NZ
+  );
+
+
+{*****************************************************************************
+                                   Flags
+*****************************************************************************}
+
+    type
+       TResFlags = (F_E,F_NE,F_G,F_L,F_GE,F_LE,F_C,F_NC,F_A,F_AE,F_B,F_BE);
+
+{*****************************************************************************
+                                Reference
+*****************************************************************************}
+
+    type
+      trefoptions=(ref_none,ref_parafixup,ref_localfixup,ref_selffixup);
+
+      { immediate/reference record }
+      preference = ^treference;
+      treference = packed record
+         offset      : longint;
+         symbol      : tasmsymbol;
+         offsetfixup : longint;
+         segment,
+         base,
+         index       : tregister;
+         scalefactor : byte;
+         options     : trefoptions;
+         alignment   : byte;
+      end;
+
+      { reference record }
+      pparareference = ^tparareference;
+      tparareference = packed record
+         index       : tregister;
+         offset      : longint;
+      end;
+
+{*****************************************************************************
+                                Operands
+*****************************************************************************}
+
+       { Types of operand }
+        toptype=(top_none,top_reg,top_ref,top_const,top_symbol);
+
+        toper=record
+          ot  : longint;
+          case typ : toptype of
+           top_none   : ();
+           top_reg    : (reg:tregister);
+           top_ref    : (ref:preference);
+           top_const  : (val:longint);
+           top_symbol : (sym:tasmsymbol;symofs:longint);
+        end;
+
+{*****************************************************************************
+                               Generic Location
+*****************************************************************************}
+
+    type
+       TLoc=(
+         { added for tracking problems}
+         LOC_INVALID,
+         { contant }
+         LOC_CONSTANT,
+         { in a processor register }
+         LOC_REGISTER,
+         { in memory }
+         LOC_CREFERENCE,
+         { like LOC_MEM, but lvalue }
+         LOC_REFERENCE,
+         { boolean results only, jump to false or true label }
+         LOC_JUMP,
+         { boolean results only, flags are set }
+         LOC_FLAGS,
+         { Constant register which shouldn't be modified }
+         LOC_CREGISTER,
+         { MMX register }
+         LOC_MMXREGISTER,
+         { Constant MMX register }
+         LOC_CMMXREGISTER,
+         { FPU stack }
+         LOC_FPUREGISTER,
+         { if it is a FPU register variable on the fpu stack }
+         LOC_CFPUREGISTER,
+         LOC_SSEREGISTER,
+         LOC_CSSEREGISTER
+       );
+
+      { tparamlocation describes where a parameter for a procedure is stored.
+        References are given from the caller's point of view. The usual
+        TLocation isn't used, because contains a lot of unnessary fields.
+      }
+      tparalocation = packed record
+         loc  : TLoc;
+         sp_fixup : longint;
+         case TLoc of
+            LOC_REFERENCE : (reference : tparareference);
+            { segment in reference at the same place as in loc_register }
+            LOC_REGISTER,LOC_CREGISTER : (
+              case longint of
+                1 : (register,registerhigh : tregister);
+                { overlay a registerlow }
+                2 : (registerlow : tregister);
+                { overlay a 64 Bit register type }
+                3 : (reg64 : tregister64);
+                4 : (register64 : tregister64);
+              );
+            { it's only for better handling }
+            LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
+      end;
+
+  plocation = ^tlocation;
+  tlocation = packed record
+     loc : tloc;
+     size : TCGSize;
+     case  TLoc of
+        LOC_FLAGS : (resflags : tresflags);
+        LOC_CONSTANT : (
+          case longint of
+             1 : (value : AWord);
+             2 : (valuelow, valuehigh:AWord);
+             { overlay a complete 64 Bit value }
+             3 : (valueqword : qword);
+        );
+        LOC_CREFERENCE,LOC_REFERENCE : (reference : treference);
+        { segment in reference at the same place as in loc_register }
+        LOC_REGISTER,LOC_CREGISTER : (
+        case longint of
+          1 : (register,segment,registerhigh : tregister);
+          { overlay a registerlow }
+          2 : (registerlow : tregister);
+          { overlay a 64 Bit register type }
+          3 : (reg64 : tregister64);
+          4 : (register64 : tregister64);
+        );
+        { it's only for better handling }
+        LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
+  end;
+
+{*****************************************************************************
+                                 Constants
+*****************************************************************************}
+
+    const
+       max_operands = 3;
+
+       lvaluelocations = [LOC_REFERENCE,LOC_CFPUREGISTER,
+         LOC_CREGISTER,LOC_MMXREGISTER,LOC_CMMXREGISTER];
+
+       ALL_REGISTERS = [R_EAX..R_XMM15];
+
+       general_registers = [R_EAX,R_EBX,R_ECX,R_EDX];
+
+       { low and high of the available maximum width integer general purpose }
+       { registers                                                           }
+       LoGPReg = R_EAX;
+       HiGPReg = R_EDI;
+
+     { low and high of every possible width general purpose register (same as }
+     { above on most architctures apart from the 80x86)                       }
+       LoReg = R_EAX;
+       HiReg = R_BL;
+
+       intregs = general_registers;
+
+       maxvarregs = 4;
+       varregs : array[1..maxvarregs] of tregister =
+         (R_EBX,R_EDX,R_ECX,R_EAX);
+
+       usableregsint = [R_EAX,R_EBX,R_ECX,R_EDX];
+       c_countusableregsint = 4;
+
+       maxfpuvarregs = 16;
+
+       maxintregs = maxvarregs;
+       maxfpuregs = maxfpuvarregs;
+
+       fpuregs = [R_ST0..R_ST7];
+       usableregsfpu = [];
+       c_countusableregsfpu = 0;
+
+       mmregs = [R_MM0..R_MM7];
+       usableregsmm = [R_XMM0..R_XMM15];
+       c_countusableregsmm  = 8;
+
+       firstsaveintreg = R_EAX;
+       lastsaveintreg  = R_R15;
+       firstsavefpureg = R_NO;
+       lastsavefpureg  = R_NO;
+       firstsavemmreg  = R_XMM0;
+       lastsavemmreg   = R_XMM15;
+
+       registers_saved_on_cdecl = [R_ESI,R_EDI,R_EBX];
+
+       scratch_regs : array[1..1] of tregister = (R_EDI);
+
+
+{*****************************************************************************
+                          Default generic sizes
+*****************************************************************************}
+      { Defines the default address size for a processor, }
+      OS_ADDR = OS_32;
+      { the natural int size for a processor,             }
+      OS_INT = OS_32;
+      { the maximum float size for a processor,           }
+      OS_FLOAT = OS_F80;
+      { the size of a vector register for a processor     }
+      OS_VECTOR = OS_M64;
+
+  cpuflags = [];
+
+  { sizes }
+  pointersize   = 8;
+  extended_size = 10;
+  sizepostfix_pointer = S_L;
+
+
+{*****************************************************************************
+                          Generic Register names
+*****************************************************************************}
+
+       { location of function results }
+
+       stack_pointer_reg = R_ESP;
+       frame_pointer_reg = R_EBP;
+       self_pointer_reg  = R_ESI;
+       accumulator   = R_EAX;
+       accumulatorhigh = R_EDX;
+       { the register where the vmt offset is passed to the destructor }
+       { helper routine                                                }
+       vmt_offset_reg = R_EDI;
+
+       resultreg = R_RAX;
+       resultreg64 = R_RAX;
+       fpuresultreg = R_ST;
+
+{*****************************************************************************
+                       GCC /ABI linking information
+*****************************************************************************}
+
+    const
+      { Registers which must be saved when calling a routine declared as
+        cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
+        saved should be the ones as defined in the target ABI and / or GCC.
+
+        This value can be deduced from the CALLED_USED_REGISTERS array in the
+        GCC source.
+      }
+      std_saved_registers = [R_ESI,R_EDI,R_EBX];
+      { Required parameter alignment when calling a routine declared as
+        stdcall and cdecl. The alignment value should be the one defined
+        by GCC or the target ABI.
+
+         The value of this constant is equal to the constant
+         PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
+      }
+      std_param_align = 8;
+
+{*****************************************************************************
+                                  Helpers
+*****************************************************************************}
+
+    function is_calljmp(o:tasmop):boolean;
+
+    function flags_to_cond(const f: TResFlags) : TAsmCond;
+
+
+implementation
+
+{*****************************************************************************
+                                  Helpers
+*****************************************************************************}
+
+    function is_calljmp(o:tasmop):boolean;
+      begin
+        case o of
+          A_CALL,
+          A_JCXZ,
+          A_JECXZ,
+          A_JMP,
+          A_LOOP,
+          A_LOOPE,
+          A_LOOPNE,
+          A_LOOPNZ,
+          A_LOOPZ,
+          A_Jcc :
+            is_calljmp:=true;
+          else
+            is_calljmp:=false;
+        end;
+      end;
+
+
+    function flags_to_cond(const f: TResFlags) : TAsmCond;
+      const
+        flags_2_cond : array[TResFlags] of TAsmCond =
+          (C_E,C_NE,C_G,C_L,C_GE,C_LE,C_C,C_NC,C_A,C_AE,C_B,C_BE);
+      begin
+        result := flags_2_cond[f];
+      end;
+
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 62 - 0
compiler/x86_64/cpuinfo.pas

@@ -0,0 +1,62 @@
+{
+    $Id$
+    Copyright (c) 1998-2000 by Florian Klaempfl
+
+    Basic Processor information
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+Unit cpuinfo;
+
+{$i defines.inc}
+
+Interface
+
+Type
+   AWord = QWord;
+   PAWord = ^AWord;
+
+   { the ordinal type used when evaluating constant integer expressions }
+   TConstExprInt = int64;
+   { ... the same unsigned }
+   TConstExprUInt = {$ifdef fpc}qword{$else}int64{$endif};
+
+   { this must be an ordinal type with the same size as a pointer }
+   { Note: must be unsigned!! Otherwise, ugly code like           }
+   { pointer(-1) will result in a pointer with the value          }
+   { $fffffffffffffff on a 32bit machine if the compiler uses     }
+   { int64 constants internally (JM)                              }
+   TConstPtrUInt = qword;
+
+Const
+   { Size of native extended type }
+   extended_size = 10;
+   { Size of a pointer }
+   pointer_size  = 8;
+   { Size of a multimedia register }
+   mmreg_size = 16;
+
+
+Implementation
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 48 - 0
compiler/x86_64/cpunode.pas

@@ -0,0 +1,48 @@
+{
+    $Id$
+    Copyright (c) 2000 by Florian Klaempfl
+
+    Includes the x86-64 code generator
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This is a helper unit to include the necessary code generator units
+  for the x86-64 processor.
+}
+unit cpunode;
+
+{$i defines.inc}
+
+  interface
+
+  implementation
+
+    uses
+       ncgbas,ncgflw,ncgcnv,ncgmem,ncgcon
+       // n386ld,n386add,n386cal,n386con,n386flw,n386mat,n386mem,
+       // n386set,n386inl,n386opt,
+       { this not really a node }
+       // n386obj
+       ;
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 3 - 78
compiler/x86_64/cpupara.pas

@@ -30,7 +30,7 @@ unit cpupara;
 
     uses
        cpubase,
-       symconst,symbase,symtype,symdef,paramgr;
+       symdef,paramgr;
 
     type
        { Returns the location for the nr-st 32 Bit int parameter
@@ -46,75 +46,7 @@ unit cpupara;
   implementation
 
     uses
-       verbose,
-       globtype,
-       cpuinfo,cginfo,cgbase,
-       defutil;
-
-    function getparaloc(p : tdef) : tcgloc;
-
-      begin
-         { Later, the LOC_REFERENCE is in most cases changed into LOC_REGISTER
-           if push_addr_param for the def is true
-         }
-         // !!!!! Fix aggregate types
-         case p.deftype of
-            orddef:
-              getparaloc:=LOC_REGISTER;
-            floatdef:
-              case tfloatdef(p).typ of
-                 s80real:
-                   getparaloc:=LOC_REFERENCE;
-                 s32real,
-                 s64real,
-                 s64comp,
-                 s64currency,
-                 s128real:
-                   getparaloc:=LOC_MMREGISTER;
-              end;
-            enumdef:
-              getparaloc:=LOC_REGISTER;
-            pointerdef:
-              getparaloc:=LOC_REGISTER;
-            formaldef:
-              getparaloc:=LOC_REGISTER;
-            classrefdef:
-              getparaloc:=LOC_REGISTER;
-            recorddef:
-              getparaloc:=LOC_REFERENCE;
-            objectdef:
-              if is_object(p) then
-                getparaloc:=LOC_REFERENCE
-              else
-                getparaloc:=LOC_REGISTER;
-            stringdef:
-              if is_shortstring(p) or is_longstring(p) then
-                getparaloc:=LOC_REFERENCE
-              else
-                getparaloc:=LOC_REGISTER;
-            procvardef:
-              if (po_methodpointer in tprocvardef(p).procoptions) then
-                getparaloc:=LOC_REFERENCE
-              else
-                getparaloc:=LOC_REGISTER;
-            filedef:
-              getparaloc:=LOC_REGISTER;
-            arraydef:
-              getparaloc:=LOC_REFERENCE;
-            setdef:
-              if is_smallset(p) then
-                getparaloc:=LOC_REGISTER
-              else
-                getparaloc:=LOC_REFERENCE;
-            variantdef:
-              getparaloc:=LOC_REFERENCE;
-            { avoid problems with errornous definitions }
-            errordef:
-              getparaloc:=LOC_REGISTER;
-            else
-              internalerror(2002071001);
-         end;
-      end;
+       verbose;
 
     function tx86_64paramanager.getintparaloc(nr : longint) : tparalocation;
       begin
@@ -134,14 +66,7 @@ begin
 end.
 {
   $Log$
-  Revision 1.3  2002-04-25 16:12:09  florian
-    * fixed more problems with cpubase and x86-64
-
-  Revision 1.2  2003/01/05 13:36:54  florian
-    * x86-64 compiles
-    + very basic support for float128 type (x86-64 only)
-
-  Revision 1.1  2002/07/24 22:38:15  florian
+  Revision 1.1  2002-07-24 22:38:15  florian
     + initial release of x86-64 target code
 
 }

+ 115 - 0
compiler/x86_64/cpuswtch.pas

@@ -0,0 +1,115 @@
+{
+    $Id$
+    Copyright (c) 1998-2002 by Florian Klaempfl, Pierre Muller
+
+    interprets the commandline options which are i386 specific
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit cpuswtch;
+
+{$i fpcdefs.inc}
+
+interface
+
+uses
+  options;
+
+type
+  toptionx86_64=class(toption)
+    procedure interpret_proc_specific_options(const opt:string);override;
+  end;
+
+implementation
+
+uses
+  cutils,globtype,systems,globals;
+
+procedure toptionx86_64.interpret_proc_specific_options(const opt:string);
+var
+  j     : longint;
+  More  : string;
+begin
+  More:=Upper(copy(opt,3,length(opt)-2));
+  case opt[2] of
+   'O' : Begin
+           j := 3;
+           While (j <= Length(Opt)) Do
+             Begin
+               case opt[j] of
+                 '-' :
+                   begin
+                     initglobalswitches:=initglobalswitches-[cs_optimize,cs_fastoptimize,cs_slowoptimize,cs_littlesize,
+                       cs_regalloc,cs_uncertainopts];
+                     FillChar(ParaAlignment,sizeof(ParaAlignment),0);
+                   end;
+                 'a' :
+                   begin
+                     UpdateAlignmentStr(Copy(Opt,j+1,255),ParaAlignment);
+                     j:=length(Opt);
+                   end;
+                 'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];
+                 'G' : initglobalswitches:=initglobalswitches-[cs_littlesize];
+                 'r' :
+                   begin
+                     initglobalswitches:=initglobalswitches+[cs_regalloc];
+                     Simplify_ppu:=false;
+                   end;
+                 'u' : initglobalswitches:=initglobalswitches+[cs_uncertainopts];
+                 '1' : initglobalswitches:=initglobalswitches-[cs_fastoptimize,cs_slowoptimize]+[cs_optimize];
+                 '2' : initglobalswitches:=initglobalswitches-[cs_slowoptimize]+[cs_optimize,cs_fastoptimize];
+                 '3' : initglobalswitches:=initglobalswitches+[cs_optimize,cs_fastoptimize,cs_slowoptimize];
+                 else IllegalPara(opt);
+               End;
+               Inc(j)
+             end;
+         end;
+   'R' : begin
+           if More='ATT' then
+            initasmmode:=asmmode_i386_att
+           else
+            if More='INTEL' then
+             initasmmode:=asmmode_i386_intel
+           else
+            if More='DIRECT' then
+             initasmmode:=asmmode_i386_direct
+           else
+            IllegalPara(opt);
+         end;
+  else
+   IllegalPara(opt);
+  end;
+end;
+
+
+initialization
+  coption:=toptionx86_64;
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+  Revision 1.7  2002/05/18 13:34:22  peter
+    * readded missing revisions
+
+  Revision 1.6  2002/05/16 19:46:50  carl
+  + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+  + try to fix temp allocation (still in ifdef)
+  + generic constructor calls
+  + start of tassembler / tmodulebase class cleanup
+}

+ 73 - 0
compiler/x86_64/cputarg.pas

@@ -0,0 +1,73 @@
+{
+    $Id$
+    Copyright (c) 2001 by Peter Vreman
+
+    Includes the x86-64 dependent target units
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This unit includes the x86-64 dependent target units. }
+unit cputarg;
+
+{$i defines.inc}
+
+interface
+
+
+implementation
+
+    uses
+      systems { prevent a syntax error when nothing is included }
+
+{**************************************
+             Targets
+**************************************}
+
+    {$ifndef NOTARGETLINUX}
+      ,t_linux
+    {$endif}
+    {$ifndef NOTARGETFREEBSD}
+      ,t_fbsd
+    {$endif}
+    {$ifndef NOTARGETWIN32}
+      ,t_win32
+    {$endif}
+
+{**************************************
+             Assemblers
+**************************************}
+
+    {$ifndef NOAG386ATT}
+      ,agx64att
+    {$endif}
+
+      ,ogcoff
+      ,ogelf
+      ;
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+  Revision 1.2  2001/06/03 15:12:47  peter
+    * t_beos target inclusion
+
+  Revision 1.1  2001/04/18 22:02:01  peter
+    * registration of targets and assemblers
+}

+ 718 - 0
compiler/x86_64/rax86_64.pas

@@ -0,0 +1,718 @@
+{
+    $Id$
+    Copyright (c) 1998-2002 by Carl Eric Codere and Peter Vreman
+
+    Handles the common x86-64 assembler reader routines
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit rax86_64;
+
+{$i fpcdefs.inc}
+
+interface
+
+uses
+  aasmbase,aasmtai,aasmcpu,
+  cpubase,rautils,cclasses;
+
+{ Parser helpers }
+function is_prefix(t:tasmop):boolean;
+function is_override(t:tasmop):boolean;
+Function CheckPrefix(prefixop,op:tasmop): Boolean;
+Function CheckOverride(overrideop,op:tasmop): Boolean;
+Procedure FWaitWarning;
+
+type
+  T386Operand=class(TOperand)
+    Procedure SetCorrectSize(opcode:tasmop);override;
+  end;
+
+  T386Instruction=class(TInstruction)
+    { Operand sizes }
+    procedure AddReferenceSizes;
+    procedure SetInstructionOpsize;
+    procedure CheckOperandSizes;
+    procedure CheckNonCommutativeOpcodes;
+    { opcode adding }
+    procedure ConcatInstruction(p : taasmoutput);override;
+  end;
+
+  tstr2opentry = class(Tnamedindexitem)
+    op: TAsmOp;
+  end;
+
+const
+  AsmPrefixes = 6;
+  AsmPrefix : array[0..AsmPrefixes-1] of TasmOP =(
+    A_LOCK,A_REP,A_REPE,A_REPNE,A_REPNZ,A_REPZ
+  );
+
+  AsmOverrides = 6;
+  AsmOverride : array[0..AsmOverrides-1] of TasmOP =(
+    A_SEGCS,A_SEGES,A_SEGDS,A_SEGFS,A_SEGGS,A_SEGSS
+  );
+
+  CondAsmOps=3;
+  CondAsmOp:array[0..CondAsmOps-1] of TasmOp=(
+    A_CMOVcc, A_Jcc, A_SETcc
+  );
+  CondAsmOpStr:array[0..CondAsmOps-1] of string[4]=(
+    'CMOV','J','SET'
+  );
+
+implementation
+
+uses
+  globtype,globals,systems,verbose,
+  cpuinfo,agx64att;
+
+{$define ATTOP}
+{$define INTELOP}
+
+{$ifdef NORA386INT}
+  {$ifdef NOAG386NSM}
+    {$ifdef NOAG386INT}
+      {$undef INTELOP}
+    {$endif}
+  {$endif}
+{$endif}
+
+{$ifdef NORA386ATT}
+  {$ifdef NOAG386ATT}
+    {$undef ATTOP}
+  {$endif}
+{$endif}
+
+
+
+{*****************************************************************************
+                              Parser Helpers
+*****************************************************************************}
+
+function is_prefix(t:tasmop):boolean;
+var
+  i : longint;
+Begin
+  is_prefix:=false;
+  for i:=1 to AsmPrefixes do
+   if t=AsmPrefix[i-1] then
+    begin
+      is_prefix:=true;
+      exit;
+    end;
+end;
+
+
+function is_override(t:tasmop):boolean;
+var
+  i : longint;
+Begin
+  is_override:=false;
+  for i:=1 to AsmOverrides do
+   if t=AsmOverride[i-1] then
+    begin
+      is_override:=true;
+      exit;
+    end;
+end;
+
+
+Function CheckPrefix(prefixop,op:tasmop): Boolean;
+{ Checks if the prefix is valid with the following opcode }
+{ return false if not, otherwise true                          }
+Begin
+  CheckPrefix := TRUE;
+(*  Case prefix of
+    A_REP,A_REPNE,A_REPE:
+      Case opcode Of
+        A_SCASB,A_SCASW,A_SCASD,
+        A_INS,A_OUTS,A_MOVS,A_CMPS,A_LODS,A_STOS:;
+        Else
+          Begin
+            CheckPrefix := FALSE;
+            exit;
+          end;
+      end; { case }
+    A_LOCK:
+      Case opcode Of
+        A_BT,A_BTS,A_BTR,A_BTC,A_XCHG,A_ADD,A_OR,A_ADC,A_SBB,A_AND,A_SUB,
+        A_XOR,A_NOT,A_NEG,A_INC,A_DEC:;
+        Else
+          Begin
+            CheckPrefix := FALSE;
+            Exit;
+          end;
+      end; { case }
+    A_NONE: exit; { no prefix here }
+    else
+      CheckPrefix := FALSE;
+   end; { end case } *)
+end;
+
+
+Function CheckOverride(overrideop,op:tasmop): Boolean;
+{ Check if the override is valid, and if so then }
+{ update the instr variable accordingly.         }
+Begin
+  CheckOverride := true;
+{     Case instr.getinstruction of
+    A_MOVS,A_XLAT,A_CMPS:
+      Begin
+        CheckOverride := TRUE;
+        Message(assem_e_segment_override_not_supported);
+      end
+  end }
+end;
+
+
+Procedure FWaitWarning;
+begin
+  if (target_info.target=target_i386_GO32V2) and (cs_fp_emulation in aktmoduleswitches) then
+   Message(asmr_w_fwait_emu_prob);
+end;
+
+{*****************************************************************************
+                              T386Operand
+*****************************************************************************}
+
+Procedure T386Operand.SetCorrectSize(opcode:tasmop);
+begin
+  if att_needsuffix[opcode]=attsufFPU then
+    begin
+     case size of
+      S_L : size:=S_FS;
+      S_IQ : size:=S_FL;
+     end;
+    end
+  else if att_needsuffix[opcode]=attsufFPUint then
+    begin
+      case size of
+      S_W : size:=S_IS;
+      S_L : size:=S_IL;
+      end;
+    end;
+end;
+
+
+{*****************************************************************************
+                              T386Instruction
+*****************************************************************************}
+
+procedure T386Instruction.AddReferenceSizes;
+{ this will add the sizes for references like [esi] which do not
+  have the size set yet, it will take only the size if the other
+  operand is a register }
+var
+  operand2,i : longint;
+  s : tasmsymbol;
+  so : longint;
+begin
+  for i:=1to ops do
+   begin
+   operands[i].SetCorrectSize(opcode);
+   if (operands[i].size=S_NO) then
+    begin
+      case operands[i].Opr.Typ of
+        OPR_REFERENCE :
+          begin
+            if i=2 then
+             operand2:=1
+            else
+             operand2:=2;
+            if operand2<ops then
+             begin
+               { Only allow register as operand to take the size from }
+               if operands[operand2].opr.typ=OPR_REGISTER then
+                 begin
+                   if ((opcode<>A_MOVD) and
+                       (opcode<>A_CVTSI2SS)) then
+                     operands[i].size:=operands[operand2].size;
+                 end
+               else
+                begin
+                  { if no register then take the opsize (which is available with ATT),
+                    if not availble then give an error }
+                  if opsize<>S_NO then
+                    operands[i].size:=opsize
+                  else
+                   begin
+                     Message(asmr_e_unable_to_determine_reference_size);
+                     { recovery }
+                     operands[i].size:=S_L;
+                   end;
+                end;
+             end
+            else
+             begin
+               if opsize<>S_NO then
+                 operands[i].size:=opsize
+             end;
+          end;
+        OPR_SYMBOL :
+          begin
+            { Fix lea which need a reference }
+            if opcode=A_LEA then
+             begin
+               s:=operands[i].opr.symbol;
+               so:=operands[i].opr.symofs;
+               operands[i].opr.typ:=OPR_REFERENCE;
+               Fillchar(operands[i].opr.ref,sizeof(treference),0);
+               operands[i].opr.ref.symbol:=s;
+               operands[i].opr.ref.offset:=so;
+             end;
+            operands[i].size:=S_L;
+          end;
+      end;
+    end;
+   end;
+end;
+
+
+procedure T386Instruction.SetInstructionOpsize;
+begin
+  if opsize<>S_NO then
+   exit;
+  case ops of
+    0 : ;
+    1 :
+      { "push es" must be stored as a long PM }
+      if ((opcode=A_PUSH) or
+          (opcode=A_POP)) and
+         (operands[1].opr.typ=OPR_REGISTER) and
+         ((operands[1].opr.reg>=firstsreg) and
+          (operands[1].opr.reg<=lastsreg)) then
+        opsize:=S_L
+      else
+        opsize:=operands[1].size;
+    2 :
+      begin
+        case opcode of
+          A_MOVZX,A_MOVSX :
+            begin
+              case operands[1].size of
+                S_W :
+                  case operands[2].size of
+                    S_L :
+                      opsize:=S_WL;
+                  end;
+                S_B :
+                  case operands[2].size of
+                    S_W :
+                      opsize:=S_BW;
+                    S_L :
+                      opsize:=S_BL;
+                  end;
+              end;
+            end;
+          A_MOVD : { movd is a move from a mmx register to a
+                     32 bit register or memory, so no opsize is correct here PM }
+            exit;
+          A_OUT :
+            opsize:=operands[1].size;
+          else
+            opsize:=operands[2].size;
+        end;
+      end;
+    3 :
+      opsize:=operands[3].size;
+  end;
+end;
+
+
+procedure T386Instruction.CheckOperandSizes;
+var
+  sizeerr : boolean;
+  i : longint;
+begin
+  { Check only the most common opcodes here, the others are done in
+    the assembler pass }
+  case opcode of
+    A_PUSH,A_POP,A_DEC,A_INC,A_NOT,A_NEG,
+    A_CMP,A_MOV,
+    A_ADD,A_SUB,A_ADC,A_SBB,
+    A_AND,A_OR,A_TEST,A_XOR: ;
+  else
+    exit;
+  end;
+  { Handle the BW,BL,WL separatly }
+  sizeerr:=false;
+  { special push/pop selector case }
+  if ((opcode=A_PUSH) or
+      (opcode=A_POP)) and
+     (operands[1].opr.typ=OPR_REGISTER) and
+     ((operands[1].opr.reg>=firstsreg) and
+      (operands[1].opr.reg<=lastsreg)) then
+     exit;
+  if opsize in [S_BW,S_BL,S_WL] then
+   begin
+     if ops<>2 then
+      sizeerr:=true
+     else
+      begin
+        case opsize of
+          S_BW :
+            sizeerr:=(operands[1].size<>S_B) or (operands[2].size<>S_W);
+          S_BL :
+            sizeerr:=(operands[1].size<>S_B) or (operands[2].size<>S_L);
+          S_WL :
+            sizeerr:=(operands[1].size<>S_W) or (operands[2].size<>S_L);
+        end;
+      end;
+   end
+  else
+   begin
+     for i:=1 to ops do
+      begin
+        if (operands[i].opr.typ<>OPR_CONSTANT) and
+           (operands[i].size in [S_B,S_W,S_L]) and
+           (operands[i].size<>opsize) then
+         sizeerr:=true;
+      end;
+   end;
+  if sizeerr then
+   begin
+     { if range checks are on then generate an error }
+     if (cs_compilesystem in aktmoduleswitches) or
+        not (cs_check_range in aktlocalswitches) then
+       Message(asmr_w_size_suffix_and_dest_dont_match)
+     else
+       Message(asmr_e_size_suffix_and_dest_dont_match);
+   end;
+end;
+
+
+{ This check must be done with the operand in ATT order
+  i.e.after swapping in the intel reader
+  but before swapping in the NASM and TASM writers PM }
+procedure T386Instruction.CheckNonCommutativeOpcodes;
+begin
+  if ((ops=2) and
+     (operands[1].opr.typ=OPR_REGISTER) and
+     (operands[2].opr.typ=OPR_REGISTER) and
+     { if the first is ST and the second is also a register
+       it is necessarily ST1 .. ST7 }
+     (operands[1].opr.reg=R_ST)) or
+      (ops=0)  then
+      if opcode=A_FSUBR then
+        opcode:=A_FSUB
+      else if opcode=A_FSUB then
+        opcode:=A_FSUBR
+      else if opcode=A_FDIVR then
+        opcode:=A_FDIV
+      else if opcode=A_FDIV then
+        opcode:=A_FDIVR
+      else if opcode=A_FSUBRP then
+        opcode:=A_FSUBP
+      else if opcode=A_FSUBP then
+        opcode:=A_FSUBRP
+      else if opcode=A_FDIVRP then
+        opcode:=A_FDIVP
+      else if opcode=A_FDIVP then
+        opcode:=A_FDIVRP;
+  if  ((ops=1) and
+      (operands[1].opr.typ=OPR_REGISTER) and
+      (operands[1].opr.reg in [R_ST1..R_ST7])) then
+      if opcode=A_FSUBRP then
+        opcode:=A_FSUBP
+      else if opcode=A_FSUBP then
+        opcode:=A_FSUBRP
+      else if opcode=A_FDIVRP then
+        opcode:=A_FDIVP
+      else if opcode=A_FDIVP then
+        opcode:=A_FDIVRP;
+end;
+
+{*****************************************************************************
+                              opcode Adding
+*****************************************************************************}
+
+procedure T386Instruction.ConcatInstruction(p : taasmoutput);
+var
+  siz  : topsize;
+  i,asize : longint;
+  ai   : taicpu;
+begin
+{ Get Opsize }
+  if (opsize<>S_NO) or (Ops=0) then
+   siz:=opsize
+  else
+   begin
+     if (Ops=2) and (operands[1].opr.typ=OPR_REGISTER) then
+      siz:=operands[1].size
+     else
+      siz:=operands[Ops].size;
+     { MOVD should be of size S_LQ or S_QL, but these do not exist PM }
+     if (ops=2) and (operands[1].size<>S_NO) and
+        (operands[2].size<>S_NO) and (operands[1].size<>operands[2].size) then
+       siz:=S_NO;
+   end;
+
+   if ((opcode=A_MOVD)or
+       (opcode=A_CVTSI2SS)) and
+      ((operands[1].size=S_NO) or
+       (operands[2].size=S_NO)) then
+     siz:=S_NO;
+   { NASM does not support FADD without args
+     as alias of FADDP
+     and GNU AS interprets FADD without operand differently
+     for version 2.9.1 and 2.9.5 !! }
+   if (ops=0) and
+      ((opcode=A_FADD) or
+       (opcode=A_FMUL) or
+       (opcode=A_FSUB) or
+       (opcode=A_FSUBR) or
+       (opcode=A_FDIV) or
+       (opcode=A_FDIVR)) then
+     begin
+       if opcode=A_FADD then
+         opcode:=A_FADDP
+       else if opcode=A_FMUL then
+         opcode:=A_FMULP
+       else if opcode=A_FSUB then
+         opcode:=A_FSUBP
+       else if opcode=A_FSUBR then
+         opcode:=A_FSUBRP
+       else if opcode=A_FDIV then
+         opcode:=A_FDIVP
+       else if opcode=A_FDIVR then
+         opcode:=A_FDIVRP;
+{$ifdef ATTOP}
+       message1(asmr_w_fadd_to_faddp,att_op2str[opcode]);
+{$else}
+  {$ifdef INTELOP}
+       message1(asmr_w_fadd_to_faddp,std_op2str[opcode]);
+  {$else}
+       message1(asmr_w_fadd_to_faddp,'fXX');
+  {$endif INTELOP}
+{$endif ATTOP}
+     end;
+
+   { GNU AS interprets FDIV without operand differently
+     for version 2.9.1 and 2.10
+     we add explicit args to it !! }
+  if (ops=0) and
+     ((opcode=A_FSUBP) or
+      (opcode=A_FSUBRP) or
+      (opcode=A_FDIVP) or
+      (opcode=A_FDIVRP) or
+      (opcode=A_FSUB) or
+      (opcode=A_FSUBR) or
+      (opcode=A_FDIV) or
+      (opcode=A_FDIVR)) then
+     begin
+{$ifdef ATTOP}
+       message1(asmr_w_adding_explicit_args_fXX,att_op2str[opcode]);
+{$else}
+  {$ifdef INTELOP}
+       message1(asmr_w_adding_explicit_args_fXX,att_op2str[opcode]);
+  {$else}
+       message1(asmr_w_adding_explicit_args_fXX,'fXX');
+  {$endif INTELOP}
+{$endif ATTOP}
+       ops:=2;
+       operands[1].opr.typ:=OPR_REGISTER;
+       operands[2].opr.typ:=OPR_REGISTER;
+       operands[1].opr.reg:=R_ST;
+       operands[2].opr.reg:=R_ST1;
+     end;
+  if (ops=1) and
+      ((operands[1].opr.typ=OPR_REGISTER) and
+      (operands[1].opr.reg in [R_ST1..R_ST7])) and
+      ((opcode=A_FSUBP) or
+      (opcode=A_FSUBRP) or
+      (opcode=A_FDIVP) or
+      (opcode=A_FDIVRP) or
+      (opcode=A_FADDP) or
+      (opcode=A_FMULP)) then
+     begin
+{$ifdef ATTOP}
+       message1(asmr_w_adding_explicit_first_arg_fXX,att_op2str[opcode]);
+{$else}
+  {$ifdef INTELOP}
+       message1(asmr_w_adding_explicit_first_arg_fXX,std_op2str[opcode]);
+  {$else}
+       message1(asmr_w_adding_explicit_first_arg_fXX,'fXX');
+  {$endif INTELOP}
+{$endif ATTOP}
+       ops:=2;
+       operands[2].opr.typ:=OPR_REGISTER;
+       operands[2].opr.reg:=operands[1].opr.reg;
+       operands[1].opr.reg:=R_ST;
+     end;
+
+  if (ops=1) and
+      ((operands[1].opr.typ=OPR_REGISTER) and
+      (operands[1].opr.reg in [R_ST1..R_ST7])) and
+      ((opcode=A_FSUB) or
+      (opcode=A_FSUBR) or
+      (opcode=A_FDIV) or
+      (opcode=A_FDIVR) or
+      (opcode=A_FADD) or
+      (opcode=A_FMUL)) then
+     begin
+{$ifdef ATTOP}
+       message1(asmr_w_adding_explicit_second_arg_fXX,att_op2str[opcode]);
+{$else}
+  {$ifdef INTELOP}
+       message1(asmr_w_adding_explicit_second_arg_fXX,std_op2str[opcode]);
+  {$else}
+       message1(asmr_w_adding_explicit_second_arg_fXX,'fXX');
+  {$endif INTELOP}
+{$endif ATTOP}
+       ops:=2;
+       operands[2].opr.typ:=OPR_REGISTER;
+       operands[2].opr.reg:=R_ST;
+     end;
+
+   { I tried to convince Linus Torwald to add
+     code to support ENTER instruction
+     (when raising a stack page fault)
+     but he replied that ENTER is a bad instruction and
+     Linux does not need to support it
+     So I think its at least a good idea to add a warning
+     if someone uses this in assembler code
+     FPC itself does not use it at all PM }
+   if (opcode=A_ENTER) and ((target_info.target=target_i386_linux) or
+        (target_info.target=target_i386_FreeBSD)) then
+     begin
+       message(asmr_w_enter_not_supported_by_linux);
+     end;
+
+  ai:=taicpu.op_none(opcode,siz);
+  ai.Ops:=Ops;
+  for i:=1to Ops do
+   begin
+     case operands[i].opr.typ of
+       OPR_CONSTANT :
+         ai.loadconst(i-1,aword(operands[i].opr.val));
+       OPR_REGISTER:
+         ai.loadreg(i-1,operands[i].opr.reg);
+       OPR_SYMBOL:
+         ai.loadsymbol(i-1,operands[i].opr.symbol,operands[i].opr.symofs);
+       OPR_REFERENCE:
+         begin
+           ai.loadref(i-1,operands[i].opr.ref);
+           if operands[i].size<>S_NO then
+             begin
+               asize:=0;
+               case operands[i].size of
+                   S_B :
+                     asize:=OT_BITS8;
+                   S_W, S_IS :
+                     asize:=OT_BITS16;
+                   S_L, S_IL, S_FS:
+                     asize:=OT_BITS32;
+                   S_Q, S_D, S_FL, S_FV :
+                     asize:=OT_BITS64;
+                   S_FX :
+                     asize:=OT_BITS80;
+                 end;
+               if asize<>0 then
+                 ai.oper[i-1].ot:=(ai.oper[i-1].ot and not OT_SIZE_MASK) or asize;
+             end;
+         end;
+     end;
+   end;
+
+  if (opcode=A_CALL) and (opsize=S_FAR) then
+    opcode:=A_LCALL;
+  if (opcode=A_JMP) and (opsize=S_FAR) then
+    opcode:=A_LJMP;
+  if (opcode=A_LCALL) or (opcode=A_LJMP) then
+    opsize:=S_FAR;
+ { Condition ? }
+  if condition<>C_None then
+   ai.SetCondition(condition);
+
+ { Concat the opcode or give an error }
+  if assigned(ai) then
+   begin
+     { Check the instruction if it's valid }
+{$ifndef NOAG386BIN}
+     ai.CheckIfValid;
+{$endif NOAG386BIN}
+     p.concat(ai);
+   end
+  else
+   Message(asmr_e_invalid_opcode_and_operand);
+end;
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+  Revision 1.22  2002/07/01 18:46:34  peter
+    * internal linker
+    * reorganized aasm layer
+
+  Revision 1.21  2002/05/18 13:34:25  peter
+    * readded missing revisions
+
+  Revision 1.20  2002/05/16 19:46:52  carl
+  + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+  + try to fix temp allocation (still in ifdef)
+  + generic constructor calls
+  + start of tassembler / tmodulebase class cleanup
+
+  Revision 1.18  2002/05/12 16:53:18  peter
+    * moved entry and exitcode to ncgutil and cgobj
+    * foreach gets extra argument for passing local data to the
+      iterator function
+    * -CR checks also class typecasts at runtime by changing them
+      into as
+    * fixed compiler to cycle with the -CR option
+    * fixed stabs with elf writer, finally the global variables can
+      be watched
+    * removed a lot of routines from cga unit and replaced them by
+      calls to cgobj
+    * u32bit-s32bit updates for and,or,xor nodes. When one element is
+      u32bit then the other is typecasted also to u32bit without giving
+      a rangecheck warning/error.
+    * fixed pascal calling method with reversing also the high tree in
+      the parast, detected by tcalcst3 test
+
+  Revision 1.17  2002/04/15 19:12:09  carl
+  + target_info.size_of_pointer -> pointer_size
+  + some cleanup of unused types/variables
+  * move several constants from cpubase to their specific units
+    (where they are used)
+  + att_Reg2str -> gas_reg2str
+  + int_reg2str -> std_reg2str
+
+  Revision 1.16  2002/04/04 19:06:13  peter
+    * removed unused units
+    * use tlocation.size in cg.a_*loc*() routines
+
+  Revision 1.15  2002/04/02 17:11:39  peter
+    * tlocation,treference update
+    * LOC_CONSTANT added for better constant handling
+    * secondadd splitted in multiple routines
+    * location_force_reg added for loading a location to a register
+      of a specified size
+    * secondassignment parses now first the right and then the left node
+      (this is compatible with Kylix). This saves a lot of push/pop especially
+      with string operations
+    * adapted some routines to use the new cg methods
+
+  Revision 1.14  2002/01/24 18:25:53  peter
+   * implicit result variable generation for assembler routines
+   * removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead
+
+}

+ 309 - 0
compiler/x86_64/rax86dir.pas

@@ -0,0 +1,309 @@
+{
+    $Id$
+    Copyright (c) 1998-2001 by Florian Klaempfl
+
+    Reads inline assembler and writes the lines direct to the output
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit Rax86dir;
+
+{$i defines.inc}
+
+interface
+
+    uses
+      node;
+
+     function assemble : tnode;
+
+  implementation
+
+    uses
+       { common }
+       cutils,
+       { global }
+       globals,verbose,
+       systems,
+       { aasm }
+       cpubase,aasmtai,
+       { symtable }
+       symconst,symbase,symtype,symsym,symtable,defbase,paramgr,
+       { pass 1 }
+       nbas,
+       { parser }
+       scanner,
+       rax86_64,
+       agx64att,
+       { codegen }
+       cgbase
+       ;
+
+    function assemble : tnode;
+
+      var
+         retstr,s,hs : string;
+         c : char;
+         ende : boolean;
+         srsym,sym : tsym;
+         srsymtable : tsymtable;
+         code : TAAsmoutput;
+         i,l : longint;
+
+       procedure writeasmline;
+         var
+           i : longint;
+         begin
+           i:=length(s);
+           while (i>0) and (s[i] in [' ',#9]) do
+            dec(i);
+           s[0]:=chr(i);
+           if s<>'' then
+            code.concat(Tai_direct.Create(strpnew(s)));
+            { consider it set function set if the offset was loaded }
+           if assigned(aktprocdef.funcretsym) and
+              (pos(retstr,upper(s))>0) then
+             tfuncretsym(aktprocdef.funcretsym).funcretstate:=vs_assigned;
+           s:='';
+         end;
+
+     begin
+       ende:=false;
+       s:='';
+       if assigned(aktprocdef.funcretsym) and
+          is_fpu(aktprocdef.rettype.def) then
+         tfuncretsym(aktprocdef.funcretsym).funcretstate:=vs_assigned;
+       if (not is_void(aktprocdef.rettype.def)) then
+         retstr:=upper(tostr(procinfo^.return_offset)+'('+att_reg2str[procinfo^.framepointer]+')')
+       else
+         retstr:='';
+         c:=current_scanner.asmgetchar;
+         code:=TAAsmoutput.Create;
+         while not(ende) do
+           begin
+              { wrong placement
+              current_scanner.gettokenpos; }
+              case c of
+                 'A'..'Z','a'..'z','_' : begin
+                      current_scanner.gettokenpos;
+                      i:=0;
+                      hs:='';
+                      while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
+                         or ((ord(c)>=ord('a')) and (ord(c)<=ord('z')))
+                         or ((ord(c)>=ord('0')) and (ord(c)<=ord('9')))
+                         or (c='_') do
+                        begin
+                           inc(i);
+                           hs[i]:=c;
+                           c:=current_scanner.asmgetchar;
+                        end;
+                      hs[0]:=chr(i);
+                      if upper(hs)='END' then
+                         ende:=true
+                      else
+                         begin
+                            if c=':' then
+                              begin
+                                searchsym(upper(hs),srsym,srsymtable);
+                                if srsym<>nil then
+                                  if (srsym.typ = labelsym) then
+                                    Begin
+                                       hs:=tlabelsym(srsym).lab.name;
+                                       tlabelsym(srsym).lab.is_set:=true;
+                                    end
+                                  else
+                                    Message(asmr_w_using_defined_as_local);
+                              end
+                            else if upper(hs)='FWAIT' then
+                             FwaitWarning
+                            else
+                            { access to local variables }
+                            if assigned(aktprocdef) then
+                              begin
+                                 { is the last written character an special }
+                                 { char ?                                   }
+                                 if (s[length(s)]='%') and
+                                    paramanager.ret_in_acc(aktprocdef.rettype.def) and
+                                    ((pos('AX',upper(hs))>0) or
+                                    (pos('AL',upper(hs))>0)) then
+                                   tfuncretsym(aktprocdef.funcretsym).funcretstate:=vs_assigned;
+                                 if (s[length(s)]<>'%') and
+                                   (s[length(s)]<>'$') and
+                                   ((s[length(s)]<>'0') or (hs[1]<>'x')) then
+                                   begin
+                                      if assigned(aktprocdef.localst) and
+                                         (lexlevel >= normal_function_level) then
+                                        sym:=tsym(aktprocdef.localst.search(upper(hs)))
+                                      else
+                                        sym:=nil;
+                                      if assigned(sym) then
+                                        begin
+                                           if (sym.typ = labelsym) then
+                                             Begin
+                                                hs:=tlabelsym(sym).lab.name;
+                                             end
+                                           else if sym.typ=varsym then
+                                             begin
+                                             {variables set are after a comma }
+                                             {like in movl %eax,I }
+                                             if pos(',',s) > 0 then
+                                               tvarsym(sym).varstate:=vs_used
+                                             else
+                                             if (pos('MOV',upper(s)) > 0) and (tvarsym(sym).varstate=vs_declared) then
+                                              Message1(sym_n_uninitialized_local_variable,hs);
+                                             if (vo_is_external in tvarsym(sym).varoptions) then
+                                               hs:=tvarsym(sym).mangledname
+                                             else
+                                               hs:='-'+tostr(tvarsym(sym).address)+
+                                                   '('+att_reg2str[procinfo^.framepointer]+')';
+                                             end
+                                           else
+                                           { call to local function }
+                                           if (sym.typ=procsym) and ((pos('CALL',upper(s))>0) or
+                                              (pos('LEA',upper(s))>0)) then
+                                             begin
+                                                hs:=tprocsym(sym).defs^.def.mangledname;
+                                             end;
+                                        end
+                                      else
+                                        begin
+                                           if assigned(aktprocdef.parast) then
+                                             sym:=tsym(aktprocdef.parast.search(upper(hs)))
+                                           else
+                                             sym:=nil;
+                                           if assigned(sym) then
+                                             begin
+                                                if sym.typ=varsym then
+                                                  begin
+                                                     l:=tvarsym(sym).address;
+                                                     { set offset }
+                                                     inc(l,aktprocdef.parast.address_fixup);
+                                                     hs:=tostr(l)+'('+att_reg2str[procinfo^.framepointer]+')';
+                                                     if pos(',',s) > 0 then
+                                                       tvarsym(sym).varstate:=vs_used;
+                                                  end;
+                                             end
+                                      { I added that but it creates a problem in line.ppi
+                                      because there is a local label wbuffer and
+                                      a static variable WBUFFER ...
+                                      what would you decide, florian ?}
+                                      else
+
+                                        begin
+                                           searchsym(upper(hs),sym,srsymtable);
+                                           if assigned(sym) and (sym.owner.symtabletype in [globalsymtable,staticsymtable]) then
+                                             begin
+                                               case sym.typ of
+                                                 varsym :
+                                                   begin
+                                                     Message2(asmr_h_direct_global_to_mangled,hs,tvarsym(sym).mangledname);
+                                                     hs:=tvarsym(sym).mangledname;
+                                                     inc(tvarsym(sym).refs);
+                                                   end;
+                                                 typedconstsym :
+                                                   begin
+                                                     Message2(asmr_h_direct_global_to_mangled,hs,ttypedconstsym(sym).mangledname);
+                                                     hs:=ttypedconstsym(sym).mangledname;
+                                                   end;
+                                                 procsym :
+                                                   begin
+                                                     { procs can be called or the address can be loaded }
+                                                     if ((pos('CALL',upper(s))>0) or (pos('LEA',upper(s))>0)) then
+                                                      begin
+                                                        if assigned(tprocsym(sym).defs^.def) then
+                                                          Message1(asmr_w_direct_global_is_overloaded_func,hs);
+                                                        Message2(asmr_h_direct_global_to_mangled,hs,tprocsym(sym).defs^.def.mangledname);
+                                                        hs:=tprocsym(sym).defs^.def.mangledname;
+                                                      end;
+                                                   end;
+                                                 else
+                                                   Message(asmr_e_wrong_sym_type);
+                                               end;
+                                             end
+                                           else if upper(hs)='__SELF' then
+                                             begin
+                                                if assigned(procinfo^._class) then
+                                                  hs:=tostr(procinfo^.selfpointer_offset)+
+                                                      '('+att_reg2str[procinfo^.framepointer]+')'
+                                                else
+                                                 Message(asmr_e_cannot_use_SELF_outside_a_method);
+                                             end
+                                           else if upper(hs)='__RESULT' then
+                                             begin
+                                                if (not is_void(aktprocdef.rettype.def)) then
+                                                  hs:=retstr
+                                                else
+                                                  Message(asmr_e_void_function);
+                                             end
+                                           else if upper(hs)='__OLDEBP' then
+                                             begin
+                                                { complicate to check there }
+                                                { we do it: }
+                                                if lexlevel>normal_function_level then
+                                                  hs:=tostr(procinfo^.framepointer_offset)+
+                                                    '('+att_reg2str[procinfo^.framepointer]+')'
+                                                else
+                                                  Message(asmr_e_cannot_use_OLDEBP_outside_nested_procedure);
+                                             end;
+                                           end;
+                                        end;
+                                   end;
+                              end;
+                            s:=s+hs;
+                         end;
+                   end;
+ '{',';',#10,#13 : begin
+                      if pos(retstr,s) > 0 then
+                        tfuncretsym(aktprocdef.funcretsym).funcretstate:=vs_assigned;
+                     writeasmline;
+                     c:=current_scanner.asmgetchar;
+                   end;
+             #26 : Message(scan_f_end_of_file);
+             else
+               begin
+                 current_scanner.gettokenpos;
+                 inc(byte(s[0]));
+                 s[length(s)]:=c;
+                 c:=current_scanner.asmgetchar;
+               end;
+           end;
+         end;
+       writeasmline;
+       assemble:=casmnode.create(code);
+     end;
+
+{*****************************************************************************
+                                     Initialize
+*****************************************************************************}
+
+const
+  asmmode_i386_direct_info : tasmmodeinfo =
+          (
+            id    : asmmode_i386_direct;
+            idtxt : 'DIRECT'
+          );
+
+initialization
+  RegisterAsmMode(asmmode_i386_direct_info);
+
+end.
+{
+  $Log$
+  Revision 1.1  2002-07-24 22:38:15  florian
+    + initial release of x86-64 target code
+
+}

+ 216 - 156
compiler/x86_64/rgcpu.pas

@@ -38,11 +38,9 @@ unit rgcpu;
        trgcpu = class(trgobj)
 
           { to keep the same allocation order as with the old routines }
-          function getregisterint(list:Taasmoutput;size:Tcgsize):Tregister;override;
-{$ifndef newra}
-          procedure ungetregisterint(list:Taasmoutput;r:Tregister); override;
-          function getexplicitregisterint(list:Taasmoutput;r:Tnewregister):Tregister;override;
-{$endif newra}
+          function getregisterint(list: taasmoutput): tregister; override;
+          procedure ungetregisterint(list: taasmoutput; r : tregister); override;
+          function getexplicitregisterint(list: taasmoutput; r : tregister) : tregister; override;
 
           function getregisterfpu(list: taasmoutput) : tregister; override;
           procedure ungetregisterfpu(list: taasmoutput; r : tregister); override;
@@ -56,6 +54,17 @@ unit rgcpu;
           }
           function makeregsize(reg: tregister; size: tcgsize): tregister; override;
 
+          { pushes and restores registers }
+          procedure pushusedregisters(list: taasmoutput;
+            var pushed : tpushedsaved;const s: tregisterset);
+          procedure popusedregisters(list: taasmoutput;
+            const pushed : tpushedsaved);
+
+          procedure saveusedregisters(list: taasmoutput;
+            var saved : tpushedsaved;const s: tregisterset);override;
+          procedure restoreusedregisters(list: taasmoutput;
+            const saved : tpushedsaved);override;
+
           procedure resetusableregisters;override;
 
          { corrects the fpu stack register by ofs }
@@ -75,106 +84,63 @@ unit rgcpu;
 {************************************************************************}
 {                         routine helpers                                }
 {************************************************************************}
-
+{
   const
-    reg2reg64 : array[firstreg..lastreg] of toldregister = (R_NO,
-      R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,
-      R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15,R_RIP,
-      R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,
-      R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15,
-      R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,
-      R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15,
-      R_RAX,R_RCX,R_RDX,R_RBX,R_RSP,R_RBP,R_RSI,R_RDI,
-      R_R8,R_R9,R_R10,R_R11,R_R12,R_R13,R_R14,R_R15,
-      R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO
-    );
-
-    reg2reg32 : array[firstreg..lastreg] of toldregister = (R_NO,
-      R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
-      R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D,R_NO,
+    reg2reg32 : array[tregister] of tregister = (R_NO,
       R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
-      R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D,
       R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
-      R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D,
-      R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI,
-      R_R8D,R_R9D,R_R10D,R_R11D,R_R12D,R_R13D,R_R14D,R_R15D,
-      R_NO,R_NO,R_NO,R_NO,
+      R_EAX,R_ECX,R_EDX,R_EBX,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO
     );
-
-    reg2reg16 : array[firstreg..lastreg] of toldregister = (R_NO,
-      R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
-      R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W,R_NO,
+    reg2reg16 : array[tregister] of tregister = (R_NO,
       R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
-      R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W,
       R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
-      R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W,
-      R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI,
-      R_R8W,R_R9W,R_R10W,R_R11W,R_R12W,R_R13W,R_R14W,R_R15W,
-      R_NO,R_NO,R_NO,R_NO,
+      R_AX,R_CX,R_DX,R_BX,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO
     );
-
-    reg2reg8 : array[firstreg..lastreg] of toldregister = (R_NO,
-      R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,
-      R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B,R_NO,
-      R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,
-      R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B,
-      R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,
-      R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B,
-      R_AL,R_CL,R_DL,R_BL,R_SPL,R_BPL,R_SIL,R_DIL,
-      R_R8B,R_R9B,R_R10B,R_R11B,R_R12B,R_R13B,R_R14B,R_R15B,
-      R_NO,R_NO,R_NO,R_NO,
+    reg2reg8 : array[tregister] of tregister = (R_NO,
+      R_AL,R_CL,R_DL,R_BL,R_NO,R_NO,R_NO,R_NO,
+      R_AL,R_CL,R_DL,R_BL,R_NO,R_NO,R_NO,R_NO,
+      R_AL,R_CL,R_DL,R_BL,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
-      R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,
       R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO,R_NO
     );
-
+}
     { convert a register to a specfied register size }
     function changeregsize(r:tregister;size:topsize):tregister;
       var
         reg : tregister;
       begin
+        {
         case size of
           S_B :
-            reg.enum:=reg2reg8[r.enum];
+            reg:=reg2reg8[r];
           S_W :
-            reg.enum:=reg2reg16[r.enum];
+            reg:=reg2reg16[r];
           S_L :
-            reg.enum:=reg2reg32[r.enum];
-          S_Q :
-            reg.enum:=reg2reg64[r.enum];
+            reg:=reg2reg32[r];
           else
+          }
             internalerror(200204101);
-        end;
-        if reg.enum=R_NO then
+        // end;
+        if reg=R_NO then
          internalerror(200204102);
         changeregsize:=reg;
       end;
@@ -184,109 +150,91 @@ unit rgcpu;
 {                               trgcpu                                   }
 {************************************************************************}
 
-    function trgcpu.getregisterint(list: taasmoutput;size:Tcgsize): tregister;
-    var subreg:Tsubregister;
-
-    begin
-      subreg:=cgsize2subreg(size);
-
-      if countunusedregsint=0 then
-        internalerror(10);
-      result.enum:=R_INTREGISTER;
+    function trgcpu.getregisterint(list: taasmoutput): tregister;
+      begin
+         if countunusedregsint=0 then
+           internalerror(10);
 {$ifdef TEMPREGDEBUG}
-      if curptree^.usableregsint-countunusedregsint>curptree^.registers32 then
-        internalerror(10);
+         if curptree^.usableregsint-countunusedregsint>curptree^.registers32 then
+           internalerror(10);
 {$endif TEMPREGDEBUG}
 {$ifdef EXTTEMPREGDEBUG}
-      if curptree^.usableregs-countunusedregistersint>curptree^^.reallyusedregs then
-        curptree^.reallyusedregs:=curptree^^.usableregs-countunusedregistersint;
+         if curptree^.usableregs-countunusedregistersint>curptree^^.reallyusedregs then
+           curptree^.reallyusedregs:=curptree^^.usableregs-countunusedregistersint;
 {$endif EXTTEMPREGDEBUG}
-      if RS_RAX in unusedregsint then
-        begin
-          dec(countunusedregsint);
-          exclude(unusedregsint,RS_RAX);
-          include(usedintinproc,RS_RAX);
-          result.number:=RS_RAX shl 8 or subreg;
+         dec(countunusedregsint);
+         if R_EAX in unusedregsint then
+           begin
+              exclude(unusedregsint,R_EAX);
+              include(usedinproc,R_EAX);
+              getregisterint:=R_EAX;
 {$ifdef TEMPREGDEBUG}
-          reg_user[R_RAX]:=curptree^;
+              reg_user[R_EAX]:=curptree^;
 {$endif TEMPREGDEBUG}
-          exprasmlist.concat(tai_regalloc.alloc(result));
-        end
-      else if RS_RDX in unusedregsint then
-        begin
-          dec(countunusedregsint);
-          exclude(unusedregsint,RS_RDX);
-          include(usedintinproc,RS_RDX);
-          result.number:=RS_RDX shl 8 or subreg;
+              exprasmlist.concat(tai_regalloc.alloc(R_EAX));
+           end
+         else if R_EDX in unusedregsint then
+           begin
+              exclude(unusedregsint,R_EDX);
+              include(usedinproc,R_EDX);
+              getregisterint:=R_EDX;
 {$ifdef TEMPREGDEBUG}
-          reg_user[R_RDX]:=curptree^;
+              reg_user[R_EDX]:=curptree^;
 {$endif TEMPREGDEBUG}
-          exprasmlist.concat(tai_regalloc.alloc(result));
-        end
-      else if RS_RBX in unusedregsint then
-        begin
-          dec(countunusedregsint);
-          exclude(unusedregsint,RS_RBX);
-          include(usedintinproc,RS_RBX);
-          result.number:=RS_RBX shl 8 or subreg;
+              exprasmlist.concat(tai_regalloc.alloc(R_EDX));
+           end
+         else if R_EBX in unusedregsint then
+           begin
+              exclude(unusedregsint,R_EBX);
+              include(usedinproc,R_EBX);
+              getregisterint:=R_EBX;
 {$ifdef TEMPREGDEBUG}
-          reg_user[R_RBX]:=curptree^;
+              reg_user[R_EBX]:=curptree^;
 {$endif TEMPREGDEBUG}
-          exprasmlist.concat(tai_regalloc.alloc(result));
-        end
-      else if RS_RCX in unusedregsint then
-        begin
-          dec(countunusedregsint);
-          exclude(unusedregsint,RS_RCX);
-          include(usedintinproc,RS_RCX);
-          result.number:=RS_RCX shl 8 or subreg;
+              exprasmlist.concat(tai_regalloc.alloc(R_EBX));
+           end
+         else if R_ECX in unusedregsint then
+           begin
+              exclude(unusedregsint,R_ECX);
+              include(usedinproc,R_ECX);
+              getregisterint:=R_ECX;
 {$ifdef TEMPREGDEBUG}
-          reg_user[R_RCX]:=curptree^;
+              reg_user[R_ECX]:=curptree^;
 {$endif TEMPREGDEBUG}
-          exprasmlist.concat(tai_regalloc.alloc(result));
-        end
-      else
-        internalerror(10);
+              exprasmlist.concat(tai_regalloc.alloc(R_ECX));
+           end
+         else internalerror(10);
 {$ifdef TEMPREGDEBUG}
-      testregisters;
+         testregisters;
 {$endif TEMPREGDEBUG}
-    end;
-
-
+      end;
 
     procedure trgcpu.ungetregisterint(list: taasmoutput; r : tregister);
-      var supreg:Tsuperregister;
       begin
-         if r.enum=R_NO then
+         if r=R_NO then
           exit;
-         if r.enum<>R_INTREGISTER then
-            internalerror(200301234);
-         supreg:=r.number shr 8;
-         if (supreg in [RS_RDI]) then
+         r := makeregsize(r,OS_INT);
+         if (r = R_EDI) or
+            ((not assigned(procinfo^._class)) and (r = R_ESI)) then
            begin
              list.concat(tai_regalloc.DeAlloc(r));
              exit;
            end;
-         if not(supreg in [RS_RAX,RS_RBX,RS_RCX,RS_RDX,RS_RSI]) then
+         if not(r in [R_EAX,R_EBX,R_ECX,R_EDX]) then
            exit;
          inherited ungetregisterint(list,r);
       end;
 
 
-   function trgcpu.getexplicitregisterint(list: taasmoutput; r : tnewregister) : tregister;
-
-   var r2:Tregister;
-
-    begin
-      if (r shr 8) in [RS_RDI] then
-        begin
-          r2.enum:=R_INTREGISTER;
-          r2.number:=r;
-          list.concat(Tai_regalloc.alloc(r2));
-          getexplicitregisterint:=r2;
-          exit;
-        end;
-      result:=inherited getexplicitregisterint(list,r);
+   function trgcpu.getexplicitregisterint(list: taasmoutput; r : tregister) : tregister;
+     begin
+       if r in [R_ESI,R_EDI] then
+         begin
+           list.concat(tai_regalloc.Alloc(r));
+           getexplicitregisterint := r;
+           exit;
+         end;
+       result := inherited getexplicitregisterint(list,r);
     end;
 
 
@@ -295,7 +243,7 @@ unit rgcpu;
       begin
         { note: don't return R_ST0, see comments above implementation of }
         { a_loadfpu_* methods in cgcpu (JM)                              }
-        result.enum := R_ST;
+        result := R_ST;
       end;
 
 
@@ -314,6 +262,129 @@ unit rgcpu;
          ungetregisterint(list,ref.index);
       end;
 
+
+    procedure trgcpu.pushusedregisters(list: taasmoutput;
+        var pushed : tpushedsaved; const s: tregisterset);
+
+      var
+        r: tregister;
+{$ifdef SUPPORT_MMX}
+        hr : treference;
+{$endif SUPPORT_MMX}
+      begin
+        usedinproc:=usedinproc + s;
+        for r:=R_EAX to R_EBX do
+          begin
+            pushed[r].pushed:=false;
+            { if the register is used by the calling subroutine    }
+            if not is_reg_var[r] and
+               (r in s) and
+               { and is present in use }
+               not(r in unusedregsint) then
+              begin
+                { then save it }
+                list.concat(Taicpu.Op_reg(A_PUSH,S_L,r));
+                include(unusedregsint,r);
+                inc(countunusedregsint);
+                pushed[r].pushed:=true;
+              end;
+          end;
+{$ifdef SUPPORT_MMX}
+        for r:=R_MM0 to R_MM6 do
+          begin
+            pushed[r].pushed:=false;
+            { if the register is used by the calling subroutine    }
+            if not is_reg_var[r] and
+               (r in s) and
+               { and is present in use }
+               not(r in unusedregsmm) then
+              begin
+                list.concat(Taicpu.Op_const_reg(A_SUB,S_L,8,R_ESP));
+                reference_reset_base(hr,R_ESP,0);
+                list.concat(Taicpu.Op_reg_ref(A_MOVQ,S_NO,r,hr));
+                include(unusedregsmm,r);
+                inc(countunusedregsmm);
+                pushed[r].pushed:=true;
+              end;
+          end;
+{$endif SUPPORT_MMX}
+{$ifdef TEMPREGDEBUG}
+        testregisters;
+{$endif TEMPREGDEBUG}
+      end;
+
+
+    procedure trgcpu.popusedregisters(list: taasmoutput;
+        const pushed : tpushedsaved);
+
+      var
+        r : tregister;
+{$ifdef SUPPORT_MMX}
+        hr : treference;
+{$endif SUPPORT_MMX}
+      begin
+        { restore in reverse order: }
+{$ifdef SUPPORT_MMX}
+        for r:=R_MM6 downto R_MM0 do
+          if pushed[r].pushed then
+            begin
+              reference_reset_base(hr,R_ESP,0);
+              list.concat(Taicpu.Op_ref_reg(
+                A_MOVQ,S_NO,hr,r));
+              list.concat(Taicpu.Op_const_reg(
+                A_ADD,S_L,8,R_ESP));
+              if not (r in unusedregsmm) then
+                { internalerror(10)
+                  in cg386cal we always restore regs
+                  that appear as used
+                  due to a unused tmep storage PM }
+              else
+                dec(countunusedregsmm);
+              exclude(unusedregsmm,r);
+            end;
+{$endif SUPPORT_MMX}
+        for r:=R_EBX downto R_EAX do
+          if pushed[r].pushed then
+            begin
+              list.concat(Taicpu.Op_reg(A_POP,S_L,r));
+              if not (r in unusedregsint) then
+                { internalerror(10)
+                  in cg386cal we always restore regs
+                  that appear as used
+                  due to a unused tmep storage PM }
+              else
+                dec(countunusedregsint);
+              exclude(unusedregsint,r);
+            end;
+{$ifdef TEMPREGDEBUG}
+        testregisters;
+{$endif TEMPREGDEBUG}
+      end;
+
+    procedure trgcpu.saveusedregisters(list: taasmoutput;var saved : tpushedsaved;
+      const s: tregisterset);
+
+      begin
+        if (aktoptprocessor in [class386,classP5]) or
+           (CS_LittleSize in aktglobalswitches) then
+          pushusedregisters(list,saved,s)
+        else
+          inherited saveusedregisters(list,saved,s);
+      end;
+
+
+    procedure trgcpu.restoreusedregisters(list: taasmoutput;
+      const saved : tpushedsaved);
+
+      begin
+        if (aktoptprocessor in [class386,classP5]) or
+           (CS_LittleSize in aktglobalswitches) then
+          popusedregisters(list,saved)
+        else
+          inherited restoreusedregisters(list,saved);
+      end;
+
+
    procedure trgcpu.resetusableregisters;
 
      begin
@@ -325,7 +396,7 @@ unit rgcpu;
    function trgcpu.correct_fpuregister(r : tregister;ofs : byte) : tregister;
 
      begin
-        correct_fpuregister.enum:=toldregister(longint(r.enum)+ofs);
+        correct_fpuregister:=tregister(longint(r)+ofs);
      end;
 
 
@@ -356,23 +427,12 @@ unit rgcpu;
 
 
 initialization
-  rg := trgcpu.create(15);
+  rg := trgcpu.create;
 end.
 
 {
   $Log$
-  Revision 1.4  2002-04-25 20:15:40  florian
-    * block nodes within expressions shouldn't release the used registers,
-      fixed using a flag till the new rg is ready
-
-  Revision 1.3  2003/01/05 13:36:54  florian
-    * x86-64 compiles
-    + very basic support for float128 type (x86-64 only)
-
-  Revision 1.2  2002/07/25 22:55:34  florian
-    * several fixes, small test units can be compiled
-
-  Revision 1.1  2002/07/24 22:38:15  florian
+  Revision 1.1  2002-07-24 22:38:15  florian
     + initial release of x86-64 target code
 
   Revision 1.8  2002/07/01 18:46:34  peter

+ 469 - 0
compiler/x86_64/x64att.inc

@@ -0,0 +1,469 @@
+{ don't edit, this file is generated from i386ins.dat }
+(
+'none',
+'aaa',
+'aad',
+'aam',
+'aas',
+'adc',
+'add',
+'and',
+'arpl',
+'bound',
+'bsf',
+'bsr',
+'bswap',
+'bt',
+'btc',
+'btr',
+'bts',
+'call',
+'cbtw',
+'cltd',
+'clc',
+'cld',
+'cli',
+'clts',
+'cmc',
+'cmp',
+'cmpsb',
+'cmpsl',
+'cmpsw',
+'cmpxchg',
+'cmpxchg486',
+'cmpxchg8b',
+'cpuid',
+'cwd',
+'cwtl',
+'daa',
+'das',
+'dec',
+'div',
+'emms',
+'enter',
+'f2xm1',
+'fabs',
+'fadd',
+'faddp',
+'fbld',
+'fbstp',
+'fchs',
+'fclex',
+'fcmovb',
+'fcmovbe',
+'fcmove',
+'fcmovnb',
+'fcmovnbe',
+'fcmovne',
+'fcmovnu',
+'fcmovu',
+'fcom',
+'fcomi',
+'fcomip',
+'fcomp',
+'fcompp',
+'fcos',
+'fdecstp',
+'fdisi',
+'fdiv',
+'fdivp',
+'fdivr',
+'fdivrp',
+'femms',
+'feni',
+'ffree',
+'fiadd',
+'ficom',
+'ficomp',
+'fidiv',
+'fidivr',
+'fild',
+'fimul',
+'fincstp',
+'finit',
+'fist',
+'fistp',
+'fisub',
+'fisubr',
+'fld',
+'fld1',
+'fldcw',
+'fldenv',
+'fldl2e',
+'fldl2t',
+'fldlg2',
+'fldln2',
+'fldpi',
+'fldz',
+'fmul',
+'fmulp',
+'fnclex',
+'fndisi',
+'fneni',
+'fninit',
+'fnop',
+'fnsave',
+'fnstcw',
+'fnstenv',
+'fnstsw',
+'fpatan',
+'fprem',
+'fprem1',
+'fptan',
+'frndint',
+'frstor',
+'fsave',
+'fscale',
+'fsetpm',
+'fsin',
+'fsincos',
+'fsqrt',
+'fst',
+'fstcw',
+'fstenv',
+'fstp',
+'fstsw',
+'fsub',
+'fsubp',
+'fsubr',
+'fsubrp',
+'ftst',
+'fucom',
+'fucomi',
+'fucomip',
+'fucomp',
+'fucompp',
+'fwait',
+'fxam',
+'fxch',
+'fxtract',
+'fyl2x',
+'fyl2xp1',
+'hlt',
+'ibts',
+'icebp',
+'idiv',
+'imul',
+'in',
+'inc',
+'insb',
+'insl',
+'insw',
+'int',
+'int01',
+'int1',
+'int03',
+'int3',
+'into',
+'invd',
+'invlpg',
+'iret',
+'iret',
+'iretw',
+'jcxz',
+'jecxz',
+'jmp',
+'lahf',
+'lar',
+'lcall',
+'lds',
+'lea',
+'leave',
+'les',
+'lfs',
+'lgdt',
+'lgs',
+'lidt',
+'ljmp',
+'lldt',
+'lmsw',
+'loadall',
+'loadall286',
+'lock',
+'lodsb',
+'lodsl',
+'lodsw',
+'loop',
+'loope',
+'loopne',
+'loopnz',
+'loopz',
+'lsl',
+'lss',
+'ltr',
+'mov',
+'movd',
+'movq',
+'movsb',
+'movsl',
+'movsw',
+'movs',
+'movz',
+'mul',
+'neg',
+'nop',
+'not',
+'or',
+'out',
+'outsb',
+'outsl',
+'outsw',
+'packssdw',
+'packsswb',
+'packuswb',
+'paddb',
+'paddd',
+'paddsb',
+'paddsiw',
+'paddsw',
+'paddusb',
+'paddusw',
+'paddw',
+'pand',
+'pandn',
+'paveb',
+'pavgusb',
+'pcmpeqb',
+'pcmpeqd',
+'pcmpeqw',
+'pcmpgtb',
+'pcmpgtd',
+'pcmpgtw',
+'pdistib',
+'pf2id',
+'pfacc',
+'pfadd',
+'pfcmpeq',
+'pfcmpge',
+'pfcmpgt',
+'pfmax',
+'pfmin',
+'pfmul',
+'pfrcp',
+'pfrcpit1',
+'pfrcpit2',
+'pfrsqit1',
+'pfrsqrt',
+'pfsub',
+'pfsubr',
+'pi2fd',
+'pmachriw',
+'pmaddwd',
+'pmagw',
+'pmulhriw',
+'pmulhrwa',
+'pmulhrwc',
+'pmulhw',
+'pmullw',
+'pmvgezb',
+'pmvlzb',
+'pmvnzb',
+'pmvzb',
+'pop',
+'popa',
+'popal',
+'popaw',
+'popf',
+'popfl',
+'popfw',
+'por',
+'prefetch',
+'prefetchw',
+'pslld',
+'psllq',
+'psllw',
+'psrad',
+'psraw',
+'psrld',
+'psrlq',
+'psrlw',
+'psubb',
+'psubd',
+'psubsb',
+'psubsiw',
+'psubsw',
+'psubusb',
+'psubusw',
+'psubw',
+'punpckhbw',
+'punpckhdq',
+'punpckhwd',
+'punpcklbw',
+'punpckldq',
+'punpcklwd',
+'push',
+'pusha',
+'pushal',
+'pushaw',
+'pushf',
+'pushfl',
+'pushfw',
+'pxor',
+'rcl',
+'rcr',
+'rdshr',
+'rdmsr',
+'rdpmc',
+'rdtsc',
+'rep',
+'repe',
+'repne',
+'repnz',
+'repz',
+'ret',
+'lret',
+'ret',
+'rol',
+'ror',
+'rsdc',
+'rsldt',
+'rsm',
+'sahf',
+'sal',
+'salc',
+'sar',
+'sbb',
+'scasb',
+'scasl',
+'scasw',
+'cs',
+'ds',
+'es',
+'fs',
+'gs',
+'ss',
+'sgdt',
+'shl',
+'shld',
+'shr',
+'shrd',
+'sidt',
+'sldt',
+'smi',
+'smint',
+'smintold',
+'smsw',
+'stc',
+'std',
+'sti',
+'stosb',
+'stosl',
+'stosw',
+'str',
+'sub',
+'svdc',
+'svldt',
+'svts',
+'syscall',
+'sysenter',
+'sysexit',
+'sysret',
+'test',
+'ud1',
+'ud2',
+'umov',
+'verr',
+'verw',
+'wait',
+'wbinvd',
+'wrshr',
+'wrmsr',
+'xadd',
+'xbts',
+'xchg',
+'xlat',
+'xlatb',
+'xor',
+'cmov',
+'j',
+'set',
+'addps',
+'addss',
+'andnps',
+'andps',
+'cmpeqps',
+'cmpeqss',
+'cmpleps',
+'cmpless',
+'cmpltps',
+'cmpltss',
+'cmpneqps',
+'cmpneqss',
+'cmpnleps',
+'cmpnless',
+'cmpnltps',
+'cmpnltss',
+'cmpordps',
+'cmpordss',
+'cmpunordps',
+'cmpunordss',
+'cmpps',
+'cmpss',
+'comiss',
+'cvtpi2ps',
+'cvtps2pi',
+'cvtsi2ss',
+'cvtss2si',
+'cvttps2pi',
+'cvttss2si',
+'divps',
+'divss',
+'ldmxcsr',
+'maxps',
+'maxss',
+'minps',
+'minss',
+'movaps',
+'movhps',
+'movlhps',
+'movlps',
+'movhlps',
+'movmskps',
+'movntps',
+'movss',
+'movups',
+'mulps',
+'mulss',
+'orps',
+'rcpps',
+'rcpss',
+'rsqrtps',
+'rsqrtss',
+'shufps',
+'sqrtps',
+'sqrtss',
+'stmxcsr',
+'subps',
+'subss',
+'ucomiss',
+'unpckhps',
+'unpcklps',
+'xorps',
+'fxrstor',
+'fxsave',
+'prefetchnta',
+'prefetcht0',
+'prefetcht1',
+'prefetcht2',
+'sfence',
+'maskmovq',
+'movntq',
+'pavgb',
+'pavgw',
+'pextrw',
+'pinsrw',
+'pmaxsw',
+'pmaxub',
+'pminsw',
+'pminub',
+'pmovmskb',
+'pmulhuw',
+'psadbw',
+'pshufw',
+'pfnacc',
+'pfpnacc',
+'pi2fw',
+'pf2iw',
+'pswapd',
+'ffreep'
+);

+ 469 - 0
compiler/x86_64/x64atts.inc

@@ -0,0 +1,469 @@
+{ don't edit, this file is generated from i386ins.dat }
+(
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufNONE,
+attsufNONE,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPU,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufINT,
+attsufNONE,
+attsufFPU,
+attsufINT,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE
+);

+ 469 - 0
compiler/x86_64/x86_64in.inc

@@ -0,0 +1,469 @@
+{ don't edit, this file is generated from i386ins.dat }
+(
+'none',
+'aaa',
+'aad',
+'aam',
+'aas',
+'adc',
+'add',
+'and',
+'arpl',
+'bound',
+'bsf',
+'bsr',
+'bswap',
+'bt',
+'btc',
+'btr',
+'bts',
+'call',
+'cbw',
+'cdq',
+'clc',
+'cld',
+'cli',
+'clts',
+'cmc',
+'cmp',
+'cmpsb',
+'cmpsd',
+'cmpsw',
+'cmpxchg',
+'cmpxchg486',
+'cmpxchg8b',
+'cpuid',
+'cwd',
+'cwde',
+'daa',
+'das',
+'dec',
+'div',
+'emms',
+'enter',
+'f2xm1',
+'fabs',
+'fadd',
+'faddp',
+'fbld',
+'fbstp',
+'fchs',
+'fclex',
+'fcmovb',
+'fcmovbe',
+'fcmove',
+'fcmovnb',
+'fcmovnbe',
+'fcmovne',
+'fcmovnu',
+'fcmovu',
+'fcom',
+'fcomi',
+'fcomip',
+'fcomp',
+'fcompp',
+'fcos',
+'fdecstp',
+'fdisi',
+'fdiv',
+'fdivp',
+'fdivr',
+'fdivrp',
+'femms',
+'feni',
+'ffree',
+'fiadd',
+'ficom',
+'ficomp',
+'fidiv',
+'fidivr',
+'fild',
+'fimul',
+'fincstp',
+'finit',
+'fist',
+'fistp',
+'fisub',
+'fisubr',
+'fld',
+'fld1',
+'fldcw',
+'fldenv',
+'fldl2e',
+'fldl2t',
+'fldlg2',
+'fldln2',
+'fldpi',
+'fldz',
+'fmul',
+'fmulp',
+'fnclex',
+'fndisi',
+'fneni',
+'fninit',
+'fnop',
+'fnsave',
+'fnstcw',
+'fnstenv',
+'fnstsw',
+'fpatan',
+'fprem',
+'fprem1',
+'fptan',
+'frndint',
+'frstor',
+'fsave',
+'fscale',
+'fsetpm',
+'fsin',
+'fsincos',
+'fsqrt',
+'fst',
+'fstcw',
+'fstenv',
+'fstp',
+'fstsw',
+'fsub',
+'fsubp',
+'fsubr',
+'fsubrp',
+'ftst',
+'fucom',
+'fucomi',
+'fucomip',
+'fucomp',
+'fucompp',
+'fwait',
+'fxam',
+'fxch',
+'fxtract',
+'fyl2x',
+'fyl2xp1',
+'hlt',
+'ibts',
+'icebp',
+'idiv',
+'imul',
+'in',
+'inc',
+'insb',
+'insd',
+'insw',
+'int',
+'int01',
+'int1',
+'int03',
+'int3',
+'into',
+'invd',
+'invlpg',
+'iret',
+'iretd',
+'iretw',
+'jcxz',
+'jecxz',
+'jmp',
+'lahf',
+'lar',
+'lcall',
+'lds',
+'lea',
+'leave',
+'les',
+'lfs',
+'lgdt',
+'lgs',
+'lidt',
+'ljmp',
+'lldt',
+'lmsw',
+'loadall',
+'loadall286',
+'lock',
+'lodsb',
+'lodsd',
+'lodsw',
+'loop',
+'loope',
+'loopne',
+'loopnz',
+'loopz',
+'lsl',
+'lss',
+'ltr',
+'mov',
+'movd',
+'movq',
+'movsb',
+'movsd',
+'movsw',
+'movsx',
+'movzx',
+'mul',
+'neg',
+'nop',
+'not',
+'or',
+'out',
+'outsb',
+'outsd',
+'outsw',
+'packssdw',
+'packsswb',
+'packuswb',
+'paddb',
+'paddd',
+'paddsb',
+'paddsiw',
+'paddsw',
+'paddusb',
+'paddusw',
+'paddw',
+'pand',
+'pandn',
+'paveb',
+'pavgusb',
+'pcmpeqb',
+'pcmpeqd',
+'pcmpeqw',
+'pcmpgtb',
+'pcmpgtd',
+'pcmpgtw',
+'pdistib',
+'pf2id',
+'pfacc',
+'pfadd',
+'pfcmpeq',
+'pfcmpge',
+'pfcmpgt',
+'pfmax',
+'pfmin',
+'pfmul',
+'pfrcp',
+'pfrcpit1',
+'pfrcpit2',
+'pfrsqit1',
+'pfrsqrt',
+'pfsub',
+'pfsubr',
+'pi2fd',
+'pmachriw',
+'pmaddwd',
+'pmagw',
+'pmulhriw',
+'pmulhrwa',
+'pmulhrwc',
+'pmulhw',
+'pmullw',
+'pmvgezb',
+'pmvlzb',
+'pmvnzb',
+'pmvzb',
+'pop',
+'popa',
+'popad',
+'popaw',
+'popf',
+'popfd',
+'popfw',
+'por',
+'prefetch',
+'prefetchw',
+'pslld',
+'psllq',
+'psllw',
+'psrad',
+'psraw',
+'psrld',
+'psrlq',
+'psrlw',
+'psubb',
+'psubd',
+'psubsb',
+'psubsiw',
+'psubsw',
+'psubusb',
+'psubusw',
+'psubw',
+'punpckhbw',
+'punpckhdq',
+'punpckhwd',
+'punpcklbw',
+'punpckldq',
+'punpcklwd',
+'push',
+'pusha',
+'pushad',
+'pushaw',
+'pushf',
+'pushfd',
+'pushfw',
+'pxor',
+'rcl',
+'rcr',
+'rdshr',
+'rdmsr',
+'rdpmc',
+'rdtsc',
+'rep',
+'repe',
+'repne',
+'repnz',
+'repz',
+'ret',
+'retf',
+'retn',
+'rol',
+'ror',
+'rsdc',
+'rsldt',
+'rsm',
+'sahf',
+'sal',
+'salc',
+'sar',
+'sbb',
+'scasb',
+'scasd',
+'scasw',
+'segcs',
+'segds',
+'seges',
+'segfs',
+'seggs',
+'segss',
+'sgdt',
+'shl',
+'shld',
+'shr',
+'shrd',
+'sidt',
+'sldt',
+'smi',
+'smint',
+'smintold',
+'smsw',
+'stc',
+'std',
+'sti',
+'stosb',
+'stosd',
+'stosw',
+'str',
+'sub',
+'svdc',
+'svldt',
+'svts',
+'syscall',
+'sysenter',
+'sysexit',
+'sysret',
+'test',
+'ud1',
+'ud2',
+'umov',
+'verr',
+'verw',
+'wait',
+'wbinvd',
+'wrshr',
+'wrmsr',
+'xadd',
+'xbts',
+'xchg',
+'xlat',
+'xlatb',
+'xor',
+'cmov',
+'j',
+'set',
+'addps',
+'addss',
+'andnps',
+'andps',
+'cmpeqps',
+'cmpeqss',
+'cmpleps',
+'cmpless',
+'cmpltps',
+'cmpltss',
+'cmpneqps',
+'cmpneqss',
+'cmpnleps',
+'cmpnless',
+'cmpnltps',
+'cmpnltss',
+'cmpordps',
+'cmpordss',
+'cmpunordps',
+'cmpunordss',
+'cmpps',
+'cmpss',
+'comiss',
+'cvtpi2ps',
+'cvtps2pi',
+'cvtsi2ss',
+'cvtss2si',
+'cvttps2pi',
+'cvttss2si',
+'divps',
+'divss',
+'ldmxcsr',
+'maxps',
+'maxss',
+'minps',
+'minss',
+'movaps',
+'movhps',
+'movlhps',
+'movlps',
+'movhlps',
+'movmskps',
+'movntps',
+'movss',
+'movups',
+'mulps',
+'mulss',
+'orps',
+'rcpps',
+'rcpss',
+'rsqrtps',
+'rsqrtss',
+'shufps',
+'sqrtps',
+'sqrtss',
+'stmxcsr',
+'subps',
+'subss',
+'ucomiss',
+'unpckhps',
+'unpcklps',
+'xorps',
+'fxrstor',
+'fxsave',
+'prefetchnta',
+'prefetcht0',
+'prefetcht1',
+'prefetcht2',
+'sfence',
+'maskmovq',
+'movntq',
+'pavgb',
+'pavgw',
+'pextrw',
+'pinsrw',
+'pmaxsw',
+'pmaxub',
+'pminsw',
+'pminub',
+'pmovmskb',
+'pmulhuw',
+'psadbw',
+'pshufw',
+'pfnacc',
+'pfpnacc',
+'pi2fw',
+'pf2iw',
+'pswapd',
+'ffreep'
+);

+ 469 - 0
compiler/x86_64/x86_64op.inc

@@ -0,0 +1,469 @@
+{ don't edit, this file is generated from i386ins.dat }
+(
+A_NONE,
+A_AAA,
+A_AAD,
+A_AAM,
+A_AAS,
+A_ADC,
+A_ADD,
+A_AND,
+A_ARPL,
+A_BOUND,
+A_BSF,
+A_BSR,
+A_BSWAP,
+A_BT,
+A_BTC,
+A_BTR,
+A_BTS,
+A_CALL,
+A_CBW,
+A_CDQ,
+A_CLC,
+A_CLD,
+A_CLI,
+A_CLTS,
+A_CMC,
+A_CMP,
+A_CMPSB,
+A_CMPSD,
+A_CMPSW,
+A_CMPXCHG,
+A_CMPXCHG486,
+A_CMPXCHG8B,
+A_CPUID,
+A_CWD,
+A_CWDE,
+A_DAA,
+A_DAS,
+A_DEC,
+A_DIV,
+A_EMMS,
+A_ENTER,
+A_F2XM1,
+A_FABS,
+A_FADD,
+A_FADDP,
+A_FBLD,
+A_FBSTP,
+A_FCHS,
+A_FCLEX,
+A_FCMOVB,
+A_FCMOVBE,
+A_FCMOVE,
+A_FCMOVNB,
+A_FCMOVNBE,
+A_FCMOVNE,
+A_FCMOVNU,
+A_FCMOVU,
+A_FCOM,
+A_FCOMI,
+A_FCOMIP,
+A_FCOMP,
+A_FCOMPP,
+A_FCOS,
+A_FDECSTP,
+A_FDISI,
+A_FDIV,
+A_FDIVP,
+A_FDIVR,
+A_FDIVRP,
+A_FEMMS,
+A_FENI,
+A_FFREE,
+A_FIADD,
+A_FICOM,
+A_FICOMP,
+A_FIDIV,
+A_FIDIVR,
+A_FILD,
+A_FIMUL,
+A_FINCSTP,
+A_FINIT,
+A_FIST,
+A_FISTP,
+A_FISUB,
+A_FISUBR,
+A_FLD,
+A_FLD1,
+A_FLDCW,
+A_FLDENV,
+A_FLDL2E,
+A_FLDL2T,
+A_FLDLG2,
+A_FLDLN2,
+A_FLDPI,
+A_FLDZ,
+A_FMUL,
+A_FMULP,
+A_FNCLEX,
+A_FNDISI,
+A_FNENI,
+A_FNINIT,
+A_FNOP,
+A_FNSAVE,
+A_FNSTCW,
+A_FNSTENV,
+A_FNSTSW,
+A_FPATAN,
+A_FPREM,
+A_FPREM1,
+A_FPTAN,
+A_FRNDINT,
+A_FRSTOR,
+A_FSAVE,
+A_FSCALE,
+A_FSETPM,
+A_FSIN,
+A_FSINCOS,
+A_FSQRT,
+A_FST,
+A_FSTCW,
+A_FSTENV,
+A_FSTP,
+A_FSTSW,
+A_FSUB,
+A_FSUBP,
+A_FSUBR,
+A_FSUBRP,
+A_FTST,
+A_FUCOM,
+A_FUCOMI,
+A_FUCOMIP,
+A_FUCOMP,
+A_FUCOMPP,
+A_FWAIT,
+A_FXAM,
+A_FXCH,
+A_FXTRACT,
+A_FYL2X,
+A_FYL2XP1,
+A_HLT,
+A_IBTS,
+A_ICEBP,
+A_IDIV,
+A_IMUL,
+A_IN,
+A_INC,
+A_INSB,
+A_INSD,
+A_INSW,
+A_INT,
+A_INT01,
+A_INT1,
+A_INT03,
+A_INT3,
+A_INTO,
+A_INVD,
+A_INVLPG,
+A_IRET,
+A_IRETD,
+A_IRETW,
+A_JCXZ,
+A_JECXZ,
+A_JMP,
+A_LAHF,
+A_LAR,
+A_LCALL,
+A_LDS,
+A_LEA,
+A_LEAVE,
+A_LES,
+A_LFS,
+A_LGDT,
+A_LGS,
+A_LIDT,
+A_LJMP,
+A_LLDT,
+A_LMSW,
+A_LOADALL,
+A_LOADALL286,
+A_LOCK,
+A_LODSB,
+A_LODSD,
+A_LODSW,
+A_LOOP,
+A_LOOPE,
+A_LOOPNE,
+A_LOOPNZ,
+A_LOOPZ,
+A_LSL,
+A_LSS,
+A_LTR,
+A_MOV,
+A_MOVD,
+A_MOVQ,
+A_MOVSB,
+A_MOVSD,
+A_MOVSW,
+A_MOVSX,
+A_MOVZX,
+A_MUL,
+A_NEG,
+A_NOP,
+A_NOT,
+A_OR,
+A_OUT,
+A_OUTSB,
+A_OUTSD,
+A_OUTSW,
+A_PACKSSDW,
+A_PACKSSWB,
+A_PACKUSWB,
+A_PADDB,
+A_PADDD,
+A_PADDSB,
+A_PADDSIW,
+A_PADDSW,
+A_PADDUSB,
+A_PADDUSW,
+A_PADDW,
+A_PAND,
+A_PANDN,
+A_PAVEB,
+A_PAVGUSB,
+A_PCMPEQB,
+A_PCMPEQD,
+A_PCMPEQW,
+A_PCMPGTB,
+A_PCMPGTD,
+A_PCMPGTW,
+A_PDISTIB,
+A_PF2ID,
+A_PFACC,
+A_PFADD,
+A_PFCMPEQ,
+A_PFCMPGE,
+A_PFCMPGT,
+A_PFMAX,
+A_PFMIN,
+A_PFMUL,
+A_PFRCP,
+A_PFRCPIT1,
+A_PFRCPIT2,
+A_PFRSQIT1,
+A_PFRSQRT,
+A_PFSUB,
+A_PFSUBR,
+A_PI2FD,
+A_PMACHRIW,
+A_PMADDWD,
+A_PMAGW,
+A_PMULHRIW,
+A_PMULHRWA,
+A_PMULHRWC,
+A_PMULHW,
+A_PMULLW,
+A_PMVGEZB,
+A_PMVLZB,
+A_PMVNZB,
+A_PMVZB,
+A_POP,
+A_POPA,
+A_POPAD,
+A_POPAW,
+A_POPF,
+A_POPFD,
+A_POPFW,
+A_POR,
+A_PREFETCH,
+A_PREFETCHW,
+A_PSLLD,
+A_PSLLQ,
+A_PSLLW,
+A_PSRAD,
+A_PSRAW,
+A_PSRLD,
+A_PSRLQ,
+A_PSRLW,
+A_PSUBB,
+A_PSUBD,
+A_PSUBSB,
+A_PSUBSIW,
+A_PSUBSW,
+A_PSUBUSB,
+A_PSUBUSW,
+A_PSUBW,
+A_PUNPCKHBW,
+A_PUNPCKHDQ,
+A_PUNPCKHWD,
+A_PUNPCKLBW,
+A_PUNPCKLDQ,
+A_PUNPCKLWD,
+A_PUSH,
+A_PUSHA,
+A_PUSHAD,
+A_PUSHAW,
+A_PUSHF,
+A_PUSHFD,
+A_PUSHFW,
+A_PXOR,
+A_RCL,
+A_RCR,
+A_RDSHR,
+A_RDMSR,
+A_RDPMC,
+A_RDTSC,
+A_REP,
+A_REPE,
+A_REPNE,
+A_REPNZ,
+A_REPZ,
+A_RET,
+A_RETF,
+A_RETN,
+A_ROL,
+A_ROR,
+A_RSDC,
+A_RSLDT,
+A_RSM,
+A_SAHF,
+A_SAL,
+A_SALC,
+A_SAR,
+A_SBB,
+A_SCASB,
+A_SCASD,
+A_SCASW,
+A_SEGCS,
+A_SEGDS,
+A_SEGES,
+A_SEGFS,
+A_SEGGS,
+A_SEGSS,
+A_SGDT,
+A_SHL,
+A_SHLD,
+A_SHR,
+A_SHRD,
+A_SIDT,
+A_SLDT,
+A_SMI,
+A_SMINT,
+A_SMINTOLD,
+A_SMSW,
+A_STC,
+A_STD,
+A_STI,
+A_STOSB,
+A_STOSD,
+A_STOSW,
+A_STR,
+A_SUB,
+A_SVDC,
+A_SVLDT,
+A_SVTS,
+A_SYSCALL,
+A_SYSENTER,
+A_SYSEXIT,
+A_SYSRET,
+A_TEST,
+A_UD1,
+A_UD2,
+A_UMOV,
+A_VERR,
+A_VERW,
+A_WAIT,
+A_WBINVD,
+A_WRSHR,
+A_WRMSR,
+A_XADD,
+A_XBTS,
+A_XCHG,
+A_XLAT,
+A_XLATB,
+A_XOR,
+A_CMOVcc,
+A_Jcc,
+A_SETcc,
+A_ADDPS,
+A_ADDSS,
+A_ANDNPS,
+A_ANDPS,
+A_CMPEQPS,
+A_CMPEQSS,
+A_CMPLEPS,
+A_CMPLESS,
+A_CMPLTPS,
+A_CMPLTSS,
+A_CMPNEQPS,
+A_CMPNEQSS,
+A_CMPNLEPS,
+A_CMPNLESS,
+A_CMPNLTPS,
+A_CMPNLTSS,
+A_CMPORDPS,
+A_CMPORDSS,
+A_CMPUNORDPS,
+A_CMPUNORDSS,
+A_CMPPS,
+A_CMPSS,
+A_COMISS,
+A_CVTPI2PS,
+A_CVTPS2PI,
+A_CVTSI2SS,
+A_CVTSS2SI,
+A_CVTTPS2PI,
+A_CVTTSS2SI,
+A_DIVPS,
+A_DIVSS,
+A_LDMXCSR,
+A_MAXPS,
+A_MAXSS,
+A_MINPS,
+A_MINSS,
+A_MOVAPS,
+A_MOVHPS,
+A_MOVLHPS,
+A_MOVLPS,
+A_MOVHLPS,
+A_MOVMSKPS,
+A_MOVNTPS,
+A_MOVSS,
+A_MOVUPS,
+A_MULPS,
+A_MULSS,
+A_ORPS,
+A_RCPPS,
+A_RCPSS,
+A_RSQRTPS,
+A_RSQRTSS,
+A_SHUFPS,
+A_SQRTPS,
+A_SQRTSS,
+A_STMXCSR,
+A_SUBPS,
+A_SUBSS,
+A_UCOMISS,
+A_UNPCKHPS,
+A_UNPCKLPS,
+A_XORPS,
+A_FXRSTOR,
+A_FXSAVE,
+A_PREFETCHNTA,
+A_PREFETCHT0,
+A_PREFETCHT1,
+A_PREFETCHT2,
+A_SFENCE,
+A_MASKMOVQ,
+A_MOVNTQ,
+A_PAVGB,
+A_PAVGW,
+A_PEXTRW,
+A_PINSRW,
+A_PMAXSW,
+A_PMAXUB,
+A_PMINSW,
+A_PMINUB,
+A_PMOVMSKB,
+A_PMULHUW,
+A_PSADBW,
+A_PSHUFW,
+A_PFNACC,
+A_PFPNACC,
+A_PI2FW,
+A_PF2IW,
+A_PSWAPD,
+A_FFREEP
+);

+ 9278 - 0
compiler/x86_64/x86_64ta.inc

@@ -0,0 +1,9278 @@
+{ don't edit, this file is generated from i386ins.dat }
+(
+  (
+    opcode  : A_NONE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #0;
+    flags   : if_none
+  ),
+  (
+    opcode  : A_AAA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#55;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#213#10;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AAD;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#213#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_AAM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#212#10;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AAM;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#212#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_AAS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#63;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#16#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#16#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#17#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#17#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#17#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#17#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#18#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#18#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#19#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#19#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#19#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#19#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#130#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#130#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#20#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#21#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#21#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#130#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#130#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#130#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#130#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#130#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#130#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#15#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#15#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#1#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#1#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#1#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#1#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#2#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#2#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#3#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#3#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#3#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#3#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#128#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#128#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#4#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#5#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#5#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#32#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#32#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#33#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#33#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#33#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#33#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#34#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#34#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#35#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#35#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#35#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#35#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#132#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#132#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#36#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#37#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#37#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#132#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#132#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#132#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#132#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#132#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#132#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ARPL;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #192#1#99#65;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_ARPL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #192#1#99#65;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_BOUND;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#98#72;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_BOUND;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#98#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BSF;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#188#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSF;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#188#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BSF;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#188#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSF;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#188#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BSR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#189#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#189#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BSR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#189#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#189#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BSWAP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#1#15#8#200;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#163#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#163#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#163#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#163#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#2#15#186#132#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#2#15#186#132#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#187#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#187#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#187#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#187#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#2#15#186#135#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#2#15#186#135#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#179#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#179#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#179#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#179#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#2#15#186#134#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#2#15#186#134#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#171#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#171#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#171#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#171#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#2#15#186#133#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#2#15#186#133#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #210#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none);
+    code    : #210#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_far,ot_none,ot_none);
+    code    : #210#1#154#28#31;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #208#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#1#154#28#31;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #209#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#1#154#28#31;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate,ot_none,ot_none);
+    code    : #210#1#154#29#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_immediate,ot_none,ot_none);
+    code    : #208#1#154#25#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #208#1#154#25#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_immediate,ot_none,ot_none);
+    code    : #209#1#154#33#24;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #209#1#154#33#24;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CBW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#152;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CDQ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#153;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CLC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#248;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#252;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#250;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLTS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#6;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_CMC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#245;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#56#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#56#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#57#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#57#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#57#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#57#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#58#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#58#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#59#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#59#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#59#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#59#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#135#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#135#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#60#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#61#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#61#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#135#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#135#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#135#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#135#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#135#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#135#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMPSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#1#166;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMPSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#209#1#167;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CMPSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#208#1#167;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#2#15#176#65;
+    flags   : if_pent or if_sm
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#2#15#176#65;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#177#65;
+    flags   : if_pent or if_sm
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#177#65;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#177#65;
+    flags   : if_pent or if_sm
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#177#65;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#2#15#166#65;
+    flags   : if_486 or if_sm or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#2#15#166#65;
+    flags   : if_486 or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#167#65;
+    flags   : if_486 or if_sm or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#167#65;
+    flags   : if_486 or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#167#65;
+    flags   : if_486 or if_sm or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#167#65;
+    flags   : if_486 or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG8B;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#199#129;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CPUID;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#162;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CWD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#153;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CWDE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#152;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_DAA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#39;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DAS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#47;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#8#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#8#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#254#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#129;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_DIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#134;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_EMMS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#119;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_ENTER;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate,ot_none);
+    code    : #1#200#24#21;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_F2XM1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FABS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#193;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#193;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#1#223#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBLD;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#223#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#1#223#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBSTP;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#223#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCHS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCLEX;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#155#219#226;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#218#193;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#218#8#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#218#9#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#218#209;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#218#8#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#218#9#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#218#201;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#218#8#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#218#9#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#193;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#209;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#201;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#217;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#218#217;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#218#8#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#218#9#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#216#209;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#241;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#223#241;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#223#8#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#223#9#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#216#217;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMPP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#217;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#255;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FDECSTP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#246;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDISI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#155#219#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#220#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#220#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FEMMS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none or ot_signed);
+    code    : #2#15#14;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_FENI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#155#219#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FFREE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#221#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#219#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#223#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#223#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FINCSTP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#247;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FINIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#155#219#227;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#219#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#223#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#219#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#223#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#223#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#222#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#218#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#217#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#221#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#1#219#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#217#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#217#133;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FLDENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#217#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDL2E;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#234;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDL2T;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDLG2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#236;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDLN2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#237;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDPI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#235;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#238;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#220#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNCLEX;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#226;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNDISI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNENI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNINIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#227;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNOP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#221#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSTCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#217#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FNSTENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#217#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSTSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#221#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FNSTSW;
+    ops     : 1;
+    optypes : (ot_reg_ax,ot_none,ot_none);
+    code    : #2#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FPATAN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#243;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FPREM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FPREM1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#245;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FPTAN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#242;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FRNDINT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#252;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FRSTOR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#221#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#155#221#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSCALE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#253;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSETPM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#228;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSIN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#254;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FSINCOS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#251;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FSQRT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#250;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#217#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#221#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#221#8#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#155#217#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FSTENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#155#217#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#217#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#221#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#1#219#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#221#8#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#155#221#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#155#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 1;
+    optypes : (ot_reg_ax,ot_none,ot_none);
+    code    : #3#155#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#220#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #192#1#216#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #192#1#220#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#220#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none);
+    code    : #1#220#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#220#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#216#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#216#9#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#222#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#222#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#222#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FTST;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#228;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#221#225;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#221#8#224;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#221#9#224;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#219#233;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#219#8#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#219#9#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#223#233;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#223#8#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#223#9#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#221#233;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#221#8#232;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#221#9#232;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMPP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#218#233;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FWAIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#155;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXAM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#229;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#217#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none);
+    code    : #1#217#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none);
+    code    : #1#217#9#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXTRACT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#244;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FYL2X;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FYL2XP1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#217#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_HLT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#244;
+    flags   : if_8086 or if_priv
+  ),
+  (
+    opcode  : A_IBTS;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#167#65;
+    flags   : if_386 or if_sw or if_undoc
+  ),
+  (
+    opcode  : A_IBTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#167#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_IBTS;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#167#65;
+    flags   : if_386 or if_sd or if_undoc
+  ),
+  (
+    opcode  : A_IBTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#167#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_ICEBP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IDIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IDIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IDIV;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#135;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#175#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#175#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#175#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#175#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_memory,ot_immediate or ot_bits8 or ot_signed);
+    code    : #208#193#1#107#72#14;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_immediate or ot_bits8 or ot_signed);
+    code    : #208#193#1#107#72#14;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_memory,ot_immediate);
+    code    : #208#193#1#105#72#26;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_immediate);
+    code    : #208#193#1#105#72#26;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32,ot_memory,ot_immediate or ot_bits8 or ot_signed);
+    code    : #209#193#1#107#72#14;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_immediate or ot_bits8 or ot_signed);
+    code    : #209#193#1#107#72#14;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32,ot_memory,ot_immediate);
+    code    : #209#193#1#105#72#34;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_immediate);
+    code    : #209#193#1#105#72#34;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#1#107#64#13;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate,ot_none);
+    code    : #208#1#105#64#25;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#1#107#64#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate,ot_none);
+    code    : #209#1#105#64#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#228#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#229#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#229#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_reg_dx,ot_none);
+    code    : #1#236;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_reg_dx,ot_none);
+    code    : #208#1#237;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_reg_dx,ot_none);
+    code    : #209#1#237;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#8#64;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#8#64;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#254#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#108;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_INSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#109;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#109;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_INT;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#205#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_INT01;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INT1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INT03;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#204;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INT3;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#204;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INTO;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#206;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INVD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#8;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_INVLPG;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#135;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_IRET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #210#1#207;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IRETD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#207;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IRETW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#207;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JCXZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #208#1#227#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JECXZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #209#1#227#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_short,ot_none,ot_none);
+    code    : #1#235#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #210#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none);
+    code    : #210#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_far,ot_none,ot_none);
+    code    : #210#1#234#28#31;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #208#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#1#234#28#31;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #209#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#1#234#28#31;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate,ot_none,ot_none);
+    code    : #210#1#234#29#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_immediate,ot_none,ot_none);
+    code    : #208#1#234#25#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #208#1#234#25#24;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_immediate,ot_none,ot_none);
+    code    : #209#1#234#33#24;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #209#1#234#33#24;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LAHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#159;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LAR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#2#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LAR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#2#72;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_LAR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#2#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LAR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#2#72;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LDS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#197#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LDS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#197#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LEA;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#141#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LEA;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#141#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LEA;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate or ot_bits32,ot_none);
+    code    : #209#193#1#141#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LEAVE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#201;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_LES;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#196#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LES;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#196#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LFS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#180#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LFS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#180#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LGDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#130;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LGS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#181#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LGS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#181#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LIDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#131;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    code    : #210#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_far,ot_none,ot_none);
+    code    : #208#192#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_far,ot_none,ot_none);
+    code    : #209#192#1#255#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #210#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LLDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#130;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#130;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LLDT;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#130;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LMSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#134;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LMSW;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#2#15#1#134;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LMSW;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#2#15#1#134;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LOADALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#7;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_LOADALL286;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#5;
+    flags   : if_286 or if_undoc
+  ),
+  (
+    opcode  : A_LOCK;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#240;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_LODSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#172;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LODSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#173;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LODSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#173;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #202#1#226#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none);
+    code    : #200#1#226#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx,ot_none);
+    code    : #201#1#226#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #202#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none);
+    code    : #200#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx,ot_none);
+    code    : #201#1#225#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #202#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none);
+    code    : #200#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx,ot_none);
+    code    : #201#1#224#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #202#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none);
+    code    : #200#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx,ot_none);
+    code    : #201#1#224#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #202#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none);
+    code    : #200#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx,ot_none);
+    code    : #201#1#225#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LSL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#3#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LSL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#3#72;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_LSL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#3#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LSL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#3#72;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_LSS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#178#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LSS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#178#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LTR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#131;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LTR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#131;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LTR;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#131;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg_cs,ot_none);
+    code    : #208#192#1#140#129;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg_dess,ot_none);
+    code    : #208#192#1#140#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg_fsgs,ot_none);
+    code    : #208#192#1#140#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg_cs,ot_none);
+    code    : #208#192#1#140#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg_dess,ot_none);
+    code    : #208#192#1#140#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg_fsgs,ot_none);
+    code    : #208#192#1#140#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cs,ot_none);
+    code    : #209#192#1#140#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_dess,ot_none);
+    code    : #209#192#1#140#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_fsgs,ot_none);
+    code    : #209#192#1#140#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dess,ot_memory,ot_none);
+    code    : #208#193#1#142#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_fsgs,ot_memory,ot_none);
+    code    : #208#193#1#142#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dess,ot_reg16,ot_none);
+    code    : #208#193#1#142#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_fsgs,ot_reg16,ot_none);
+    code    : #208#193#1#142#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dess,ot_regmem or ot_bits32,ot_none);
+    code    : #209#193#1#142#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_fsgs,ot_regmem or ot_bits32,ot_none);
+    code    : #209#193#1#142#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_mem_offs,ot_none);
+    code    : #193#1#160#29;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_mem_offs,ot_none);
+    code    : #193#208#1#161#29;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_mem_offs,ot_none);
+    code    : #193#209#1#161#29;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_al,ot_none);
+    code    : #192#1#162#28;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_ax,ot_none);
+    code    : #192#208#1#163#28;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_eax,ot_none);
+    code    : #192#209#1#163#28;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_cr4,ot_none);
+    code    : #2#15#32#132;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_creg,ot_none);
+    code    : #2#15#32#65;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_dreg,ot_none);
+    code    : #2#15#33#65;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_treg,ot_none);
+    code    : #2#15#36#65;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_cr4,ot_reg32,ot_none);
+    code    : #2#15#34#140;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_creg,ot_reg32,ot_none);
+    code    : #2#15#34#72;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dreg,ot_reg32,ot_none);
+    code    : #2#15#35#72;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_treg,ot_reg32,ot_none);
+    code    : #2#15#38#72;
+    flags   : if_386 or if_priv
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#136#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#136#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#137#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#137#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#137#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#137#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#138#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#138#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#139#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#139#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#139#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#139#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_immediate,ot_none);
+    code    : #8#176#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate,ot_none);
+    code    : #208#8#184#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate,ot_none);
+    code    : #209#8#184#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#198#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#199#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#199#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#198#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#199#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#199#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#110#72;
+    flags   : if_pent or if_mmx or if_sd
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_reg32,ot_none);
+    code    : #2#15#110#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_memory,ot_mmxreg,ot_none);
+    code    : #192#2#15#126#65;
+    flags   : if_pent or if_mmx or if_sd
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_mmxreg,ot_none);
+    code    : #2#15#126#65;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#111#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#111#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_memory,ot_mmxreg,ot_none);
+    code    : #192#2#15#127#65;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#127#65;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_MOVSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#164;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOVSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#165;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#165;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#190#72;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg8,ot_none);
+    code    : #208#193#2#15#190#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg32,ot_regmem or ot_bits8,ot_none);
+    code    : #209#193#2#15#190#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg32,ot_regmem or ot_bits16,ot_none);
+    code    : #209#193#2#15#191#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#182#72;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg8,ot_none);
+    code    : #208#193#2#15#182#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg32,ot_regmem or ot_bits8,ot_none);
+    code    : #209#193#2#15#182#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg32,ot_regmem or ot_bits16,ot_none);
+    code    : #209#193#2#15#183#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MUL;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_NEG;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NEG;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NEG;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_NOP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOT;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits8,ot_none,ot_none);
+    code    : #192#1#246#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOT;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#247#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOT;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#247#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#8#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#8#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#9#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#9#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#9#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#9#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#10#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#10#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#11#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#11#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#11#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#11#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#129#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#129#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#12#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#13#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#13#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#129#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#129#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#129#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#129#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#129#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#129#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_al,ot_none);
+    code    : #1#230#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ax,ot_none);
+    code    : #208#1#231#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_eax,ot_none);
+    code    : #209#1#231#20;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_al,ot_none);
+    code    : #1#238;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_ax,ot_none);
+    code    : #208#1#239;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_eax,ot_none);
+    code    : #209#1#239;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OUTSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#110;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_OUTSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#111;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OUTSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#111;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PACKSSDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#107#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKSSDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#107#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PACKSSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#99#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKSSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#99#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PACKUSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#103#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKUSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#103#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#252#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#252#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#254#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#254#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#236#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#236#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#81#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PADDSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#81#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PADDSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#237#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#237#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#220#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#220#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#221#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#221#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PADDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#253#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#253#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PAND;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#219#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAND;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#219#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PANDN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#223#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PANDN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#223#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PAVEB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#80#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PAVEB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#80#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PAVGUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#191;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PAVGUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#191;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PCMPEQB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#116#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#116#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PCMPEQD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#118#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#118#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PCMPEQW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#117#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#117#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PCMPGTB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#100#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#100#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PCMPGTD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#102#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#102#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PCMPGTW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#101#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#101#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PDISTIB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#84#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PF2ID;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#29;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PF2ID;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#29;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#174;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#174;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFADD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#158;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFADD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#158;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFCMPEQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#176;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPEQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#176;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFCMPGE;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#144;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPGE;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#144;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFCMPGT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#160;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPGT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#160;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFMAX;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#164;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMAX;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#164;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFMIN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#148;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMIN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#148;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFMUL;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#180;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMUL;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#180;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFRCP;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#150;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCP;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#150;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFRCPIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#166;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCPIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#166;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFRCPIT2;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#182;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCPIT2;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#182;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFRSQIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#167;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRSQIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#167;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFRSQRT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#151;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRSQRT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#151;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFSUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#154;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFSUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#154;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFSUBR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#170;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFSUBR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#170;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PI2FD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#13;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PI2FD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#13;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PMACHRIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#94#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMADDWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#245#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMADDWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#245#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PMAGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#82#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMAGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#82#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#93#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#93#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRWA;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#183;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PMULHRWA;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#183;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PMULHRWC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#89#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRWC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#89#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#229#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULHW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#229#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PMULLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#213#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#213#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PMVGEZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#92#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVLZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#91#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVNZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#90#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#88#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#8#88;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#8#88;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#143#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#143#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_cs,ot_none,ot_none);
+    code    : #1#15;
+    flags   : if_8086 or if_undoc
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_dess,ot_none,ot_none);
+    code    : #4;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_fsgs,ot_none,ot_none);
+    code    : #1#15#5;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POPA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #210#1#97;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_POPAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#97;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POPAW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#97;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_POPF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #210#1#157;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_POPFD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#157;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POPFW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#157;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_POR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#235#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_POR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#235#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PREFETCH;
+    ops     : 1;
+    optypes : (ot_memory,ot_none or ot_signed,ot_none);
+    code    : #2#15#13#128;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PREFETCHW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none or ot_signed,ot_none);
+    code    : #2#15#13#129;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#242#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#242#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#114#134#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#243#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#243#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#115#134#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#241#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#241#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#113#134#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#226#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#226#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#114#132#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#225#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#225#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#113#132#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#210#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#210#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#114#130#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#211#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#211#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#115#130#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#209#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#209#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#113#130#21;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#248#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#248#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#250#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#250#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#232#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#232#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#85#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PSUBSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#85#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PSUBSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#233#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#233#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#216#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#216#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#217#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#217#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PSUBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#249#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#249#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKHBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#104#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#104#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKHDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#106#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#106#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKHWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#105#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#105#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKLBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#96#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#96#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKLDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#98#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#98#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUNPCKLWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#97#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#97#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #208#8#80;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none);
+    code    : #209#8#80;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits16,ot_none,ot_none);
+    code    : #208#192#1#255#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_regmem or ot_bits32,ot_none,ot_none);
+    code    : #209#192#1#255#134;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg_fsgs,ot_none,ot_none);
+    code    : #1#15#7;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg_sreg,ot_none,ot_none);
+    code    : #6;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #1#106#12;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #208#1#104#24;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #209#1#104#32;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSHA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #210#1#96;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PUSHAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#96;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSHAW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#96;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PUSHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #210#1#156;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PUSHFD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#156;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSHFW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#156;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PXOR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#239#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PXOR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#239#72;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#130#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#130#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#130;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#130#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#131#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#131#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#131;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#131#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_RDSHR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#54;
+    flags   : if_p6 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RDMSR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#50;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_RDPMC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#51;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_RDTSC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#49;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_REP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPNE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#242;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPNZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#242;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_RET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#195;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RET;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#194#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_RETF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#203;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RETF;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#202#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_RETN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#195;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RETN;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #1#194#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#128#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#128#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#128#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#129#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#129#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#129;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#129;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#129#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_RSDC;
+    ops     : 2;
+    optypes : (ot_reg_sreg,ot_memory or ot_bits80,ot_none);
+    code    : #193#2#15#121#65;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RSLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#2#15#123#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RSM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#170;
+    flags   : if_pent or if_smm
+  ),
+  (
+    opcode  : A_SAHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#158;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#132#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#132#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#132#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_SALC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#214;
+    flags   : if_8086 or if_undoc
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#135#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#135#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#135;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#135;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#135#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#24#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#24#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#25#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#25#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#25#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#25#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#26#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#26#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#27#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#27#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#27#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#27#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#131#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#131#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#28#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#29#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#29#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#131#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#131#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#131#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#131#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#131#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#131#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SCASB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#1#174;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SCASD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#209#1#175;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SCASW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #218#208#1#175;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SEGCS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#46;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGDS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#62;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGES;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#38;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGFS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#100;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGGS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#101;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGSS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#54;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SGDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#132#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#132#21;
+    flags   : if_186 or if_sw
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#132;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#132#21;
+    flags   : if_386 or if_sd
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg16,ot_immediate);
+    code    : #192#208#2#15#164#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_immediate);
+    code    : #192#208#2#15#164#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg32,ot_immediate);
+    code    : #192#209#2#15#164#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_immediate);
+    code    : #192#209#2#15#164#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg16,ot_reg_cl);
+    code    : #192#208#2#15#165#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_reg_cl);
+    code    : #192#208#2#15#165#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg32,ot_reg_cl);
+    code    : #192#209#2#15#165#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_reg_cl);
+    code    : #192#209#2#15#165#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_unity,ot_none);
+    code    : #192#1#208#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_reg_cl,ot_none);
+    code    : #192#1#210#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#192#133#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_unity,ot_none);
+    code    : #208#192#1#209#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_reg_cl,ot_none);
+    code    : #208#192#1#211#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#193#133#21;
+    flags   : if_186 or if_sw
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_unity,ot_none);
+    code    : #209#192#1#209#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_reg_cl,ot_none);
+    code    : #209#192#1#211#133;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#193#133#21;
+    flags   : if_386 or if_sd
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg16,ot_immediate);
+    code    : #192#208#2#15#172#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_immediate);
+    code    : #192#208#2#15#172#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg32,ot_immediate);
+    code    : #192#209#2#15#172#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_immediate);
+    code    : #192#209#2#15#172#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg16,ot_reg_cl);
+    code    : #192#208#2#15#173#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_reg16,ot_reg16,ot_reg_cl);
+    code    : #192#208#2#15#173#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_memory,ot_reg32,ot_reg_cl);
+    code    : #192#209#2#15#173#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_reg32,ot_reg32,ot_reg_cl);
+    code    : #192#209#2#15#173#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SIDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#129;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SLDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SLDT;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_SMINT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#56;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_SMINTOLD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#126;
+    flags   : if_486 or if_cyrix
+  ),
+  (
+    opcode  : A_SMSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#1#132;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SMSW;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#2#15#1#132;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SMSW;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#2#15#1#132;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_STC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#249;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#253;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#251;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STOSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#170;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STOSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #209#1#171;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_STOSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #208#1#171;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#129;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_STR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#129;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_STR;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#129;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#40#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#40#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#41#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#41#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#41#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#41#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#42#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#42#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#43#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#43#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#43#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#43#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#133#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#133#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#44#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#45#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#45#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#133#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#133#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#133#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#133#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#133#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#133#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SVDC;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits80,ot_reg_sreg,ot_none);
+    code    : #192#2#15#120#65;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SVLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#2#15#122#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SVTS;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #192#2#15#124#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SYSCALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#5;
+    flags   : if_p6 or if_amd
+  ),
+  (
+    opcode  : A_SYSENTER;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#52;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_SYSEXIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#54;
+    flags   : if_p6 or if_priv
+  ),
+  (
+    opcode  : A_SYSRET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#7;
+    flags   : if_p6 or if_priv or if_amd
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#132#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#132#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#133#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#133#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#133#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#133#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#132#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#133#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#133#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#168#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#169#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#169#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#246#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#247#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#247#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#246#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#247#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#247#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_UD1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#185;
+    flags   : if_286 or if_undoc
+  ),
+  (
+    opcode  : A_UD2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#11;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#2#15#16#65;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#2#15#16#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#17#65;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#17#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#17#65;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#17#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#2#15#18#72;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#2#15#18#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#19#72;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#19#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#19#72;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#19#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#15#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #192#1#15#15#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none);
+    code    : #192#1#15#15#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_WAIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#155;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_WBINVD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#9;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_WRSHR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#55;
+    flags   : if_p6 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_WRMSR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #2#15#48;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#2#15#192#65;
+    flags   : if_486 or if_sm
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#2#15#192#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#2#15#193#65;
+    flags   : if_486 or if_sm
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#2#15#193#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#2#15#193#65;
+    flags   : if_486 or if_sm
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#2#15#193#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#2#15#166#72;
+    flags   : if_386 or if_sw or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#2#15#166#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#2#15#166#72;
+    flags   : if_386 or if_sd or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#2#15#166#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_reg16,ot_none);
+    code    : #208#9#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_reg32,ot_none);
+    code    : #209#9#144;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg_ax,ot_none);
+    code    : #208#8#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_eax,ot_none);
+    code    : #209#8#144;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#134#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#134#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#135#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#135#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#135#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#135#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#134#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#134#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#135#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#135#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#135#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#135#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XLAT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#215;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XLATB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #1#215;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg8,ot_none);
+    code    : #192#1#48#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #192#1#48#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none);
+    code    : #208#192#1#49#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#192#1#49#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none);
+    code    : #209#192#1#49#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#192#1#49#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_memory,ot_none);
+    code    : #193#1#50#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none);
+    code    : #193#1#50#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#51#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#51#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#51#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#51#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#192#1#131#134#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #209#192#1#131#134#13;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none);
+    code    : #1#52#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none);
+    code    : #208#1#53#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none);
+    code    : #209#1#53#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits8,ot_immediate,ot_none);
+    code    : #192#1#128#134#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits16,ot_immediate,ot_none);
+    code    : #208#192#1#129#134#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_regmem or ot_bits32,ot_immediate,ot_none);
+    code    : #209#192#1#129#134#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none);
+    code    : #192#1#128#134#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none);
+    code    : #208#192#1#129#134#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none);
+    code    : #209#192#1#129#134#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMOVcc;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none);
+    code    : #208#193#1#15#216#64#72;
+    flags   : if_p6 or if_sm
+  ),
+  (
+    opcode  : A_CMOVcc;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none);
+    code    : #208#193#1#15#216#64#72;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_CMOVcc;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #209#193#1#15#216#64#72;
+    flags   : if_p6 or if_sm
+  ),
+  (
+    opcode  : A_CMOVcc;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none);
+    code    : #209#193#1#15#216#64#72;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none);
+    code    : #210#1#15#216#128#52;
+    flags   : if_386 or if_pass2
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_near,ot_none,ot_none);
+    code    : #208#1#15#216#128#52;
+    flags   : if_386 or if_pass2
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32 or ot_near,ot_none,ot_none);
+    code    : #209#1#15#216#128#52;
+    flags   : if_386 or if_pass2
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none);
+    code    : #216#112#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_short,ot_none,ot_none);
+    code    : #216#112#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SETcc;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#1#15#216#144#128;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_SETcc;
+    ops     : 1;
+    optypes : (ot_reg8,ot_none,ot_none);
+    code    : #192#1#15#216#144#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ADDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ADDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ADDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDNPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#85#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDNPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#85#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#84#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#84#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory,ot_immediate);
+    code    : #193#217#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CMPPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+    code    : #217#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CMPSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory,ot_immediate);
+    code    : #193#219#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CMPSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+    code    : #219#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_COMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#47#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_COMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#47#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTPI2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#42#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTPI2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_mmxreg,ot_none);
+    code    : #217#2#15#42#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#217#2#15#45#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#45#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTSI2SS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#42#72;
+    flags   : if_katmai or if_sse or if_sd or if_ar1
+  ),
+  (
+    opcode  : A_CVTSI2SS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_reg32,ot_none);
+    code    : #219#2#15#42#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #193#219#2#15#45#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none);
+    code    : #219#2#15#45#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#217#2#15#44#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#44#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none);
+    code    : #193#219#2#15#44#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none);
+    code    : #219#2#15#44#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_LDMXCSR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#174#130;
+    flags   : if_katmai or if_sse or if_sd
+  ),
+  (
+    opcode  : A_MAXPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MAXPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MAXSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MAXSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#40#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #192#2#15#41#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#40#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#41#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#22#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #192#2#15#23#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#22#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#22#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#18#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #192#2#15#19#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#18#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#18#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none);
+    code    : #2#15#80#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVNTPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #2#15#43#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #192#219#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none);
+    code    : #192#217#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#86#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#86#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SHUFPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory,ot_immediate);
+    code    : #193#2#15#198#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHUFPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+    code    : #2#15#198#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_STMXCSR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#174#131;
+    flags   : if_katmai or if_sse or if_sd
+  ),
+  (
+    opcode  : A_SUBPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#217#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SUBPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #217#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SUBSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#219#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SUBSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#46#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#46#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#21#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#21#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#20#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#20#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_XORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none);
+    code    : #193#2#15#87#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_XORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #2#15#87#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_FXRSTOR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#174#129;
+    flags   : if_p6 or if_sse or if_fpu
+  ),
+  (
+    opcode  : A_FXSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#174#128;
+    flags   : if_p6 or if_sse or if_fpu
+  ),
+  (
+    opcode  : A_PREFETCHNTA;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#24#128;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT0;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#24#129;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT1;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#24#130;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT2;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none);
+    code    : #192#2#15#24#131;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_SFENCE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none);
+    code    : #3#15#174#248;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_MASKMOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#247#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_MOVNTQ;
+    ops     : 2;
+    optypes : (ot_memory,ot_mmxreg,ot_none);
+    code    : #2#15#231#65;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAVGB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#224#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PAVGB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#224#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAVGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#227#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PAVGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#227#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PEXTRW;
+    ops     : 3;
+    optypes : (ot_reg32,ot_mmxreg,ot_immediate);
+    code    : #2#15#197#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_reg16,ot_immediate);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_reg32,ot_immediate);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_memory,ot_immediate);
+    code    : #193#2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_memory or ot_bits16,ot_immediate);
+    code    : #193#2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PMAXSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#238#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMAXSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#238#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMAXUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#222#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMAXUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#222#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMINSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#234#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMINSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#234#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMINUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#218#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMINUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#218#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMOVMSKB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_mmxreg,ot_none);
+    code    : #2#15#215#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMULHUW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#228#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMULHUW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#228#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSADBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#246#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PSADBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#246#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSHUFW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_immediate);
+    code    : #2#15#112#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PSHUFW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_memory,ot_immediate);
+    code    : #193#2#15#112#72#18;
+    flags   : if_katmai or if_mmx or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PFNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#138;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#138;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PFPNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#142;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFPNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#142;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PI2FW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#12;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PI2FW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#12;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PF2IW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#28;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PF2IW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#28;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_PSWAPD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none);
+    code    : #193#2#15#15#72#1#187;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PSWAPD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+    code    : #2#15#15#72#1#187;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_FFREEP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none);
+    code    : #1#223#8#192;
+    flags   : if_pent or if_3dnow or if_fpu
+  )
+);