Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

x86table.h File Reference

#include "x86instr.h"

Go to the source code of this file.

Compounds

struct  inst_3DNow
struct  inst_f3Xmm

Defines

#define F3XMM(n)   f3Xmm_instr[f3Xmm_offsets[n]]
#define DEFINE_FPI(istr, type)   ((istr<<8)|type)
#define FPI_ISTR(i)   (i>>8)
#define FPI_TYPE(i)   (i&255)
#define DEFINE_FPIM3(istr, param)   DEFINE_FPI(istr,param)
#define FPIM3_ISTR(i)   FPI_ISTR(i)
#define FPIM3_PARAM(i)   FPI_TYPE(i)

Typedefs

typedef inst_3DNow INST_3DNOW
typedef inst_f3Xmm INST_F3XMM

Enumerations

enum  Regs {
  regNone = 0, regAL, regCL, regDL,
  regBL, regAH, regCH, regDH,
  regBH, regAX, regCX, regDX,
  regBX, regSP, regBP, regSI,
  regDI, regES, regCS, regSS,
  regDS, regFS, regGS
}
enum  Modreg {
  modregSize = 7, modregByte = 0, modregVar = 1, modregDword = 2,
  modregMmx = 3, modregXmm = 4, modregMemStartBit = 3, modregMemType = 15<<modregMemStartBit,
  modregMemByte = 1<<modregMemStartBit, modregMemWord = 2<<modregMemStartBit, modregMemDword = 3<<modregMemStartBit, modregMemQword = 4<<modregMemStartBit,
  modregMemPacketDword = 5<<modregMemStartBit, modregMemPointer = 6<<modregMemStartBit, modregMemBound = 7<<modregMemStartBit, modregMemDescriptor = 8<<modregMemStartBit,
  modregMemNone = 9<<modregMemStartBit, modregMemPacket = 10<<modregMemStartBit, modregMemFPacket = 11<<modregMemStartBit, modregMem2FPacket = 12<<modregMemStartBit,
  modregMem4FPacket = 13<<modregMemStartBit, modregTypeStartBit = 7, modregType = 3<<modregTypeStartBit, modregMemReg = 0<<modregTypeStartBit,
  modregRegMem = 1<<modregTypeStartBit, modregMem = 2<<modregTypeStartBit, modregReg = 3<<modregTypeStartBit, modregThirdStartBit = 9,
  modregThird = 7<<modregThirdStartBit, modregIsb = 1<<modregThirdStartBit, modregIub = 2<<modregThirdStartBit, modregIv = 3<<modregThirdStartBit,
  modreg1 = 4<<modregThirdStartBit, modregCL = 5<<modregThirdStartBit, modregEbGb = modregByte|modregMemReg, modregEvGv = modregVar |modregMemReg,
  modregGbEb = modregByte|modregRegMem, modregGvEv = modregVar |modregRegMem, modregEwSw = modregVar |modregMemReg|modregMemWord, modregSwEw = modregVar |modregRegMem|modregMemWord,
  modregEv = modregVar |modregMem, modregEb1 = modregByte|modregMem|modreg1, modregEv1 = modregVar |modregMem|modreg1, modregEbCL = modregByte|modregMem|modregCL,
  modregEvCL = modregVar |modregMem|modregCL, modregGvMa = modregVar |modregRegMem|modregMemBound, modregGvMp = modregVar |modregRegMem|modregMemPointer, modregEbIsb = modregByte|modregMem|modregIsb,
  modregEbIub = modregByte|modregMem|modregIub, modregEvIv = modregVar |modregMem|modregIv, modregGvEvIv = modregVar |modregRegMem|modregIv, modregGvEvIsb = modregVar |modregRegMem|modregIsb,
  modregGvEvIub = modregVar |modregRegMem|modregIub, modregEb = modregByte|modregMem, modregGvEb = modregVar |modregRegMem|modregMemByte, modregGvEw = modregVar |modregRegMem|modregMemWord,
  modregEvGvIsb = modregVar |modregMemReg|modregIsb, modregEvGvIub = modregVar |modregMemReg|modregIub, modregEvGvCL = modregVar |modregMemReg|modregCL, modregEvIsb = modregVar |modregMem|modregIsb,
  modregEvIub = modregVar |modregMem|modregIub, modregEp = modregMem|modregMemPointer, modregEw = modregMem|modregMemWord, modregMs = modregMem|modregMemDescriptor,
  modregMn = modregMem|modregMemNone, modregMq = modregMem|modregMemQword, modregGvMn = modregVar |modregRegMem|modregMemNone, modregPqQd = modregRegMem|modregMmx|modregMemPacketDword,
  modregPqQq = modregRegMem|modregMmx, modregPqQqIub = modregPqQq|modregIub, modregQqPq = modregMemReg|modregMmx, modregPqIsb = modregReg|modregMmx|modregIsb,
  modregPqIub = modregReg|modregMmx|modregIub, modregPdEd = modregRegMem|modregMmx|modregMemDword, modregEdPd = modregMemReg|modregMmx|modregMemDword, modregPqEdIub = modregPdEd|modregIub,
  modregPqEwIub = modregRegMem|modregMmx|modregMemWord|modregIub, modregGdQq = modregRegMem|modregDword|modregMemPacket, modregGdQqIub = modregGdQq|modregIub, modregWpsVps = modregMemReg|modregXmm,
  modregVpsWps = modregRegMem|modregXmm, modregVpsWpsIub = modregRegMem|modregXmm|modregIub, modregVpsQq = modregRegMem|modregXmm|modregMemPacket, modregPqWq = modregRegMem|modregMmx|modregMem2FPacket,
  modregVqWq = modregRegMem|modregXmm|modregMem2FPacket, modregWqVq = modregMemReg|modregXmm|modregMem2FPacket, modregVssWss = modregRegMem|modregXmm|modregMemFPacket, modregVssWssIub = modregRegMem|modregXmm|modregMemFPacket|modregIub,
  modregVssEd = modregRegMem|modregXmm|modregMemDword, modregGdWss = modregRegMem|modregDword|modregMem4FPacket, modregWssVss = modregMemReg|modregXmm|modregMemFPacket, modregEdVps = modregMemReg|modregXmm|modregMemDword
}
enum  Movcregs {
  movcregR32CRx = 0, movcregCRxr32 = 1, movcregR32DRx = 2, movcregDRxr32 = 3,
  movcregR32TRx = 4, movcregTRxr32 = 5
}
enum  FpiTypes {
  fpiTypeWInt = 0, fpiTypeSInt, fpiTypeLInt, fpiTypeSingle,
  fpiTypeDouble, fpiTypeExtended, fpiTypeBCD, fpiTypeWord,
  fpiTypeEnv, fpiTypeStatus, fpiTypeCount, fpiTypeImplicitMemory = fpiTypeEnv
}
enum  FpiParams { fpiParamNone, fpiParamStNSt, fpiParamStN, fpiParamStStN }

Variables

INST_3DNOW k6_3DNow_instr []
INST_F3XMM f3Xmm_instr []
uchar f3Xmm_offsets []
int esc_inst []
int esc_inst_mod3 []
int esc_inst_special [][8]


Define Documentation

#define DEFINE_FPI istr,
type       ((istr<<8)|type)
 

Definition at line 211 of file x86table.h.

#define DEFINE_FPIM3 istr,
param       DEFINE_FPI(istr,param)
 

Definition at line 224 of file x86table.h.

#define F3XMM      f3Xmm_instr[f3Xmm_offsets[n]]
 

Definition at line 209 of file x86table.h.

#define FPI_ISTR      (i>>8)
 

Definition at line 212 of file x86table.h.

#define FPI_TYPE      (i&255)
 

Definition at line 213 of file x86table.h.

#define FPIM3_ISTR      FPI_ISTR(i)
 

Definition at line 225 of file x86table.h.

#define FPIM3_PARAM      FPI_TYPE(i)
 

Definition at line 226 of file x86table.h.


Typedef Documentation

typedef struct inst_3DNow INST_3DNOW
 

Definition at line 30 of file x86table.h.

typedef struct inst_f3Xmm INST_F3XMM
 

Definition at line 36 of file x86table.h.


Enumeration Type Documentation

enum FpiParams
 

Enumeration values:
fpiParamNone 
fpiParamStNSt 
fpiParamStN 
fpiParamStStN 

Definition at line 227 of file x86table.h.

enum FpiTypes
 

Enumeration values:
fpiTypeWInt 
fpiTypeSInt 
fpiTypeLInt 
fpiTypeSingle 
fpiTypeDouble 
fpiTypeExtended 
fpiTypeBCD 
fpiTypeWord 
fpiTypeEnv 
fpiTypeStatus 
fpiTypeCount 
fpiTypeImplicitMemory 

Definition at line 214 of file x86table.h.

enum Modreg
 

Enumeration values:
modregSize 
modregByte 
modregVar 
modregDword 
modregMmx 
modregXmm 
modregMemStartBit 
modregMemType 
modregMemByte 
modregMemWord 
modregMemDword 
modregMemQword 
modregMemPacketDword 
modregMemPointer 
modregMemBound 
modregMemDescriptor 
modregMemNone 
modregMemPacket 
modregMemFPacket 
modregMem2FPacket 
modregMem4FPacket 
modregTypeStartBit 
modregType 
modregMemReg 
modregRegMem 
modregMem 
modregReg 
modregThirdStartBit 
modregThird 
modregIsb 
modregIub 
modregIv 
modreg1 
modregCL 
modregEbGb 
modregEvGv 
modregGbEb 
modregGvEv 
modregEwSw 
modregSwEw 
modregEv 
modregEb1 
modregEv1 
modregEbCL 
modregEvCL 
modregGvMa 
modregGvMp 
modregEbIsb 
modregEbIub 
modregEvIv 
modregGvEvIv 
modregGvEvIsb 
modregGvEvIub 
modregEb 
modregGvEb 
modregGvEw 
modregEvGvIsb 
modregEvGvIub 
modregEvGvCL 
modregEvIsb 
modregEvIub 
modregEp 
modregEw 
modregMs 
modregMn 
modregMq 
modregGvMn 
modregPqQd 
modregPqQq 
modregPqQqIub 
modregQqPq 
modregPqIsb 
modregPqIub 
modregPdEd 
modregEdPd 
modregPqEdIub 
modregPqEwIub 
modregGdQq 
modregGdQqIub 
modregWpsVps 
modregVpsWps 
modregVpsWpsIub 
modregVpsQq 
modregPqWq 
modregVqWq 
modregWqVq 
modregVssWss 
modregVssWssIub 
modregVssEd 
modregGdWss 
modregWssVss 
modregEdVps 

Definition at line 69 of file x86table.h.

00070 {
00071 // flag per MOD_REG operands
00072 // bits 2-0 size of registry or memory (if not specified)
00073         modregSize           =7,
00074         modregByte           =0,
00075         modregVar            =1,
00076         modregDword          =2,
00077         modregMmx            =3,
00078 // !!! warning: conflict with some memory type, not use now !!!
00079         modregXmm            =4,
00080 
00081 // bits 6-3 puntatori vari e tipo (solo per mem)
00082         modregMemStartBit    =3,
00083         modregMemType        =15<<modregMemStartBit,
00084         modregMemByte        =1<<modregMemStartBit,
00085         modregMemWord        =2<<modregMemStartBit,
00086         modregMemDword       =3<<modregMemStartBit,
00087         modregMemQword       =4<<modregMemStartBit,
00088         modregMemPacketDword =5<<modregMemStartBit, // MMX or 32bit memory
00089         modregMemPointer     =6<<modregMemStartBit,
00090         modregMemBound       =7<<modregMemStartBit,
00091         modregMemDescriptor  =8<<modregMemStartBit,
00092 // only a pointer (LEA & INVLPG)
00093         modregMemNone        =9<<modregMemStartBit,
00094         modregMemPacket      =10<<modregMemStartBit,
00095         modregMemFPacket     =11<<modregMemStartBit, // XMM or 32bit float
00096         modregMem2FPacket    =12<<modregMemStartBit,
00097         modregMem4FPacket    =13<<modregMemStartBit,
00098 
00099 // bits 8-7 mem/reg, reg/mem or mem only
00100         modregTypeStartBit   =7,
00101         modregType           =3<<modregTypeStartBit,
00102         modregMemReg         =0<<modregTypeStartBit,
00103         modregRegMem         =1<<modregTypeStartBit,
00104         modregMem            =2<<modregTypeStartBit,
00105         modregReg            =3<<modregTypeStartBit,
00106 
00107 // bits 11-9 third operand
00108         modregThirdStartBit  =9,
00109         modregThird          =7<<modregThirdStartBit,
00110         modregIsb            =1<<modregThirdStartBit,
00111         modregIub            =2<<modregThirdStartBit,
00112         modregIv             =3<<modregThirdStartBit,
00113         modreg1              =4<<modregThirdStartBit,
00114         modregCL             =5<<modregThirdStartBit,
00115 
00116 // Manca Mp
00117 // per CR, DR e TR altra funzione
00118 // per EwsW SwEw altra funzione
00119 
00120 // gruppi: funzione gruppo in instr passo numero gruppo, special il tipo
00121 // se non ha tipo passo -indice ad un vettore per i tipi
00122 // sdoppio mod_reg per passare il primo byte
00123 
00124         modregEbGb    =modregByte|modregMemReg,
00125         modregEvGv    =modregVar |modregMemReg,
00126         modregGbEb    =modregByte|modregRegMem,
00127         modregGvEv    =modregVar |modregRegMem,
00128 
00129 // segment
00130         modregEwSw    =modregVar |modregMemReg|modregMemWord,
00131         modregSwEw    =modregVar |modregRegMem|modregMemWord,
00132 
00133         modregEv      =modregVar |modregMem,
00134         modregEb1     =modregByte|modregMem|modreg1,
00135         modregEv1     =modregVar |modregMem|modreg1,
00136         modregEbCL    =modregByte|modregMem|modregCL,
00137         modregEvCL    =modregVar |modregMem|modregCL,
00138         modregGvMa    =modregVar |modregRegMem|modregMemBound,
00139         modregGvMp    =modregVar |modregRegMem|modregMemPointer,
00140         modregEbIsb   =modregByte|modregMem|modregIsb,
00141         modregEbIub   =modregByte|modregMem|modregIub,
00142         modregEvIv    =modregVar |modregMem|modregIv,
00143         modregGvEvIv  =modregVar |modregRegMem|modregIv,
00144         modregGvEvIsb =modregVar |modregRegMem|modregIsb,
00145         modregGvEvIub =modregVar |modregRegMem|modregIub,
00146         modregEb      =modregByte|modregMem,
00147         modregGvEb    =modregVar |modregRegMem|modregMemByte,
00148         modregGvEw    =modregVar |modregRegMem|modregMemWord,
00149         modregEvGvIsb =modregVar |modregMemReg|modregIsb,
00150         modregEvGvIub =modregVar |modregMemReg|modregIub,
00151         modregEvGvCL  =modregVar |modregMemReg|modregCL,
00152         modregEvIsb   =modregVar |modregMem|modregIsb,
00153         modregEvIub   =modregVar |modregMem|modregIub,
00154 
00155 // Memory only
00156         modregEp      =modregMem|modregMemPointer,
00157         modregEw      =modregMem|modregMemWord,
00158         modregMs      =modregMem|modregMemDescriptor,
00159         modregMn      =modregMem|modregMemNone,
00160         modregMq      =modregMem|modregMemQword,
00161 // LEA
00162         modregGvMn    =modregVar |modregRegMem|modregMemNone,
00163 
00164 // Mmx
00165         modregPqQd    =modregRegMem|modregMmx|modregMemPacketDword,
00166         modregPqQq    =modregRegMem|modregMmx,
00167         modregPqQqIub =modregPqQq|modregIub,
00168         modregQqPq    =modregMemReg|modregMmx,
00169         modregPqIsb   =modregReg|modregMmx|modregIsb,
00170         modregPqIub   =modregReg|modregMmx|modregIub,
00171         modregPdEd    =modregRegMem|modregMmx|modregMemDword,
00172         modregEdPd    =modregMemReg|modregMmx|modregMemDword,
00173         modregPqEdIub =modregPdEd|modregIub,
00174         modregPqEwIub =modregRegMem|modregMmx|modregMemWord|modregIub,
00175         modregGdQq    =modregRegMem|modregDword|modregMemPacket,
00176         modregGdQqIub =modregGdQq|modregIub,
00177 
00178 // Xmm
00179 // difference from ps and ss raise from opcode
00180         modregWpsVps     =modregMemReg|modregXmm,
00181         modregVpsWps     =modregRegMem|modregXmm,
00182         modregVpsWpsIub  =modregRegMem|modregXmm|modregIub,
00183         modregVpsQq      =modregRegMem|modregXmm|modregMemPacket,
00184         modregPqWq       =modregRegMem|modregMmx|modregMem2FPacket,
00185         modregVqWq       =modregRegMem|modregXmm|modregMem2FPacket,
00186         modregWqVq       =modregMemReg|modregXmm|modregMem2FPacket,
00187         modregVssWss     =modregRegMem|modregXmm|modregMemFPacket,
00188         modregVssWssIub  =modregRegMem|modregXmm|modregMemFPacket|modregIub,
00189         modregVssEd      =modregRegMem|modregXmm|modregMemDword,
00190         modregGdWss      =modregRegMem|modregDword|modregMem4FPacket,
00191         modregWssVss     =modregMemReg|modregXmm|modregMemFPacket,
00192         modregEdVps      =modregMemReg|modregXmm|modregMemDword
00193 };

enum Movcregs
 

Enumeration values:
movcregR32CRx 
movcregCRxr32 
movcregR32DRx 
movcregDRxr32 
movcregR32TRx 
movcregTRxr32 

Definition at line 196 of file x86table.h.

00197 {
00198         movcregR32CRx =0,
00199         movcregCRxr32 =1,
00200         movcregR32DRx =2,
00201         movcregDRxr32 =3,
00202         movcregR32TRx =4,
00203         movcregTRxr32 =5
00204 };

enum Regs
 

Enumeration values:
regNone 
regAL 
regCL 
regDL 
regBL 
regAH 
regCH 
regDH 
regBH 
regAX 
regCX 
regDX 
regBX 
regSP 
regBP 
regSI 
regDI 
regES 
regCS 
regSS 
regDS 
regFS 
regGS 

Definition at line 38 of file x86table.h.

00039 {
00040         regNone = 0,
00041         
00042         regAL,
00043         regCL,
00044         regDL,
00045         regBL,
00046         regAH,
00047         regCH,
00048         regDH,
00049         regBH,
00050 
00051         regAX,   // Or EAX, etc. as may arise
00052         regCX,
00053         regDX,
00054         regBX,
00055         regSP,
00056         regBP,
00057         regSI,
00058         regDI,
00059 
00060         regES,   // Segment register identifiers
00061         regCS,
00062         regSS,
00063         regDS,
00064         regFS,
00065         regGS
00066 };


Variable Documentation

int esc_inst[]
 

Definition at line 222 of file x86table.h.

int esc_inst_mod3[]
 

Definition at line 231 of file x86table.h.

int esc_inst_special[][8]
 

Definition at line 232 of file x86table.h.

INST_F3XMM f3Xmm_instr[]
 

Definition at line 207 of file x86table.h.

uchar f3Xmm_offsets[]
 

Definition at line 208 of file x86table.h.

INST_3DNOW k6_3DNow_instr[]
 

Definition at line 206 of file x86table.h.


Generated on Mon Jan 13 22:20:35 2003 for perdr by doxygen1.2.15