Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

x86asm.cc File Reference

#include "x86asm.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define X86ASM_PREFIX_NO   0
#define X86ASM_PREFIX_0F   1
#define X86ASM_PREFIX_0F0F   2
#define X86ASM_PREFIX_D8   3
#define X86ASM_PREFIX_D9   4
#define X86ASM_PREFIX_DA   5
#define X86ASM_PREFIX_DB   6
#define X86ASM_PREFIX_DC   7
#define X86ASM_PREFIX_DD   8
#define X86ASM_PREFIX_DE   9
#define X86ASM_PREFIX_DF   10
#define X86ASM_ERRMSG_AMBIGUOUS   "ambiguous command"
#define X86ASM_ERRMSG_UNKNOWN_COMMAND   "unknown command '%s'"
#define X86ASM_ERRMSG_UNKNOWN_SYMBOL   "unknown symbol '%s'"
#define X86ASM_ERRMSG_INVALID_OPERANDS   "invalid operand(s)"
#define X86ASM_ERRMSG_INTERNAL   "internal error: "
#define MATCHOPNAME_NOMATCH   0
#define MATCHOPNAME_MATCH   1
#define MATCHOPNAME_MATCH_IF_OPSIZE16   2
#define MATCHOPNAME_MATCH_IF_OPSIZE32   3
#define OPSIZE_INV(opsize)   (opsize==X86_OPSIZE16 ? X86_OPSIZE32 : X86_OPSIZE16)
#define ADDRSIZE_INV(addrsize)   (addrsize==X86_ADDRSIZE16 ? X86_ADDRSIZE32 : X86_ADDRSIZE16)

Functions

int iswhitespace (char c)
int isnotwhitespace (char c)

Variables

x86addrcoding modrm16 [3][8]
x86addrcoding modrm32 [3][8]
int lop2hop [10][8]
char immhsz8_16 [] = { SIZE_B, SIZE_C, SIZE_W, SIZE_V, SIZE_D, 0 }
char immhsz16_16 [] = { SIZE_W, SIZE_V, SIZE_D, 0 }
char immhsz32_16 [] = { SIZE_D, 0 }
char immhsz8_32 [] = { SIZE_B, SIZE_C, SIZE_W, SIZE_V, SIZE_D, 0 }
char immhsz16_32 [] = { SIZE_W, SIZE_C, SIZE_D, SIZE_V, 0 }
char immhsz32_32 [] = { SIZE_D, SIZE_V, 0 }
char hsz8_16 [] = { SIZE_B, SIZE_C, 0 }
char hsz16_16 [] = { SIZE_W, SIZE_V, 0 }
char hsz32_16 [] = { SIZE_D, SIZE_P, 0 }
char hsz48_16 [] = { 0 }
char hsz64_16 [] = { SIZE_Q, 0}
char hsz8_32 [] = { SIZE_B, 0 }
char hsz16_32 [] = { SIZE_W, SIZE_C, 0 }
char hsz32_32 [] = { SIZE_D, SIZE_V, 0 }
char hsz48_32 [] = { SIZE_P, 0 }
char hsz64_32 [] = { SIZE_Q, 0}
int reg2size [3] = {1, 2, 4}


Define Documentation

#define ADDRSIZE_INV addrsize   )     (addrsize==X86_ADDRSIZE16 ? X86_ADDRSIZE32 : X86_ADDRSIZE16)
 

Definition at line 947 of file x86asm.cc.

Referenced by x86asm::match_opcode().

#define MATCHOPNAME_MATCH   1
 

Definition at line 926 of file x86asm.cc.

Referenced by x86asm::match_opcode_name().

#define MATCHOPNAME_MATCH_IF_OPSIZE16   2
 

Definition at line 927 of file x86asm.cc.

Referenced by x86asm::match_opcode(), and x86asm::match_opcode_name().

#define MATCHOPNAME_MATCH_IF_OPSIZE32   3
 

Definition at line 928 of file x86asm.cc.

Referenced by x86asm::match_opcode(), and x86asm::match_opcode_name().

#define MATCHOPNAME_NOMATCH   0
 

Definition at line 925 of file x86asm.cc.

Referenced by x86asm::match_fopcodes(), x86asm::match_opcode(), and x86asm::match_opcode_name().

#define OPSIZE_INV opsize   )     (opsize==X86_OPSIZE16 ? X86_OPSIZE32 : X86_OPSIZE16)
 

Definition at line 946 of file x86asm.cc.

Referenced by x86asm::match_opcode().

#define X86ASM_ERRMSG_AMBIGUOUS   "ambiguous command"
 

Definition at line 38 of file x86asm.cc.

#define X86ASM_ERRMSG_INTERNAL   "internal error: "
 

Definition at line 42 of file x86asm.cc.

#define X86ASM_ERRMSG_INVALID_OPERANDS   "invalid operand(s)"
 

Definition at line 41 of file x86asm.cc.

Referenced by x86asm::encode().

#define X86ASM_ERRMSG_UNKNOWN_COMMAND   "unknown command '%s'"
 

Definition at line 39 of file x86asm.cc.

Referenced by x86asm::encode().

#define X86ASM_ERRMSG_UNKNOWN_SYMBOL   "unknown symbol '%s'"
 

Definition at line 40 of file x86asm.cc.

Referenced by x86asm::translate_str().

#define X86ASM_PREFIX_0F   1
 

Definition at line 27 of file x86asm.cc.

Referenced by x86asm::encode(), and x86asm::encode_insn().

#define X86ASM_PREFIX_0F0F   2
 

Definition at line 28 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_D8   3
 

Definition at line 29 of file x86asm.cc.

Referenced by x86asm::encode_insn(), and x86asm::match_fopcodes().

#define X86ASM_PREFIX_D9   4
 

Definition at line 30 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DA   5
 

Definition at line 31 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DB   6
 

Definition at line 32 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DC   7
 

Definition at line 33 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DD   8
 

Definition at line 34 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DE   9
 

Definition at line 35 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_DF   10
 

Definition at line 36 of file x86asm.cc.

Referenced by x86asm::encode_insn().

#define X86ASM_PREFIX_NO   0
 

Definition at line 26 of file x86asm.cc.

Referenced by x86asm::encode(), and x86asm::encode_insn().


Function Documentation

int isnotwhitespace char  c  ) 
 

Definition at line 183 of file x86asm.cc.

Referenced by x86asm::splitstr(), and x86asm::translate_str().

int iswhitespace char  c  ) 
 

Definition at line 178 of file x86asm.cc.

Referenced by x86asm::splitstr(), and x86asm::translate_str().


Variable Documentation

char hsz16_16[] = { SIZE_W, SIZE_V, 0 }
 

Definition at line 157 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz16_32[] = { SIZE_W, SIZE_C, 0 }
 

Definition at line 168 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz32_16[] = { SIZE_D, SIZE_P, 0 }
 

Definition at line 159 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz32_32[] = { SIZE_D, SIZE_V, 0 }
 

Definition at line 170 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz48_16[] = { 0 }
 

Definition at line 161 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz48_32[] = { SIZE_P, 0 }
 

Definition at line 172 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz64_16[] = { SIZE_Q, 0}
 

Definition at line 163 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz64_32[] = { SIZE_Q, 0}
 

Definition at line 174 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz8_16[] = { SIZE_B, SIZE_C, 0 }
 

Definition at line 155 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char hsz8_32[] = { SIZE_B, 0 }
 

Definition at line 166 of file x86asm.cc.

Referenced by x86asm::lsz2hsz().

char immhsz16_16[] = { SIZE_W, SIZE_V, SIZE_D, 0 }
 

Definition at line 143 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

char immhsz16_32[] = { SIZE_W, SIZE_C, SIZE_D, SIZE_V, 0 }
 

Definition at line 150 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

char immhsz32_16[] = { SIZE_D, 0 }
 

Definition at line 145 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

char immhsz32_32[] = { SIZE_D, SIZE_V, 0 }
 

Definition at line 152 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

char immhsz8_16[] = { SIZE_B, SIZE_C, SIZE_W, SIZE_V, SIZE_D, 0 }
 

Definition at line 141 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

char immhsz8_32[] = { SIZE_B, SIZE_C, SIZE_W, SIZE_V, SIZE_D, 0 }
 

Definition at line 148 of file x86asm.cc.

Referenced by x86asm::immlsz2hsz().

int lop2hop[10][8]
 

Initial value:

Definition at line 117 of file x86asm.cc.

Referenced by x86asm::match_type().

x86addrcoding modrm16[3][8]
 

Definition at line 44 of file x86asm.cc.

Referenced by x86asm::encode_modrm().

x86addrcoding modrm32[3][8]
 

Definition at line 80 of file x86asm.cc.

Referenced by x86asm::encode_modrm().

int reg2size[3] = {1, 2, 4}
 

Definition at line 176 of file x86asm.cc.

Referenced by x86asm::opreg().


Generated on Fri May 7 21:15:52 2004 by doxygen 1.3.5