Make your own free website on Tripod.com
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

registers.h File Reference

#include "x86regs.h"

Go to the source code of this file.

Compounds

struct  reg_info
class  RegistryInfo

Defines

#define DEFINE_REG(size, type, name, string, complete, mask)   __reg_##name,
#define REG(s)   __reg_##s

Typedefs

typedef enum _reg_t reg_t
typedef reg_info reg_info

Enumerations

enum  _reg_t {
  null_reg = -1, byte, byte_low_low, al,
  al, eax, byte, byte_low_low,
  cl, cl, ecx, byte,
  byte_low_low, dl, dl, edx,
  byte, byte_low_low, bl, bl,
  ebx, byte, byte_low_high, ah,
  ah, eax, byte, byte_low_high,
  ch, ch, ecx, byte,
  byte_low_high, dh, dh, edx,
  byte, byte_low_high, bh, bh,
  ebx, word, word_low, ax,
  ax, eax, word, word_low,
  cx, cx, ecx, word,
  word_low, dx, dx, edx,
  word, word_low, bx, bx,
  ebx, word, word_low, sp,
  sp, esp, word, word_low,
  bp, bp, ebp, word,
  word_low, si, si, esi,
  word, word_low, di, di,
  edi, dword, general, eax,
  eax, eax, dword, general,
  ecx, ecx, ecx, dword,
  general, edx, edx, edx,
  dword, general, ebx, ebx,
  ebx, dword, general, esp,
  esp, esp, dword, general,
  ebp, ebp, ebp, dword,
  general, esi, esi, esi,
  dword, general, edi, edi,
  edi, packetI, general, mm0,
  mm0, mm0, packetI, general,
  mm1, mm1, mm1, packetI,
  general, mm2, mm2, mm2,
  packetI, general, mm3, mm3,
  mm3, packetI, general, mm4,
  mm4, mm4, packetI, general,
  mm5, mm5, mm5, packetI,
  general, mm6, mm6, mm6,
  packetI, general, mm7, mm7,
  mm7, packetF, general, xmm0,
  xmm0, xmm0, packetF, general,
  xmm1, xmm1, xmm1, packetF,
  general, xmm2, xmm2, xmm2,
  packetF, general, xmm3, xmm3,
  xmm3, packetF, general, xmm4,
  xmm4, xmm4, packetF, general,
  xmm5, xmm5, xmm5, packetF,
  general, xmm6, xmm6, xmm6,
  packetF, general, xmm7, xmm7,
  xmm7, dword, special, eip,
  eip, eip, word, special,
  ip, ip, eip, word,
  segment, es, es, es,
  word, segment, cs, cs,
  cs, word, segment, ss,
  ss, ss, word, segment,
  ds, ds, ds, word,
  segment, fs, fs, fs,
  word, segment, gs, gs,
  gs, floating, general, st0,
  st, st0, floating, general,
  st1, st, st1, floating,
  general, st2, st, st2,
  floating, general, st3, st,
  st3, floating, general, st4,
  st, st4, floating, general,
  st5, st, st5, floating,
  general, st6, st, st6,
  floating, general, st7, st,
  st7, dword, special, cr0,
  cr0, cr0, dword, special,
  cr1, cr1, cr1, dword,
  special, cr2, cr2, cr2,
  dword, special, cr3, cr3,
  cr3, dword, special, cr4,
  cr4, cr4, dword, special,
  cr5, cr5, cr5, dword,
  special, cr6, cr6, cr6,
  dword, special, cr7, cr7,
  cr7, dword, special, dr0,
  dr0, dr0, dword, special,
  dr1, dr1, dr1, dword,
  special, dr2, dr2, dr2,
  dword, special, dr3, dr3,
  dr3, dword, special, dr4,
  dr4, dr4, dword, special,
  dr5, dr5, dr5, dword,
  special, dr6, dr6, dr6,
  dword, special, dr7, dr7,
  dr7, dword, special, tr0,
  tr0, tr0, dword, special,
  tr1, tr1, tr1, dword,
  special, tr2, tr2, tr2,
  dword, special, tr3, tr3,
  tr3, dword, special, tr4,
  tr4, tr4, dword, special,
  tr5, tr5, tr5, dword,
  special, tr6, tr6, tr6,
  dword, special, tr7, tr7,
  tr7, __reg_Count
}


Define Documentation

#define DEFINE_REG size,
type,
name,
string,
complete,
mask       __reg_##name,
 

Definition at line 28 of file registers.h.

REG      __reg_##s
 

Definition at line 188 of file registers.h.

Referenced by Instruction::GetUseType(), INSTPROCDECL(), InstructionDecoder::mod_reg2(), ScanningComplexReg::ProcessInstruction(), and Instruction::WriteRegUsage().


Typedef Documentation

typedef struct reg_info reg_info
 

typedef enum _reg_t reg_t
 

Referenced by CodeParser::ExecuteComplexReferenceReg(), get_regnum(), Instruction::GetUseType(), and ScanningComplexReg::ScanningComplexReg().


Enumeration Type Documentation

enum _reg_t
 

Enumeration values:
null_reg 
byte 
byte_low_low 
al 
al 
eax 
byte 
byte_low_low 
cl 
cl 
ecx 
byte 
byte_low_low 
dl 
dl 
edx 
byte 
byte_low_low 
bl 
bl 
ebx 
byte 
byte_low_high 
ah 
ah 
eax 
byte 
byte_low_high 
ch 
ch 
ecx 
byte 
byte_low_high 
dh 
dh 
edx 
byte 
byte_low_high 
bh 
bh 
ebx 
word 
word_low 
ax 
ax 
eax 
word 
word_low 
cx 
cx 
ecx 
word 
word_low 
dx 
dx 
edx 
word 
word_low 
bx 
bx 
ebx 
word 
word_low 
sp 
sp 
esp 
word 
word_low 
bp 
bp 
ebp 
word 
word_low 
si 
si 
esi 
word 
word_low 
di 
di 
edi 
dword 
general 
eax 
eax 
eax 
dword 
general 
ecx 
ecx 
ecx 
dword 
general 
edx 
edx 
edx 
dword 
general 
ebx 
ebx 
ebx 
dword 
general 
esp 
esp 
esp 
dword 
general 
ebp 
ebp 
ebp 
dword 
general 
esi 
esi 
esi 
dword 
general 
edi 
edi 
edi 
packetI 
general 
mm0 
mm0 
mm0 
packetI 
general 
mm1 
mm1 
mm1 
packetI 
general 
mm2 
mm2 
mm2 
packetI 
general 
mm3 
mm3 
mm3 
packetI 
general 
mm4 
mm4 
mm4 
packetI 
general 
mm5 
mm5 
mm5 
packetI 
general 
mm6 
mm6 
mm6 
packetI 
general 
mm7 
mm7 
mm7 
packetF 
general 
xmm0 
xmm0 
xmm0 
packetF 
general 
xmm1 
xmm1 
xmm1 
packetF 
general 
xmm2 
xmm2 
xmm2 
packetF 
general 
xmm3 
xmm3 
xmm3 
packetF 
general 
xmm4 
xmm4 
xmm4 
packetF 
general 
xmm5 
xmm5 
xmm5 
packetF 
general 
xmm6 
xmm6 
xmm6 
packetF 
general 
xmm7 
xmm7 
xmm7 
dword 
special 
eip 
eip 
eip 
word 
special 
ip 
ip 
eip 
word 
segment 
es 
es 
es 
word 
segment 
cs 
cs 
cs 
word 
segment 
ss 
ss 
ss 
word 
segment 
ds 
ds 
ds 
word 
segment 
fs 
fs 
fs 
word 
segment 
gs 
gs 
gs 
floating 
general 
st0 
st 
st0 
floating 
general 
st1 
st 
st1 
floating 
general 
st2 
st 
st2 
floating 
general 
st3 
st 
st3 
floating 
general 
st4 
st 
st4 
floating 
general 
st5 
st 
st5 
floating 
general 
st6 
st 
st6 
floating 
general 
st7 
st 
st7 
dword 
special 
cr0 
cr0 
cr0 
dword 
special 
cr1 
cr1 
cr1 
dword 
special 
cr2 
cr2 
cr2 
dword 
special 
cr3 
cr3 
cr3 
dword 
special 
cr4 
cr4 
cr4 
dword 
special 
cr5 
cr5 
cr5 
dword 
special 
cr6 
cr6 
cr6 
dword 
special 
cr7 
cr7 
cr7 
dword 
special 
dr0 
dr0 
dr0 
dword 
special 
dr1 
dr1 
dr1 
dword 
special 
dr2 
dr2 
dr2 
dword 
special 
dr3 
dr3 
dr3 
dword 
special 
dr4 
dr4 
dr4 
dword 
special 
dr5 
dr5 
dr5 
dword 
special 
dr6 
dr6 
dr6 
dword 
special 
dr7 
dr7 
dr7 
dword 
special 
tr0 
tr0 
tr0 
dword 
special 
tr1 
tr1 
tr1 
dword 
special 
tr2 
tr2 
tr2 
dword 
special 
tr3 
tr3 
tr3 
dword 
special 
tr4 
tr4 
tr4 
dword 
special 
tr5 
tr5 
tr5 
dword 
special 
tr6 
tr6 
tr6 
dword 
special 
tr7 
tr7 
tr7 
__reg_Count 

Definition at line 30 of file registers.h.

00030                     {
00031   null_reg = -1,
00032 #include "x86regs.h"
00033   __reg_Count
00034 } reg_t;
00035 #undef DEFINE_REG
00036 
00037 typedef struct reg_info
00038 {
00039   enum reg_size { bit = 0,byte = 1,word = 2,dword = 4,packetI = 8,packetF = 16,floating = 10};
00040   enum reg_size size;
00041   enum reg_type { flag,byte_low_low,byte_low_high,word_low,general,segment,special };
00042   enum reg_type type;
00043   const char* name;
00044   int completeReg;      // valido per parziali, uguale a reg se non parziale
00045   unsigned partialMask; // !!! quanti bits ?
00046   unsigned char GetByteSize() const
00047   { return (unsigned char)size; }
00048 } reg_info;
00049 
00050 #ifdef DEBUG
00051 #include <stdexcept>
00052 #endif
00053 
00054 class RegistryInfo
00055 {
00056 public:
00057   static const reg_info* GetInfo(const char* name);
00058   static const reg_info* GetInfo(reg_t i);
00059   static reg_t GetIndex(const char* name);
00060 #ifdef DEBUG
00061   static reg_t GetRegSafe(const char* name)
00062   {
00063     reg_t reg = GetIndex(name);
00064     if (reg == null_reg)
00065       throw std::runtime_error(name);
00066     return reg;
00067   }
00068 #endif
00069 };
00070 
00071 #define REG(s) __reg_##s
00072 
00073 #endif //FILE_REGISTERS_H


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