ReactOS  0.4.13-dev-39-g8b6696f
i386-dis.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
#include "dis-asm.h"
#include <setjmp.h>
Include dependency graph for i386-dis.c:

Go to the source code of this file.

Classes

struct  dis_private
 
struct  dis386
 

Macros

#define NDEBUG
 
#define PARAMS(X)   X
 
#define PTR   void*
 
#define bfd_mach_x86_64_intel_syntax   0
 
#define bfd_mach_x86_64   1
 
#define bfd_mach_i386_i386_intel_syntax   2
 
#define bfd_mach_i386_i386   3
 
#define bfd_mach_i386_i8086   4
 
#define abort()   DbgBreakPoint();
 
#define _(X)   X
 
#define ATTRIBUTE_UNUSED
 
#define sprintf_vma(BUF, VMA)   sprintf(BUF, "0x%X", VMA)
 
#define MAXLEN   20
 
#define UNIXWARE_COMPAT   1
 
#define FWAIT_OPCODE   (0x9b)
 
#define REX_MODE64   8
 
#define REX_EXTX   4
 
#define REX_EXTY   2
 
#define REX_EXTZ   1
 
#define USED_REX(value)
 
#define PREFIX_REPZ   1
 
#define PREFIX_REPNZ   2
 
#define PREFIX_LOCK   4
 
#define PREFIX_CS   8
 
#define PREFIX_SS   0x10
 
#define PREFIX_DS   0x20
 
#define PREFIX_ES   0x40
 
#define PREFIX_FS   0x80
 
#define PREFIX_GS   0x100
 
#define PREFIX_DATA   0x200
 
#define PREFIX_ADDR   0x400
 
#define PREFIX_FWAIT   0x800
 
#define FETCH_DATA(info, addr)
 
#define XX   NULL, 0
 
#define Eb   OP_E, b_mode
 
#define Ev   OP_E, v_mode
 
#define Ed   OP_E, d_mode
 
#define Edq   OP_E, dq_mode
 
#define indirEb   OP_indirE, b_mode
 
#define indirEv   OP_indirE, v_mode
 
#define Ew   OP_E, w_mode
 
#define Ma   OP_E, v_mode
 
#define M   OP_M, 0 /* lea, lgdt, etc. */
 
#define Mp   OP_M, 0 /* 32 or 48 bit memory operand for LDS, LES etc */
 
#define Gb   OP_G, b_mode
 
#define Gv   OP_G, v_mode
 
#define Gd   OP_G, d_mode
 
#define Gw   OP_G, w_mode
 
#define Rd   OP_Rd, d_mode
 
#define Rm   OP_Rd, m_mode
 
#define Ib   OP_I, b_mode
 
#define sIb   OP_sI, b_mode /* sign extened byte */
 
#define Iv   OP_I, v_mode
 
#define Iq   OP_I, q_mode
 
#define Iv64   OP_I64, v_mode
 
#define Iw   OP_I, w_mode
 
#define Jb   OP_J, b_mode
 
#define Jv   OP_J, v_mode
 
#define Cm   OP_C, m_mode
 
#define Dm   OP_D, m_mode
 
#define Td   OP_T, d_mode
 
#define RMeAX   OP_REG, eAX_reg
 
#define RMeBX   OP_REG, eBX_reg
 
#define RMeCX   OP_REG, eCX_reg
 
#define RMeDX   OP_REG, eDX_reg
 
#define RMeSP   OP_REG, eSP_reg
 
#define RMeBP   OP_REG, eBP_reg
 
#define RMeSI   OP_REG, eSI_reg
 
#define RMeDI   OP_REG, eDI_reg
 
#define RMrAX   OP_REG, rAX_reg
 
#define RMrBX   OP_REG, rBX_reg
 
#define RMrCX   OP_REG, rCX_reg
 
#define RMrDX   OP_REG, rDX_reg
 
#define RMrSP   OP_REG, rSP_reg
 
#define RMrBP   OP_REG, rBP_reg
 
#define RMrSI   OP_REG, rSI_reg
 
#define RMrDI   OP_REG, rDI_reg
 
#define RMAL   OP_REG, al_reg
 
#define RMAL   OP_REG, al_reg
 
#define RMCL   OP_REG, cl_reg
 
#define RMDL   OP_REG, dl_reg
 
#define RMBL   OP_REG, bl_reg
 
#define RMAH   OP_REG, ah_reg
 
#define RMCH   OP_REG, ch_reg
 
#define RMDH   OP_REG, dh_reg
 
#define RMBH   OP_REG, bh_reg
 
#define RMAX   OP_REG, ax_reg
 
#define RMDX   OP_REG, dx_reg
 
#define eAX   OP_IMREG, eAX_reg
 
#define eBX   OP_IMREG, eBX_reg
 
#define eCX   OP_IMREG, eCX_reg
 
#define eDX   OP_IMREG, eDX_reg
 
#define eSP   OP_IMREG, eSP_reg
 
#define eBP   OP_IMREG, eBP_reg
 
#define eSI   OP_IMREG, eSI_reg
 
#define eDI   OP_IMREG, eDI_reg
 
#define AL   OP_IMREG, al_reg
 
#define AL   OP_IMREG, al_reg
 
#define CL   OP_IMREG, cl_reg
 
#define DL   OP_IMREG, dl_reg
 
#define BL   OP_IMREG, bl_reg
 
#define AH   OP_IMREG, ah_reg
 
#define CH   OP_IMREG, ch_reg
 
#define DH   OP_IMREG, dh_reg
 
#define BH   OP_IMREG, bh_reg
 
#define AX   OP_IMREG, ax_reg
 
#define DX   OP_IMREG, dx_reg
 
#define indirDX   OP_IMREG, indir_dx_reg
 
#define Sw   OP_SEG, w_mode
 
#define Ap   OP_DIR, 0
 
#define Ob   OP_OFF, b_mode
 
#define Ob64   OP_OFF64, b_mode
 
#define Ov   OP_OFF, v_mode
 
#define Ov64   OP_OFF64, v_mode
 
#define Xb   OP_DSreg, eSI_reg
 
#define Xv   OP_DSreg, eSI_reg
 
#define Yb   OP_ESreg, eDI_reg
 
#define Yv   OP_ESreg, eDI_reg
 
#define DSBX   OP_DSreg, eBX_reg
 
#define es   OP_REG, es_reg
 
#define ss   OP_REG, ss_reg
 
#define cs   OP_REG, cs_reg
 
#define ds   OP_REG, ds_reg
 
#define fs   OP_REG, fs_reg
 
#define gs   OP_REG, gs_reg
 
#define MX   OP_MMX, 0
 
#define XM   OP_XMM, 0
 
#define EM   OP_EM, v_mode
 
#define EX   OP_EX, v_mode
 
#define MS   OP_MS, v_mode
 
#define XS   OP_XS, v_mode
 
#define OPSUF   OP_3DNowSuffix, 0
 
#define OPSIMD   OP_SIMD_Suffix, 0
 
#define cond_jump_flag   NULL, cond_jump_mode
 
#define loop_jcxz_flag   NULL, loop_jcxz_mode
 
#define SUFFIX_ALWAYS   4
 
#define AFLAG   2
 
#define DFLAG   1
 
#define b_mode   1 /* byte operand */
 
#define v_mode   2 /* operand size depends on prefixes */
 
#define w_mode   3 /* word operand */
 
#define d_mode   4 /* double word operand */
 
#define q_mode   5 /* quad word operand */
 
#define x_mode   6 /* 80 bit float operand */
 
#define m_mode   7 /* d_mode in 32bit, q_mode in 64bit mode. */
 
#define cond_jump_mode   8
 
#define loop_jcxz_mode   9
 
#define dq_mode   10 /* operand size depends on REX prefixes. */
 
#define es_reg   100
 
#define cs_reg   101
 
#define ss_reg   102
 
#define ds_reg   103
 
#define fs_reg   104
 
#define gs_reg   105
 
#define eAX_reg   108
 
#define eCX_reg   109
 
#define eDX_reg   110
 
#define eBX_reg   111
 
#define eSP_reg   112
 
#define eBP_reg   113
 
#define eSI_reg   114
 
#define eDI_reg   115
 
#define al_reg   116
 
#define cl_reg   117
 
#define dl_reg   118
 
#define bl_reg   119
 
#define ah_reg   120
 
#define ch_reg   121
 
#define dh_reg   122
 
#define bh_reg   123
 
#define ax_reg   124
 
#define cx_reg   125
 
#define dx_reg   126
 
#define bx_reg   127
 
#define sp_reg   128
 
#define bp_reg   129
 
#define si_reg   130
 
#define di_reg   131
 
#define rAX_reg   132
 
#define rCX_reg   133
 
#define rDX_reg   134
 
#define rBX_reg   135
 
#define rSP_reg   136
 
#define rBP_reg   137
 
#define rSI_reg   138
 
#define rDI_reg   139
 
#define indir_dx_reg   150
 
#define FLOATCODE   1
 
#define USE_GROUPS   2
 
#define USE_PREFIX_USER_TABLE   3
 
#define X86_64_SPECIAL   4
 
#define FLOAT   NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
 
#define GRP1b   NULL, NULL, USE_GROUPS, NULL, 0, NULL, 0
 
#define GRP1S   NULL, NULL, USE_GROUPS, NULL, 1, NULL, 0
 
#define GRP1Ss   NULL, NULL, USE_GROUPS, NULL, 2, NULL, 0
 
#define GRP2b   NULL, NULL, USE_GROUPS, NULL, 3, NULL, 0
 
#define GRP2S   NULL, NULL, USE_GROUPS, NULL, 4, NULL, 0
 
#define GRP2b_one   NULL, NULL, USE_GROUPS, NULL, 5, NULL, 0
 
#define GRP2S_one   NULL, NULL, USE_GROUPS, NULL, 6, NULL, 0
 
#define GRP2b_cl   NULL, NULL, USE_GROUPS, NULL, 7, NULL, 0
 
#define GRP2S_cl   NULL, NULL, USE_GROUPS, NULL, 8, NULL, 0
 
#define GRP3b   NULL, NULL, USE_GROUPS, NULL, 9, NULL, 0
 
#define GRP3S   NULL, NULL, USE_GROUPS, NULL, 10, NULL, 0
 
#define GRP4   NULL, NULL, USE_GROUPS, NULL, 11, NULL, 0
 
#define GRP5   NULL, NULL, USE_GROUPS, NULL, 12, NULL, 0
 
#define GRP6   NULL, NULL, USE_GROUPS, NULL, 13, NULL, 0
 
#define GRP7   NULL, NULL, USE_GROUPS, NULL, 14, NULL, 0
 
#define GRP8   NULL, NULL, USE_GROUPS, NULL, 15, NULL, 0
 
#define GRP9   NULL, NULL, USE_GROUPS, NULL, 16, NULL, 0
 
#define GRP10   NULL, NULL, USE_GROUPS, NULL, 17, NULL, 0
 
#define GRP11   NULL, NULL, USE_GROUPS, NULL, 18, NULL, 0
 
#define GRP12   NULL, NULL, USE_GROUPS, NULL, 19, NULL, 0
 
#define GRP13   NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0
 
#define GRP14   NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0
 
#define GRPAMD   NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0
 
#define GRPPADLCK   NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0
 
#define PREGRP0   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0
 
#define PREGRP1   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0
 
#define PREGRP2   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 2, NULL, 0
 
#define PREGRP3   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 3, NULL, 0
 
#define PREGRP4   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 4, NULL, 0
 
#define PREGRP5   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 5, NULL, 0
 
#define PREGRP6   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 6, NULL, 0
 
#define PREGRP7   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 7, NULL, 0
 
#define PREGRP8   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 8, NULL, 0
 
#define PREGRP9   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 9, NULL, 0
 
#define PREGRP10   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 10, NULL, 0
 
#define PREGRP11   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 11, NULL, 0
 
#define PREGRP12   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 12, NULL, 0
 
#define PREGRP13   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 13, NULL, 0
 
#define PREGRP14   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 14, NULL, 0
 
#define PREGRP15   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 15, NULL, 0
 
#define PREGRP16   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 16, NULL, 0
 
#define PREGRP17   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 17, NULL, 0
 
#define PREGRP18   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 18, NULL, 0
 
#define PREGRP19   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 19, NULL, 0
 
#define PREGRP20   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 20, NULL, 0
 
#define PREGRP21   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 21, NULL, 0
 
#define PREGRP22   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 22, NULL, 0
 
#define PREGRP23   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 23, NULL, 0
 
#define PREGRP24   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0
 
#define PREGRP25   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0
 
#define PREGRP26   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0
 
#define PREGRP27   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 27, NULL, 0
 
#define PREGRP28   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 28, NULL, 0
 
#define PREGRP29   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 29, NULL, 0
 
#define PREGRP30   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 30, NULL, 0
 
#define PREGRP31   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 31, NULL, 0
 
#define PREGRP32   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 32, NULL, 0
 
#define X86_64_0   NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0
 
#define MODRM_CHECK   if (!need_modrm) abort ()
 
#define INTERNAL_DISASSEMBLER_ERROR   _("<internal disassembler error>")
 
#define ST   OP_ST, 0
 
#define STi   OP_STi, 0
 
#define FGRPd9_2   NULL, NULL, 0, NULL, 0, NULL, 0
 
#define FGRPd9_4   NULL, NULL, 1, NULL, 0, NULL, 0
 
#define FGRPd9_5   NULL, NULL, 2, NULL, 0, NULL, 0
 
#define FGRPd9_6   NULL, NULL, 3, NULL, 0, NULL, 0
 
#define FGRPd9_7   NULL, NULL, 4, NULL, 0, NULL, 0
 
#define FGRPda_5   NULL, NULL, 5, NULL, 0, NULL, 0
 
#define FGRPdb_4   NULL, NULL, 6, NULL, 0, NULL, 0
 
#define FGRPde_3   NULL, NULL, 7, NULL, 0, NULL, 0
 
#define FGRPdf_4   NULL, NULL, 8, NULL, 0, NULL, 0
 

Typedefs

typedef enum bfd_flavour bfd_flavour
 
typedef enum bfd_architecture bfd_arch
 
typedef unsigned int bfd_vma
 
typedef unsigned char bfd_byte
 
typedef voidbfd
 
typedef signed int bfd_signed_vma
 
typedef void(* op_rtn) (int bytemode, int sizeflag)
 

Enumerations

enum  bfd_flavour { bfd_target_unknown_flavour, bfd_target_unknown_flavour }
 
enum  bfd_architecture { bfd_arch_i386, bfd_arch_i386 }
 
enum  bfd_endian {
  BFD_ENDIAN_BIG, BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN, BFD_ENDIAN_BIG,
  BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN
}
 

Functions

int sprintf (char *str, const char *format,...)
 
int print_insn_i386 (bfd_vma pc, struct disassemble_info *info)
 
int KdbpPrintDisasm (void *Ignored, const char *fmt,...)
 
int KdbpNopPrintDisasm (void *Ignored, const char *fmt,...)
 
static int KdbpReadMemory (unsigned int Addr, unsigned char *Data, unsigned int Length, struct disassemble_info *Ignored)
 
static void KdbpMemoryError (int Status, unsigned int Addr, struct disassemble_info *Ignored)
 
static void KdbpPrintAddressInCode (unsigned int Addr, struct disassemble_info *Ignored)
 
static void KdbpNopPrintAddress (unsigned int Addr, struct disassemble_info *Ignored)
 
LONG KdbpGetInstLength (IN ULONG Address)
 
LONG KdbpDisassemble (IN ULONG Address, IN ULONG IntelSyntax)
 
static int fetch_data (struct disassemble_info *, bfd_byte *)
 
static void ckprefix (void)
 
static const charprefix_name (int, int)
 
static int print_insn (bfd_vma, disassemble_info *)
 
static void dofloat (int)
 
static void OP_ST (int, int)
 
static void OP_STi (int, int)
 
static int putop (const char *, int)
 
static void oappend (const char *)
 
static void append_seg (void)
 
static void OP_indirE (int, int)
 
static void print_operand_value (char *, int, bfd_vma)
 
static void OP_E (int, int)
 
static void OP_G (int, int)
 
static bfd_vma get64 (void)
 
static bfd_signed_vma get32 (void)
 
static bfd_signed_vma get32s (void)
 
static int get16 (void)
 
static void set_op (bfd_vma, int)
 
static void OP_REG (int, int)
 
static void OP_IMREG (int, int)
 
static void OP_I (int, int)
 
static void OP_I64 (int, int)
 
static void OP_sI (int, int)
 
static void OP_J (int, int)
 
static void OP_SEG (int, int)
 
static void OP_DIR (int, int)
 
static void OP_OFF (int, int)
 
static void OP_OFF64 (int, int)
 
static void ptr_reg (int, int)
 
static void OP_ESreg (int, int)
 
static void OP_DSreg (int, int)
 
static void OP_C (int, int)
 
static void OP_D (int, int)
 
static void OP_T (int, int)
 
static void OP_Rd (int, int)
 
static void OP_MMX (int, int)
 
static void OP_XMM (int, int)
 
static void OP_EM (int, int)
 
static void OP_EX (int, int)
 
static void OP_MS (int, int)
 
static void OP_XS (int, int)
 
static void OP_M (int, int)
 
static void OP_0fae (int, int)
 
static void OP_0f07 (int, int)
 
static void NOP_Fixup (int, int)
 
static void OP_3DNowSuffix (int, int)
 
static void OP_SIMD_Suffix (int, int)
 
static void SIMD_Fixup (int, int)
 
static void PNI_Fixup (int, int)
 
static void INVLPG_Fixup (int, int)
 
static void BadOp (void)
 
int print_insn_i386_att (bfd_vma pc, disassemble_info *info)
 
int print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
 
static void OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_SEG (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
 
static void OP_OFF (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
 
static void OP_OFF64 (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void NOP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
 
static void SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
 
static void PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
 

Variables

static int mode_64bit
 
static int prefixes
 
static int rex
 
static int rex_used
 
static int used_prefixes
 
static const struct dis386 dis386 []
 
static const struct dis386 dis386_twobyte []
 
static const unsigned char onebyte_has_modrm [256]
 
static const unsigned char twobyte_has_modrm [256]
 
static const unsigned char twobyte_uses_SSE_prefix [256]
 
static char obuf [100]
 
static charobufp
 
static char scratchbuf [100]
 
static unsigned charstart_codep
 
static unsigned charinsn_codep
 
static unsigned charcodep
 
static disassemble_infothe_info
 
static int mod
 
static int rm
 
static int reg
 
static unsigned char need_modrm
 
static const char ** names64
 
static const char ** names32
 
static const char ** names16
 
static const char ** names8
 
static const char ** names8rex
 
static const char ** names_seg
 
static const char ** index16
 
static const charintel_names64 []
 
static const charintel_names32 []
 
static const charintel_names16 []
 
static const charintel_names8 []
 
static const charintel_names8rex []
 
static const charintel_names_seg []
 
static const charintel_index16 []
 
static const charatt_names64 []
 
static const charatt_names32 []
 
static const charatt_names16 []
 
static const charatt_names8 []
 
static const charatt_names8rex []
 
static const charatt_names_seg []
 
static const charatt_index16 []
 
static const struct dis386 grps [][8]
 
static const struct dis386 prefix_user_table [][4]
 
static const struct dis386 x86_64_table [][2]
 
static char op1out [100]
 
static char op2out [100]
 
static char op3out [100]
 
static int op_ad
 
static int op_index [3]
 
static int two_source_ops
 
static bfd_vma op_address [3]
 
static bfd_vma op_riprel [3]
 
static bfd_vma start_pc
 
static char intel_syntax
 
static char open_char
 
static char close_char
 
static char separator_char
 
static char scale_char
 
static const charfloat_mem []
 
static const unsigned char float_mem_mode []
 
static const struct dis386 float_reg [][8]
 
static charfgrps [][8]
 
static const char *const Suffix3DNow []
 
static const charsimd_cmp_op []
 

Macro Definition Documentation

◆ _

#define _ (   X)    X

Definition at line 36 of file i386-dis.c.

◆ abort

#define abort (   void)    DbgBreakPoint();

Definition at line 35 of file i386-dis.c.

◆ AFLAG

#define AFLAG   2

Definition at line 454 of file i386-dis.c.

◆ AH

#define AH   OP_IMREG, ah_reg

Definition at line 413 of file i386-dis.c.

◆ ah_reg

#define ah_reg   120

Definition at line 488 of file i386-dis.c.

◆ AL [1/2]

#define AL   OP_IMREG, al_reg

Definition at line 409 of file i386-dis.c.

◆ AL [2/2]

#define AL   OP_IMREG, al_reg

Definition at line 409 of file i386-dis.c.

◆ al_reg

#define al_reg   116

Definition at line 484 of file i386-dis.c.

◆ Ap

#define Ap   OP_DIR, 0

Definition at line 422 of file i386-dis.c.

◆ ATTRIBUTE_UNUSED

#define ATTRIBUTE_UNUSED

Definition at line 37 of file i386-dis.c.

◆ AX

#define AX   OP_IMREG, ax_reg

Definition at line 417 of file i386-dis.c.

◆ ax_reg

#define ax_reg   124

Definition at line 493 of file i386-dis.c.

◆ b_mode

#define b_mode   1 /* byte operand */

Definition at line 457 of file i386-dis.c.

◆ bfd_mach_i386_i386

#define bfd_mach_i386_i386   3

Definition at line 33 of file i386-dis.c.

◆ bfd_mach_i386_i386_intel_syntax

#define bfd_mach_i386_i386_intel_syntax   2

Definition at line 32 of file i386-dis.c.

◆ bfd_mach_i386_i8086

#define bfd_mach_i386_i8086   4

Definition at line 34 of file i386-dis.c.

◆ bfd_mach_x86_64

#define bfd_mach_x86_64   1

Definition at line 31 of file i386-dis.c.

◆ bfd_mach_x86_64_intel_syntax

#define bfd_mach_x86_64_intel_syntax   0

Definition at line 30 of file i386-dis.c.

◆ BH

#define BH   OP_IMREG, bh_reg

Definition at line 416 of file i386-dis.c.

◆ bh_reg

#define bh_reg   123

Definition at line 491 of file i386-dis.c.

◆ BL

#define BL   OP_IMREG, bl_reg

Definition at line 412 of file i386-dis.c.

◆ bl_reg

#define bl_reg   119

Definition at line 487 of file i386-dis.c.

◆ bp_reg

#define bp_reg   129

Definition at line 498 of file i386-dis.c.

◆ bx_reg

#define bx_reg   127

Definition at line 496 of file i386-dis.c.

◆ CH

Definition at line 414 of file i386-dis.c.

◆ ch_reg

#define ch_reg   121

Definition at line 489 of file i386-dis.c.

◆ CL

#define CL   OP_IMREG, cl_reg

Definition at line 410 of file i386-dis.c.

◆ cl_reg

#define cl_reg   117

Definition at line 485 of file i386-dis.c.

◆ Cm

#define Cm   OP_C, m_mode

Definition at line 368 of file i386-dis.c.

◆ cond_jump_flag

#define cond_jump_flag   NULL, cond_jump_mode

Definition at line 449 of file i386-dis.c.

◆ cond_jump_mode

#define cond_jump_mode   8

Definition at line 464 of file i386-dis.c.

◆ cs

#define cs   OP_REG, cs_reg

Definition at line 435 of file i386-dis.c.

◆ cs_reg

#define cs_reg   101

Definition at line 469 of file i386-dis.c.

◆ cx_reg

#define cx_reg   125

Definition at line 494 of file i386-dis.c.

◆ d_mode

#define d_mode   4 /* double word operand */

Definition at line 460 of file i386-dis.c.

◆ DFLAG

#define DFLAG   1

Definition at line 455 of file i386-dis.c.

◆ DH

#define DH   OP_IMREG, dh_reg

Definition at line 415 of file i386-dis.c.

◆ dh_reg

#define dh_reg   122

Definition at line 490 of file i386-dis.c.

◆ di_reg

#define di_reg   131

Definition at line 500 of file i386-dis.c.

◆ DL

#define DL   OP_IMREG, dl_reg

Definition at line 411 of file i386-dis.c.

◆ dl_reg

#define dl_reg   118

Definition at line 486 of file i386-dis.c.

◆ Dm

#define Dm   OP_D, m_mode

Definition at line 369 of file i386-dis.c.

◆ dq_mode

#define dq_mode   10 /* operand size depends on REX prefixes. */

Definition at line 466 of file i386-dis.c.

◆ ds

#define ds   OP_REG, ds_reg

Definition at line 436 of file i386-dis.c.

◆ ds_reg

#define ds_reg   103

Definition at line 471 of file i386-dis.c.

◆ DSBX

#define DSBX   OP_DSreg, eBX_reg

Definition at line 431 of file i386-dis.c.

◆ DX

#define DX   OP_IMREG, dx_reg

Definition at line 418 of file i386-dis.c.

◆ dx_reg

#define dx_reg   126

Definition at line 495 of file i386-dis.c.

◆ eAX

#define eAX   OP_IMREG, eAX_reg

Definition at line 400 of file i386-dis.c.

◆ eAX_reg

#define eAX_reg   108

Definition at line 475 of file i386-dis.c.

◆ Eb

#define Eb   OP_E, b_mode

Definition at line 344 of file i386-dis.c.

◆ eBP

#define eBP   OP_IMREG, eBP_reg

Definition at line 405 of file i386-dis.c.

◆ eBP_reg

#define eBP_reg   113

Definition at line 480 of file i386-dis.c.

◆ eBX

#define eBX   OP_IMREG, eBX_reg

Definition at line 401 of file i386-dis.c.

◆ eBX_reg

#define eBX_reg   111

Definition at line 478 of file i386-dis.c.

◆ eCX

#define eCX   OP_IMREG, eCX_reg

Definition at line 402 of file i386-dis.c.

◆ eCX_reg

#define eCX_reg   109

Definition at line 476 of file i386-dis.c.

◆ Ed

#define Ed   OP_E, d_mode

Definition at line 346 of file i386-dis.c.

◆ eDI

#define eDI   OP_IMREG, eDI_reg

Definition at line 407 of file i386-dis.c.

◆ eDI_reg

#define eDI_reg   115

Definition at line 482 of file i386-dis.c.

◆ Edq

#define Edq   OP_E, dq_mode

Definition at line 347 of file i386-dis.c.

◆ eDX

#define eDX   OP_IMREG, eDX_reg

Definition at line 403 of file i386-dis.c.

◆ eDX_reg

#define eDX_reg   110

Definition at line 477 of file i386-dis.c.

◆ EM

#define EM   OP_EM, v_mode

Definition at line 442 of file i386-dis.c.

◆ es

#define es   OP_REG, es_reg

Definition at line 433 of file i386-dis.c.

◆ es_reg

#define es_reg   100

Definition at line 468 of file i386-dis.c.

◆ eSI

#define eSI   OP_IMREG, eSI_reg

Definition at line 406 of file i386-dis.c.

◆ eSI_reg

#define eSI_reg   114

Definition at line 481 of file i386-dis.c.

◆ eSP

#define eSP   OP_IMREG, eSP_reg

Definition at line 404 of file i386-dis.c.

◆ eSP_reg

#define eSP_reg   112

Definition at line 479 of file i386-dis.c.

◆ Ev

#define Ev   OP_E, v_mode

Definition at line 345 of file i386-dis.c.

◆ Ew

#define Ew   OP_E, w_mode

Definition at line 350 of file i386-dis.c.

◆ EX

#define EX   OP_EX, v_mode

Definition at line 443 of file i386-dis.c.

◆ FETCH_DATA

#define FETCH_DATA (   info,
  addr 
)
Value:
((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
? 1 : fetch_data ((info), (addr)))
static int fetch_data(struct disassemble_info *, bfd_byte *)
Definition: i386-dis.c:317
GLenum const GLvoid * addr
Definition: glext.h:9621

Definition at line 312 of file i386-dis.c.

◆ FGRPd9_2

#define FGRPd9_2   NULL, NULL, 0, NULL, 0, NULL, 0

Definition at line 2625 of file i386-dis.c.

◆ FGRPd9_4

#define FGRPd9_4   NULL, NULL, 1, NULL, 0, NULL, 0

Definition at line 2626 of file i386-dis.c.

◆ FGRPd9_5

#define FGRPd9_5   NULL, NULL, 2, NULL, 0, NULL, 0

Definition at line 2627 of file i386-dis.c.

◆ FGRPd9_6

#define FGRPd9_6   NULL, NULL, 3, NULL, 0, NULL, 0

Definition at line 2628 of file i386-dis.c.

◆ FGRPd9_7

#define FGRPd9_7   NULL, NULL, 4, NULL, 0, NULL, 0

Definition at line 2629 of file i386-dis.c.

◆ FGRPda_5

#define FGRPda_5   NULL, NULL, 5, NULL, 0, NULL, 0

Definition at line 2630 of file i386-dis.c.

◆ FGRPdb_4

#define FGRPdb_4   NULL, NULL, 6, NULL, 0, NULL, 0

Definition at line 2631 of file i386-dis.c.

◆ FGRPde_3

#define FGRPde_3   NULL, NULL, 7, NULL, 0, NULL, 0

Definition at line 2632 of file i386-dis.c.

◆ FGRPdf_4

#define FGRPdf_4   NULL, NULL, 8, NULL, 0, NULL, 0

Definition at line 2633 of file i386-dis.c.

◆ FLOAT

#define FLOAT   NULL, NULL, FLOATCODE, NULL, 0, NULL, 0

Definition at line 518 of file i386-dis.c.

◆ FLOATCODE

#define FLOATCODE   1

Definition at line 513 of file i386-dis.c.

◆ fs

Definition at line 437 of file i386-dis.c.

◆ fs_reg

#define fs_reg   104

Definition at line 472 of file i386-dis.c.

◆ FWAIT_OPCODE

#define FWAIT_OPCODE   (0x9b)

Definition at line 263 of file i386-dis.c.

◆ Gb

#define Gb   OP_G, b_mode

Definition at line 354 of file i386-dis.c.

◆ Gd

#define Gd   OP_G, d_mode

Definition at line 356 of file i386-dis.c.

◆ GRP10

#define GRP10   NULL, NULL, USE_GROUPS, NULL, 17, NULL, 0

Definition at line 537 of file i386-dis.c.

◆ GRP11

#define GRP11   NULL, NULL, USE_GROUPS, NULL, 18, NULL, 0

Definition at line 538 of file i386-dis.c.

◆ GRP12

#define GRP12   NULL, NULL, USE_GROUPS, NULL, 19, NULL, 0

Definition at line 539 of file i386-dis.c.

◆ GRP13

#define GRP13   NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0

Definition at line 540 of file i386-dis.c.

◆ GRP14

#define GRP14   NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0

Definition at line 541 of file i386-dis.c.

◆ GRP1b

#define GRP1b   NULL, NULL, USE_GROUPS, NULL, 0, NULL, 0

Definition at line 520 of file i386-dis.c.

◆ GRP1S

#define GRP1S   NULL, NULL, USE_GROUPS, NULL, 1, NULL, 0

Definition at line 521 of file i386-dis.c.

◆ GRP1Ss

#define GRP1Ss   NULL, NULL, USE_GROUPS, NULL, 2, NULL, 0

Definition at line 522 of file i386-dis.c.

◆ GRP2b

#define GRP2b   NULL, NULL, USE_GROUPS, NULL, 3, NULL, 0

Definition at line 523 of file i386-dis.c.

◆ GRP2b_cl

#define GRP2b_cl   NULL, NULL, USE_GROUPS, NULL, 7, NULL, 0

Definition at line 527 of file i386-dis.c.

◆ GRP2b_one

#define GRP2b_one   NULL, NULL, USE_GROUPS, NULL, 5, NULL, 0

Definition at line 525 of file i386-dis.c.

◆ GRP2S

#define GRP2S   NULL, NULL, USE_GROUPS, NULL, 4, NULL, 0

Definition at line 524 of file i386-dis.c.

◆ GRP2S_cl

#define GRP2S_cl   NULL, NULL, USE_GROUPS, NULL, 8, NULL, 0

Definition at line 528 of file i386-dis.c.

◆ GRP2S_one

#define GRP2S_one   NULL, NULL, USE_GROUPS, NULL, 6, NULL, 0

Definition at line 526 of file i386-dis.c.

◆ GRP3b

#define GRP3b   NULL, NULL, USE_GROUPS, NULL, 9, NULL, 0

Definition at line 529 of file i386-dis.c.

◆ GRP3S

#define GRP3S   NULL, NULL, USE_GROUPS, NULL, 10, NULL, 0

Definition at line 530 of file i386-dis.c.

◆ GRP4

#define GRP4   NULL, NULL, USE_GROUPS, NULL, 11, NULL, 0

Definition at line 531 of file i386-dis.c.

◆ GRP5

#define GRP5   NULL, NULL, USE_GROUPS, NULL, 12, NULL, 0

Definition at line 532 of file i386-dis.c.

◆ GRP6

#define GRP6   NULL, NULL, USE_GROUPS, NULL, 13, NULL, 0

Definition at line 533 of file i386-dis.c.

◆ GRP7

#define GRP7   NULL, NULL, USE_GROUPS, NULL, 14, NULL, 0

Definition at line 534 of file i386-dis.c.

◆ GRP8

#define GRP8   NULL, NULL, USE_GROUPS, NULL, 15, NULL, 0

Definition at line 535 of file i386-dis.c.

◆ GRP9

#define GRP9   NULL, NULL, USE_GROUPS, NULL, 16, NULL, 0

Definition at line 536 of file i386-dis.c.

◆ GRPAMD

#define GRPAMD   NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0

Definition at line 542 of file i386-dis.c.

◆ GRPPADLCK

#define GRPPADLCK   NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0

Definition at line 543 of file i386-dis.c.

◆ gs

#define gs   OP_REG, gs_reg

Definition at line 438 of file i386-dis.c.

◆ gs_reg

#define gs_reg   105

Definition at line 473 of file i386-dis.c.

◆ Gv

#define Gv   OP_G, v_mode

Definition at line 355 of file i386-dis.c.

◆ Gw

#define Gw   OP_G, w_mode

Definition at line 357 of file i386-dis.c.

◆ Ib

#define Ib   OP_I, b_mode

Definition at line 360 of file i386-dis.c.

◆ indir_dx_reg

#define indir_dx_reg   150

Definition at line 511 of file i386-dis.c.

◆ indirDX

#define indirDX   OP_IMREG, indir_dx_reg

Definition at line 419 of file i386-dis.c.

◆ indirEb

#define indirEb   OP_indirE, b_mode

Definition at line 348 of file i386-dis.c.

◆ indirEv

#define indirEv   OP_indirE, v_mode

Definition at line 349 of file i386-dis.c.

◆ INTERNAL_DISASSEMBLER_ERROR

#define INTERNAL_DISASSEMBLER_ERROR   _("<internal disassembler error>")

Definition at line 1859 of file i386-dis.c.

◆ Iq

#define Iq   OP_I, q_mode

Definition at line 363 of file i386-dis.c.

◆ Iv

#define Iv   OP_I, v_mode

Definition at line 362 of file i386-dis.c.

◆ Iv64

#define Iv64   OP_I64, v_mode

Definition at line 364 of file i386-dis.c.

◆ Iw

#define Iw   OP_I, w_mode

Definition at line 365 of file i386-dis.c.

◆ Jb

#define Jb   OP_J, b_mode

Definition at line 366 of file i386-dis.c.

◆ Jv

#define Jv   OP_J, v_mode

Definition at line 367 of file i386-dis.c.

◆ loop_jcxz_flag

#define loop_jcxz_flag   NULL, loop_jcxz_mode

Definition at line 450 of file i386-dis.c.

◆ loop_jcxz_mode

#define loop_jcxz_mode   9

Definition at line 465 of file i386-dis.c.

◆ M

#define M   OP_M, 0 /* lea, lgdt, etc. */

Definition at line 352 of file i386-dis.c.

◆ m_mode

#define m_mode   7 /* d_mode in 32bit, q_mode in 64bit mode. */

Definition at line 463 of file i386-dis.c.

◆ Ma

#define Ma   OP_E, v_mode

Definition at line 351 of file i386-dis.c.

◆ MAXLEN

#define MAXLEN   20

Definition at line 189 of file i386-dis.c.

◆ MODRM_CHECK

#define MODRM_CHECK   if (!need_modrm) abort ()

Definition at line 1289 of file i386-dis.c.

◆ Mp

#define Mp   OP_M, 0 /* 32 or 48 bit memory operand for LDS, LES etc */

Definition at line 353 of file i386-dis.c.

◆ MS

#define MS   OP_MS, v_mode

Definition at line 444 of file i386-dis.c.

◆ MX

#define MX   OP_MMX, 0

Definition at line 440 of file i386-dis.c.

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file i386-dis.c.

◆ Ob

#define Ob   OP_OFF, b_mode

Definition at line 423 of file i386-dis.c.

◆ Ob64

#define Ob64   OP_OFF64, b_mode

Definition at line 424 of file i386-dis.c.

◆ OPSIMD

#define OPSIMD   OP_SIMD_Suffix, 0

Definition at line 447 of file i386-dis.c.

◆ OPSUF

#define OPSUF   OP_3DNowSuffix, 0

Definition at line 446 of file i386-dis.c.

◆ Ov

#define Ov   OP_OFF, v_mode

Definition at line 425 of file i386-dis.c.

◆ Ov64

#define Ov64   OP_OFF64, v_mode

Definition at line 426 of file i386-dis.c.

◆ PARAMS

#define PARAMS (   X)    X

Definition at line 15 of file i386-dis.c.

◆ PREFIX_ADDR

#define PREFIX_ADDR   0x400

Definition at line 306 of file i386-dis.c.

◆ PREFIX_CS

#define PREFIX_CS   8

Definition at line 299 of file i386-dis.c.

◆ PREFIX_DATA

#define PREFIX_DATA   0x200

Definition at line 305 of file i386-dis.c.

◆ PREFIX_DS

#define PREFIX_DS   0x20

Definition at line 301 of file i386-dis.c.

◆ PREFIX_ES

#define PREFIX_ES   0x40

Definition at line 302 of file i386-dis.c.

◆ PREFIX_FS

#define PREFIX_FS   0x80

Definition at line 303 of file i386-dis.c.

◆ PREFIX_FWAIT

#define PREFIX_FWAIT   0x800

Definition at line 307 of file i386-dis.c.

◆ PREFIX_GS

#define PREFIX_GS   0x100

Definition at line 304 of file i386-dis.c.

◆ PREFIX_LOCK

#define PREFIX_LOCK   4

Definition at line 298 of file i386-dis.c.

◆ PREFIX_REPNZ

#define PREFIX_REPNZ   2

Definition at line 297 of file i386-dis.c.

◆ PREFIX_REPZ

#define PREFIX_REPZ   1

Definition at line 296 of file i386-dis.c.

◆ PREFIX_SS

#define PREFIX_SS   0x10

Definition at line 300 of file i386-dis.c.

◆ PREGRP0

#define PREGRP0   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0

Definition at line 545 of file i386-dis.c.

◆ PREGRP1

#define PREGRP1   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0

Definition at line 546 of file i386-dis.c.

◆ PREGRP10

#define PREGRP10   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 10, NULL, 0

Definition at line 555 of file i386-dis.c.

◆ PREGRP11

#define PREGRP11   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 11, NULL, 0

Definition at line 556 of file i386-dis.c.

◆ PREGRP12

#define PREGRP12   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 12, NULL, 0

Definition at line 557 of file i386-dis.c.

◆ PREGRP13

#define PREGRP13   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 13, NULL, 0

Definition at line 558 of file i386-dis.c.

◆ PREGRP14

#define PREGRP14   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 14, NULL, 0

Definition at line 559 of file i386-dis.c.

◆ PREGRP15

#define PREGRP15   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 15, NULL, 0

Definition at line 560 of file i386-dis.c.

◆ PREGRP16

#define PREGRP16   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 16, NULL, 0

Definition at line 561 of file i386-dis.c.

◆ PREGRP17

#define PREGRP17   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 17, NULL, 0

Definition at line 562 of file i386-dis.c.

◆ PREGRP18

#define PREGRP18   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 18, NULL, 0

Definition at line 563 of file i386-dis.c.

◆ PREGRP19

#define PREGRP19   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 19, NULL, 0

Definition at line 564 of file i386-dis.c.

◆ PREGRP2

#define PREGRP2   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 2, NULL, 0

Definition at line 547 of file i386-dis.c.

◆ PREGRP20

#define PREGRP20   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 20, NULL, 0

Definition at line 565 of file i386-dis.c.

◆ PREGRP21

#define PREGRP21   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 21, NULL, 0

Definition at line 566 of file i386-dis.c.

◆ PREGRP22

#define PREGRP22   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 22, NULL, 0

Definition at line 567 of file i386-dis.c.

◆ PREGRP23

#define PREGRP23   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 23, NULL, 0

Definition at line 568 of file i386-dis.c.

◆ PREGRP24

#define PREGRP24   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0

Definition at line 569 of file i386-dis.c.

◆ PREGRP25

#define PREGRP25   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0

Definition at line 570 of file i386-dis.c.

◆ PREGRP26

#define PREGRP26   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0

Definition at line 571 of file i386-dis.c.

◆ PREGRP27

#define PREGRP27   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 27, NULL, 0

Definition at line 572 of file i386-dis.c.

◆ PREGRP28

#define PREGRP28   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 28, NULL, 0

Definition at line 573 of file i386-dis.c.

◆ PREGRP29

#define PREGRP29   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 29, NULL, 0

Definition at line 574 of file i386-dis.c.

◆ PREGRP3

#define PREGRP3   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 3, NULL, 0

Definition at line 548 of file i386-dis.c.

◆ PREGRP30

#define PREGRP30   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 30, NULL, 0

Definition at line 575 of file i386-dis.c.

◆ PREGRP31

#define PREGRP31   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 31, NULL, 0

Definition at line 576 of file i386-dis.c.

◆ PREGRP32

#define PREGRP32   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 32, NULL, 0

Definition at line 577 of file i386-dis.c.

◆ PREGRP4

#define PREGRP4   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 4, NULL, 0

Definition at line 549 of file i386-dis.c.

◆ PREGRP5

#define PREGRP5   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 5, NULL, 0

Definition at line 550 of file i386-dis.c.

◆ PREGRP6

#define PREGRP6   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 6, NULL, 0

Definition at line 551 of file i386-dis.c.

◆ PREGRP7

#define PREGRP7   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 7, NULL, 0

Definition at line 552 of file i386-dis.c.

◆ PREGRP8

#define PREGRP8   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 8, NULL, 0

Definition at line 553 of file i386-dis.c.

◆ PREGRP9

#define PREGRP9   NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 9, NULL, 0

Definition at line 554 of file i386-dis.c.

◆ PTR

#define PTR   void*

Definition at line 16 of file i386-dis.c.

◆ q_mode

#define q_mode   5 /* quad word operand */

Definition at line 461 of file i386-dis.c.

◆ rAX_reg

#define rAX_reg   132

Definition at line 502 of file i386-dis.c.

◆ rBP_reg

#define rBP_reg   137

Definition at line 507 of file i386-dis.c.

◆ rBX_reg

#define rBX_reg   135

Definition at line 505 of file i386-dis.c.

◆ rCX_reg

#define rCX_reg   133

Definition at line 503 of file i386-dis.c.

◆ Rd

#define Rd   OP_Rd, d_mode

Definition at line 358 of file i386-dis.c.

◆ rDI_reg

#define rDI_reg   139

Definition at line 509 of file i386-dis.c.

◆ rDX_reg

#define rDX_reg   134

Definition at line 504 of file i386-dis.c.

◆ REX_EXTX

#define REX_EXTX   4

Definition at line 276 of file i386-dis.c.

◆ REX_EXTY

#define REX_EXTY   2

Definition at line 277 of file i386-dis.c.

◆ REX_EXTZ

#define REX_EXTZ   1

Definition at line 278 of file i386-dis.c.

◆ REX_MODE64

#define REX_MODE64   8

Definition at line 275 of file i386-dis.c.

◆ Rm

#define Rm   OP_Rd, m_mode

Definition at line 359 of file i386-dis.c.

◆ RMAH

#define RMAH   OP_REG, ah_reg

Definition at line 393 of file i386-dis.c.

◆ RMAL [1/2]

#define RMAL   OP_REG, al_reg

Definition at line 389 of file i386-dis.c.

◆ RMAL [2/2]

#define RMAL   OP_REG, al_reg

Definition at line 389 of file i386-dis.c.

◆ RMAX

#define RMAX   OP_REG, ax_reg

Definition at line 397 of file i386-dis.c.

◆ RMBH

#define RMBH   OP_REG, bh_reg

Definition at line 396 of file i386-dis.c.

◆ RMBL

#define RMBL   OP_REG, bl_reg

Definition at line 392 of file i386-dis.c.

◆ RMCH

#define RMCH   OP_REG, ch_reg

Definition at line 394 of file i386-dis.c.

◆ RMCL

#define RMCL   OP_REG, cl_reg

Definition at line 390 of file i386-dis.c.

◆ RMDH

#define RMDH   OP_REG, dh_reg

Definition at line 395 of file i386-dis.c.

◆ RMDL

#define RMDL   OP_REG, dl_reg

Definition at line 391 of file i386-dis.c.

◆ RMDX

#define RMDX   OP_REG, dx_reg

Definition at line 398 of file i386-dis.c.

◆ RMeAX

#define RMeAX   OP_REG, eAX_reg

Definition at line 372 of file i386-dis.c.

◆ RMeBP

#define RMeBP   OP_REG, eBP_reg

Definition at line 377 of file i386-dis.c.

◆ RMeBX

#define RMeBX   OP_REG, eBX_reg

Definition at line 373 of file i386-dis.c.

◆ RMeCX

#define RMeCX   OP_REG, eCX_reg

Definition at line 374 of file i386-dis.c.

◆ RMeDI

#define RMeDI   OP_REG, eDI_reg

Definition at line 379 of file i386-dis.c.

◆ RMeDX

#define RMeDX   OP_REG, eDX_reg

Definition at line 375 of file i386-dis.c.

◆ RMeSI

#define RMeSI   OP_REG, eSI_reg

Definition at line 378 of file i386-dis.c.

◆ RMeSP

#define RMeSP   OP_REG, eSP_reg

Definition at line 376 of file i386-dis.c.

◆ RMrAX

#define RMrAX   OP_REG, rAX_reg

Definition at line 380 of file i386-dis.c.

◆ RMrBP

#define RMrBP   OP_REG, rBP_reg

Definition at line 385 of file i386-dis.c.

◆ RMrBX

#define RMrBX   OP_REG, rBX_reg

Definition at line 381 of file i386-dis.c.

◆ RMrCX

#define RMrCX   OP_REG, rCX_reg

Definition at line 382 of file i386-dis.c.

◆ RMrDI

#define RMrDI   OP_REG, rDI_reg

Definition at line 387 of file i386-dis.c.

◆ RMrDX

#define RMrDX   OP_REG, rDX_reg

Definition at line 383 of file i386-dis.c.

◆ RMrSI

#define RMrSI   OP_REG, rSI_reg

Definition at line 386 of file i386-dis.c.

◆ RMrSP

#define RMrSP   OP_REG, rSP_reg

Definition at line 384 of file i386-dis.c.

◆ rSI_reg

#define rSI_reg   138

Definition at line 508 of file i386-dis.c.

◆ rSP_reg

#define rSP_reg   136

Definition at line 506 of file i386-dis.c.

◆ si_reg

#define si_reg   130

Definition at line 499 of file i386-dis.c.

◆ sIb

#define sIb   OP_sI, b_mode /* sign extened byte */

Definition at line 361 of file i386-dis.c.

◆ sp_reg

#define sp_reg   128

Definition at line 497 of file i386-dis.c.

◆ sprintf_vma

#define sprintf_vma (   BUF,
  VMA 
)    sprintf(BUF, "0x%X", VMA)

Definition at line 39 of file i386-dis.c.

◆ ss

#define ss   OP_REG, ss_reg

Definition at line 434 of file i386-dis.c.

◆ ss_reg

#define ss_reg   102

Definition at line 470 of file i386-dis.c.

◆ ST

#define ST   OP_ST, 0

Definition at line 2622 of file i386-dis.c.

◆ STi

#define STi   OP_STi, 0

Definition at line 2623 of file i386-dis.c.

◆ SUFFIX_ALWAYS

#define SUFFIX_ALWAYS   4

Definition at line 453 of file i386-dis.c.

◆ Sw

#define Sw   OP_SEG, w_mode

Definition at line 421 of file i386-dis.c.

◆ Td

#define Td   OP_T, d_mode

Definition at line 370 of file i386-dis.c.

◆ UNIXWARE_COMPAT

#define UNIXWARE_COMPAT   1

Definition at line 196 of file i386-dis.c.

◆ USE_GROUPS

#define USE_GROUPS   2

Definition at line 514 of file i386-dis.c.

◆ USE_PREFIX_USER_TABLE

#define USE_PREFIX_USER_TABLE   3

Definition at line 515 of file i386-dis.c.

◆ USED_REX

#define USED_REX (   value)
Value:
{ \
if (value) \
rex_used |= (rex & value) ? (value) | 0x40 : 0; \
else \
rex_used |= 0x40; \
}
static int rex
Definition: i386-dis.c:272
GLsizei const GLfloat * value
Definition: glext.h:6069

Definition at line 283 of file i386-dis.c.

◆ v_mode

#define v_mode   2 /* operand size depends on prefixes */

Definition at line 458 of file i386-dis.c.

◆ w_mode

#define w_mode   3 /* word operand */

Definition at line 459 of file i386-dis.c.

◆ X86_64_0

#define X86_64_0   NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0

Definition at line 579 of file i386-dis.c.

◆ X86_64_SPECIAL

#define X86_64_SPECIAL   4

Definition at line 516 of file i386-dis.c.

◆ x_mode

#define x_mode   6 /* 80 bit float operand */

Definition at line 462 of file i386-dis.c.

◆ Xb

#define Xb   OP_DSreg, eSI_reg

Definition at line 427 of file i386-dis.c.

◆ XM

#define XM   OP_XMM, 0

Definition at line 441 of file i386-dis.c.

◆ XS

#define XS   OP_XS, v_mode

Definition at line 445 of file i386-dis.c.

◆ Xv

#define Xv   OP_DSreg, eSI_reg

Definition at line 428 of file i386-dis.c.

◆ XX

#define XX   NULL, 0

Definition at line 342 of file i386-dis.c.

◆ Yb

#define Yb   OP_ESreg, eDI_reg

Definition at line 429 of file i386-dis.c.

◆ Yv

#define Yv   OP_ESreg, eDI_reg

Definition at line 430 of file i386-dis.c.

Typedef Documentation

◆ bfd

typedef void* bfd

Definition at line 28 of file i386-dis.c.

◆ bfd_arch

◆ bfd_byte

typedef unsigned char bfd_byte

Definition at line 26 of file i386-dis.c.

◆ bfd_flavour

◆ bfd_signed_vma

Definition at line 29 of file i386-dis.c.

◆ bfd_vma

typedef unsigned int bfd_vma

Definition at line 25 of file i386-dis.c.

◆ op_rtn

typedef void(* op_rtn) (int bytemode, int sizeflag)

Definition at line 581 of file i386-dis.c.

Enumeration Type Documentation

◆ bfd_architecture

Enumerator
bfd_arch_i386 
bfd_arch_i386 

Definition at line 21 of file i386-dis.c.

22 {
24 } bfd_arch;
enum bfd_architecture bfd_arch

◆ bfd_endian

Enumerator
BFD_ENDIAN_BIG 
BIG_ENDIAN_LITTLE 
BFD_ENDIAN_UNKNOWN 
BFD_ENDIAN_BIG 
BIG_ENDIAN_LITTLE 
BFD_ENDIAN_UNKNOWN 

Definition at line 27 of file i386-dis.c.

◆ bfd_flavour

Enumerator
bfd_target_unknown_flavour 
bfd_target_unknown_flavour 

Definition at line 17 of file i386-dis.c.

Function Documentation

◆ append_seg()

static void append_seg ( void  )
static

Definition at line 3126 of file i386-dis.c.

3127 {
3128  if (prefixes & PREFIX_CS)
3129  {
3131  oappend (&"%cs:"[intel_syntax]);
3132  }
3133  if (prefixes & PREFIX_DS)
3134  {
3136  oappend (&"%ds:"[intel_syntax]);
3137  }
3138  if (prefixes & PREFIX_SS)
3139  {
3141  oappend (&"%ss:"[intel_syntax]);
3142  }
3143  if (prefixes & PREFIX_ES)
3144  {
3146  oappend (&"%es:"[intel_syntax]);
3147  }
3148  if (prefixes & PREFIX_FS)
3149  {
3151  oappend (&"%fs:"[intel_syntax]);
3152  }
3153  if (prefixes & PREFIX_GS)
3154  {
3156  oappend (&"%gs:"[intel_syntax]);
3157  }
3158 }
oappend(s)
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_GS
Definition: i386-dis.c:304
#define PREFIX_CS
Definition: i386-dis.c:299
#define PREFIX_DS
Definition: i386-dis.c:301
#define PREFIX_ES
Definition: i386-dis.c:302
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
#define PREFIX_SS
Definition: i386-dis.c:300
#define PREFIX_FS
Definition: i386-dis.c:303

Referenced by OP_DSreg(), OP_E(), OP_OFF(), and OP_OFF64().

◆ BadOp()

static void BadOp ( void  )
static

Definition at line 4437 of file i386-dis.c.

4438 {
4439  /* Throw away prefixes and 1st. opcode byte. */
4440  codep = insn_codep + 1;
4441  oappend ("(bad)");
4442 }
oappend(s)
static unsigned char * insn_codep
Definition: i386-dis.c:1278
static unsigned char * codep
Definition: i386-dis.c:1279

◆ ckprefix()

static void ckprefix ( void  )
static

Definition at line 1862 of file i386-dis.c.

1863 {
1864  int newrex;
1865  rex = 0;
1866  prefixes = 0;
1867  used_prefixes = 0;
1868  rex_used = 0;
1869  while (1)
1870  {
1871  FETCH_DATA (the_info, codep + 1);
1872  newrex = 0;
1873  switch (*codep)
1874  {
1875  /* REX prefixes family. */
1876  case 0x40:
1877  case 0x41:
1878  case 0x42:
1879  case 0x43:
1880  case 0x44:
1881  case 0x45:
1882  case 0x46:
1883  case 0x47:
1884  case 0x48:
1885  case 0x49:
1886  case 0x4a:
1887  case 0x4b:
1888  case 0x4c:
1889  case 0x4d:
1890  case 0x4e:
1891  case 0x4f:
1892  if (mode_64bit)
1893  newrex = *codep;
1894  else
1895  return;
1896  break;
1897  case 0xf3:
1898  prefixes |= PREFIX_REPZ;
1899  break;
1900  case 0xf2:
1902  break;
1903  case 0xf0:
1904  prefixes |= PREFIX_LOCK;
1905  break;
1906  case 0x2e:
1907  prefixes |= PREFIX_CS;
1908  break;
1909  case 0x36:
1910  prefixes |= PREFIX_SS;
1911  break;
1912  case 0x3e:
1913  prefixes |= PREFIX_DS;
1914  break;
1915  case 0x26:
1916  prefixes |= PREFIX_ES;
1917  break;
1918  case 0x64:
1919  prefixes |= PREFIX_FS;
1920  break;
1921  case 0x65:
1922  prefixes |= PREFIX_GS;
1923  break;
1924  case 0x66:
1925  prefixes |= PREFIX_DATA;
1926  break;
1927  case 0x67:
1928  prefixes |= PREFIX_ADDR;
1929  break;
1930  case FWAIT_OPCODE:
1931  /* fwait is really an instruction. If there are prefixes
1932  before the fwait, they belong to the fwait, *not* to the
1933  following instruction. */
1934  if (prefixes)
1935  {
1937  codep++;
1938  return;
1939  }
1941  break;
1942  default:
1943  return;
1944  }
1945  /* Rex is ignored when followed by another prefix. */
1946  if (rex)
1947  {
1948  oappend (prefix_name (rex, 0));
1949  oappend (" ");
1950  }
1951  rex = newrex;
1952  codep++;
1953  }
1954 }
#define PREFIX_LOCK
Definition: i386-dis.c:298
oappend(s)
static int rex_used
Definition: i386-dis.c:274
#define PREFIX_FWAIT
Definition: i386-dis.c:307
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_DATA
Definition: i386-dis.c:305
#define PREFIX_GS
Definition: i386-dis.c:304
#define PREFIX_CS
Definition: i386-dis.c:299
#define PREFIX_REPZ
Definition: i386-dis.c:296
#define PREFIX_DS
Definition: i386-dis.c:301
static disassemble_info * the_info
Definition: i386-dis.c:1280
#define PREFIX_ES
Definition: i386-dis.c:302
#define PREFIX_REPNZ
Definition: i386-dis.c:297
static int rex
Definition: i386-dis.c:272
#define FWAIT_OPCODE
Definition: i386-dis.c:263
#define PREFIX_ADDR
Definition: i386-dis.c:306
static int prefixes
Definition: i386-dis.c:269
static const char * prefix_name(int, int)
Definition: i386-dis.c:1960
#define PREFIX_SS
Definition: i386-dis.c:300
#define PREFIX_FS
Definition: i386-dis.c:303
static int mode_64bit
Definition: i386-dis.c:266
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by print_insn().

◆ dofloat()

static void dofloat ( int  sizeflag)
static

Definition at line 2789 of file i386-dis.c.

2790 {
2791  const struct dis386 *dp;
2792  unsigned char floatop;
2793 
2794  floatop = codep[-1];
2795 
2796  if (mod != 3)
2797  {
2798  int fp_indx = (floatop - 0xd8) * 8 + reg;
2799 
2800  putop (float_mem[fp_indx], sizeflag);
2801  obufp = op1out;
2802  OP_E (float_mem_mode[fp_indx], sizeflag);
2803  return;
2804  }
2805  /* Skip mod/rm byte. */
2806  MODRM_CHECK;
2807  codep++;
2808 
2809  dp = &float_reg[floatop - 0xd8][reg];
2810  if (dp->name == NULL)
2811  {
2812  putop (fgrps[dp->bytemode1][rm], sizeflag);
2813 
2814  /* Instruction fnstsw is only one with strange arg. */
2815  if (floatop == 0xdf && codep[-1] == 0xe0)
2816  strcpy (op1out, names16[0]);
2817  }
2818  else
2819  {
2820  putop (dp->name, sizeflag);
2821 
2822  obufp = op1out;
2823  if (dp->op1)
2824  (*dp->op1) (dp->bytemode1, sizeflag);
2825  obufp = op2out;
2826  if (dp->op2)
2827  (*dp->op2) (dp->bytemode2, sizeflag);
2828  }
2829 }
static const struct dis386 float_reg[][8]
Definition: i386-dis.c:2635
const char * name
Definition: i386-dis.c:575
static const char * float_mem[]
Definition: i386-dis.c:2472
static char * fgrps[][8]
Definition: i386-dis.c:2740
static char op2out[100]
Definition: i386-dis.c:2029
static int reg
Definition: i386-dis.c:1283
static const unsigned char float_mem_mode[]
Definition: i386-dis.c:2547
int bytemode1
Definition: i386-dis.c:577
static char * obufp
Definition: i386-dis.c:1275
smooth NULL
Definition: ftsmooth.c:416
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static char op1out[100]
Definition: i386-dis.c:2029
#define MODRM_CHECK
Definition: i386-dis.c:1289
static void OP_E(int, int)
Definition: i386-dis.c:3226
int bytemode2
Definition: i386-dis.c:579
static int rm
Definition: i386-dis.c:1282
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
op_rtn op1
Definition: i386-dis.c:576
static int putop(const char *, int)
Definition: i386-dis.c:2846
static unsigned char * codep
Definition: i386-dis.c:1279
static const char ** names16
Definition: i386-dis.c:1293
op_rtn op2
Definition: i386-dis.c:578

Referenced by print_insn().

◆ fetch_data()

static int fetch_data ( struct disassemble_info info,
bfd_byte addr 
)
static

Definition at line 317 of file i386-dis.c.

318 {
319  int status;
320  struct dis_private *priv = (struct dis_private *) info->private_data;
321  bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
322 
323  status = (*info->read_memory_func) (start,
324  priv->max_fetched,
325  addr - priv->max_fetched,
326  info);
327  if (status != 0)
328  {
329  /* If we did manage to read at least one byte, then
330  print_insn_i386 will do something sensible. Otherwise, print
331  an error. We do that here because this is where we know
332  STATUS. */
333  if (priv->max_fetched == priv->the_buffer)
334  (*info->memory_error_func) (status, start, info);
335  longjmp (priv->bailout, 1);
336  }
337  else
338  priv->max_fetched = addr;
339  return 1;
340 }
jmp_buf bailout
Definition: i386-dis.c:255
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
bfd_vma insn_start
Definition: i386-dis.c:253
bfd_byte * max_fetched
Definition: i386-dis.c:251
int longjmp(jmp_buf buf, int retval)
GLenum const GLvoid * addr
Definition: glext.h:9621
bfd_byte the_buffer[MAXLEN]
Definition: i386-dis.c:252
GLuint start
Definition: gl.h:1545
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ get16()

static int get16 ( void  )
static

Definition at line 3602 of file i386-dis.c.

3603 {
3604  int x = 0;
3605 
3606  FETCH_DATA (the_info, codep + 2);
3607  x = *codep++ & 0xff;
3608  x |= (*codep++ & 0xff) << 8;
3609  return x;
3610 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static disassemble_info * the_info
Definition: i386-dis.c:1280
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by OP_DIR(), OP_E(), OP_I(), OP_I64(), OP_J(), OP_OFF(), and OP_sI().

◆ get32()

static bfd_signed_vma get32 ( void  )
static

Definition at line 3573 of file i386-dis.c.

3574 {
3575  bfd_signed_vma x = 0;
3576 
3577  FETCH_DATA (the_info, codep + 4);
3578  x = *codep++ & (bfd_signed_vma) 0xff;
3579  x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
3580  x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
3581  x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
3582  return x;
3583 }
LONG_PTR bfd_signed_vma
Definition: i386-dis.c:29
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static disassemble_info * the_info
Definition: i386-dis.c:1280
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by OP_DIR(), OP_I(), OP_I64(), and OP_OFF().

◆ get32s()

static bfd_signed_vma get32s ( void  )
static

Definition at line 3586 of file i386-dis.c.

3587 {
3588  bfd_signed_vma x = 0;
3589 
3590  FETCH_DATA (the_info, codep + 4);
3591  x = *codep++ & (bfd_signed_vma) 0xff;
3592  x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
3593  x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
3594  x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
3595 
3596  x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
3597 
3598  return x;
3599 }
LONG_PTR bfd_signed_vma
Definition: i386-dis.c:29
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static disassemble_info * the_info
Definition: i386-dis.c:1280
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by OP_E(), OP_I(), OP_J(), and OP_sI().

◆ get64()

static bfd_vma get64 ( void  )
static

Definition at line 3548 of file i386-dis.c.

3549 {
3550  bfd_vma x;
3551 #ifdef BFD64
3552  unsigned int a;
3553  unsigned int b;
3554 
3555  FETCH_DATA (the_info, codep + 8);
3556  a = *codep++ & 0xff;
3557  a |= (*codep++ & 0xff) << 8;
3558  a |= (*codep++ & 0xff) << 16;
3559  a |= (*codep++ & 0xff) << 24;
3560  b = *codep++ & 0xff;
3561  b |= (*codep++ & 0xff) << 8;
3562  b |= (*codep++ & 0xff) << 16;
3563  b |= (*codep++ & 0xff) << 24;
3564  x = a + ((bfd_vma) b << 32);
3565 #else
3566  abort ();
3567  x = 0;
3568 #endif
3569  return x;
3570 }
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
#define abort()
Definition: i386-dis.c:35
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define a
Definition: ke_i.h:78
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
static disassemble_info * the_info
Definition: i386-dis.c:1280
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by OP_I64(), and OP_OFF64().

◆ INVLPG_Fixup()

static void INVLPG_Fixup ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4422 of file i386-dis.c.

4423 {
4424  if (*codep == 0xf8)
4425  {
4426  char *p = obuf + strlen (obuf);
4427 
4428  /* Override "invlpg". */
4429  strcpy (p - 6, "swapgs");
4430  codep++;
4431  }
4432  else
4433  OP_E (bytemode, sizeflag);
4434 }
static char obuf[100]
Definition: i386-dis.c:1274
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void int bytemode
Definition: i386-dis.c:3118
int sizeflag
Definition: i386-dis.c:3119
static void OP_E(int, int)
Definition: i386-dis.c:3226
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
GLfloat GLfloat p
Definition: glext.h:8902
static unsigned char * codep
Definition: i386-dis.c:1279

◆ KdbpDisassemble()

LONG KdbpDisassemble ( IN ULONG  Address,
IN ULONG  IntelSyntax 
)

Definition at line 121 of file i386-dis.c.

122 {
124 
125  info.fprintf_func = KdbpPrintDisasm;
126  info.stream = NULL;
127  info.application_data = NULL;
129  info.arch = bfd_arch_i386;
131  info.insn_sets = 0;
132  info.flags = 0;
133  info.read_memory_func = KdbpReadMemory;
134  info.memory_error_func = KdbpMemoryError;
135  info.print_address_func = KdbpPrintAddressInCode;
136  info.symbol_at_address_func = NULL;
137  info.buffer = NULL;
138  info.buffer_vma = info.buffer_length = 0;
139  info.bytes_per_chunk = 0;
140  info.display_endian = BIG_ENDIAN_LITTLE;
141  info.disassembler_options = NULL;
142 
143  return(print_insn_i386(Address, &info));
144 }
int KdbpPrintDisasm(void *Ignored, const char *fmt,...)
Definition: i386-dis.c:48
#define bfd_mach_i386_i386_intel_syntax
Definition: i386-dis.c:32
struct _test_info info[]
Definition: SetCursorPos.c:19
static void KdbpPrintAddressInCode(unsigned int Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:79
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
#define bfd_mach_i386_i386
Definition: i386-dis.c:33
static int KdbpReadMemory(unsigned int Addr, unsigned char *Data, unsigned int Length, struct disassemble_info *Ignored)
Definition: i386-dis.c:66
int print_insn_i386(bfd_vma pc, struct disassemble_info *info)
Definition: i386-dis.c:2016
static void KdbpMemoryError(int Status, unsigned int Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:73

◆ KdbpGetInstLength()

LONG KdbpGetInstLength ( IN ULONG  Address)

Definition at line 95 of file i386-dis.c.

96 {
98 
99  info.fprintf_func = KdbpNopPrintDisasm;
100  info.stream = NULL;
101  info.application_data = NULL;
103  info.arch = bfd_arch_i386;
104  info.mach = bfd_mach_i386_i386;
105  info.insn_sets = 0;
106  info.flags = 0;
107  info.read_memory_func = KdbpReadMemory;
108  info.memory_error_func = KdbpMemoryError;
109  info.print_address_func = KdbpNopPrintAddress;
110  info.symbol_at_address_func = NULL;
111  info.buffer = NULL;
112  info.buffer_vma = info.buffer_length = 0;
113  info.bytes_per_chunk = 0;
114  info.display_endian = BIG_ENDIAN_LITTLE;
115  info.disassembler_options = NULL;
116 
117  return(print_insn_i386(Address, &info));
118 }
struct _test_info info[]
Definition: SetCursorPos.c:19
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
#define bfd_mach_i386_i386
Definition: i386-dis.c:33
static void KdbpNopPrintAddress(unsigned int Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:88
static int KdbpReadMemory(unsigned int Addr, unsigned char *Data, unsigned int Length, struct disassemble_info *Ignored)
Definition: i386-dis.c:66
int print_insn_i386(bfd_vma pc, struct disassemble_info *info)
Definition: i386-dis.c:2016
static void KdbpMemoryError(int Status, unsigned int Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:73
int KdbpNopPrintDisasm(void *Ignored, const char *fmt,...)
Definition: i386-dis.c:62

◆ KdbpMemoryError()

static void KdbpMemoryError ( int  Status,
unsigned int  Addr,
struct disassemble_info Ignored 
)
static

Definition at line 73 of file i386-dis.c.

75 {
76 }

Referenced by KdbpDisassemble(), and KdbpGetInstLength().

◆ KdbpNopPrintAddress()

static void KdbpNopPrintAddress ( unsigned int  Addr,
struct disassemble_info Ignored 
)
static

Definition at line 88 of file i386-dis.c.

89 {
90 }

Referenced by KdbpGetInstLength().

◆ KdbpNopPrintDisasm()

int KdbpNopPrintDisasm ( void Ignored,
const char fmt,
  ... 
)

Definition at line 60 of file i386-dis.c.

61 {
62  return(0);
63 }

◆ KdbpPrintAddressInCode()

static void KdbpPrintAddressInCode ( unsigned int  Addr,
struct disassemble_info Ignored 
)
static

Definition at line 79 of file i386-dis.c.

80 {
81  if (!KdbSymPrintAddress((void*)Addr, NULL))
82  {
83  DbgPrint("<%08x>", Addr);
84  }
85 }
BOOLEAN KdbSymPrintAddress(IN PVOID Address, IN PKTRAP_FRAME Context)
Print address...
Definition: kdb_symbols.c:148
#define DbgPrint
Definition: loader.c:25
smooth NULL
Definition: ftsmooth.c:416

Referenced by KdbpDisassemble().

◆ KdbpPrintDisasm()

int KdbpPrintDisasm ( void Ignored,
const char fmt,
  ... 
)

Definition at line 46 of file i386-dis.c.

47 {
48  va_list ap;
49  static char buffer[256];
50  int ret;
51 
52  va_start(ap, fmt);
53  ret = vsprintf(buffer, fmt, ap);
54  DbgPrint("%s", buffer);
55  va_end(ap);
56  return(ret);
57 }
#define DbgPrint
Definition: loader.c:25
GLuint buffer
Definition: glext.h:5915
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
int ret
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943

◆ KdbpReadMemory()

static int KdbpReadMemory ( unsigned int  Addr,
unsigned char Data,
unsigned int  Length,
struct disassemble_info Ignored 
)
static

Definition at line 66 of file i386-dis.c.

68 {
69  return KdbpSafeReadMemory(Data, (void *)Addr, Length); /* 0 means no error */
70 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS KdbpSafeReadMemory(OUT PVOID Dest, IN PVOID Src, IN ULONG Bytes)
Definition: kdb.c:1734

Referenced by KdbpDisassemble(), and KdbpGetInstLength().

◆ NOP_Fixup() [1/2]

static void NOP_Fixup ( int  ,
int   
)
static

◆ NOP_Fixup() [2/2]

static void NOP_Fixup ( int bytemode  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 4222 of file i386-dis.c.

4223 {
4224  /* NOP with REPZ prefix is called PAUSE. */
4225  if (prefixes == PREFIX_REPZ)
4226  strcpy (obuf, "pause");
4227 }
static char obuf[100]
Definition: i386-dis.c:1274
#define PREFIX_REPZ
Definition: i386-dis.c:296
static int prefixes
Definition: i386-dis.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388

◆ oappend()

static void oappend ( const char s)
static

Definition at line 3119 of file i386-dis.c.

3120 {
3121  strcpy (obufp, s);
3122  obufp += strlen (s);
3123 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static char * obufp
Definition: i386-dis.c:1275
GLdouble s
Definition: gl.h:2039
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388

◆ OP_0f07()

static void OP_0f07 ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4190 of file i386-dis.c.

4191 {
4192  if (mod != 3 || rm != 0)
4193  BadOp ();
4194  else
4195  OP_E (bytemode, sizeflag);
4196 }
else BadOp()
Definition: i386-dis.c:4295
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static void OP_E(int, int)
Definition: i386-dis.c:3226
static int rm
Definition: i386-dis.c:1282

◆ OP_0fae()

static void OP_0fae ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4199 of file i386-dis.c.

4200 {
4201  if (mod == 3)
4202  {
4203  if (reg == 7)
4204  strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence");
4205 
4206  if (reg < 5 || rm != 0)
4207  {
4208  BadOp (); /* bad sfence, mfence, or lfence */
4209  return;
4210  }
4211  }
4212  else if (reg != 7)
4213  {
4214  BadOp (); /* bad clflush */
4215  return;
4216  }
4217 
4218  OP_E (bytemode, sizeflag);
4219 }
static char obuf[100]
Definition: i386-dis.c:1274
static int reg
Definition: i386-dis.c:1283
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
else BadOp()
Definition: i386-dis.c:4295
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static void OP_E(int, int)
Definition: i386-dis.c:3226
static int rm
Definition: i386-dis.c:1282
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388

◆ OP_3DNowSuffix() [1/2]

static void OP_3DNowSuffix ( int  ,
int   
)
static

◆ OP_3DNowSuffix() [2/2]

static void OP_3DNowSuffix ( int bytemode  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 4297 of file i386-dis.c.

4298 {
4299  const char *mnemonic;
4300 
4301  FETCH_DATA (the_info, codep + 1);
4302  /* AMD 3DNow! instructions are specified by an opcode suffix in the
4303  place where an 8-bit immediate would normally go. ie. the last
4304  byte of the instruction. */
4305  obufp = obuf + strlen (obuf);
4306  mnemonic = Suffix3DNow[*codep++ & 0xff];
4307  if (mnemonic)
4308  oappend (mnemonic);
4309  else
4310  {
4311  /* Since a variable sized modrm/sib chunk is between the start
4312  of the opcode (0x0f0f) and the opcode suffix, we need to do
4313  all the modrm processing first, and don't know until now that
4314  we have a bad opcode. This necessitates some cleaning up. */
4315  op1out[0] = '\0';
4316  op2out[0] = '\0';
4317  BadOp ();
4318  }
4319 }
static char obuf[100]
Definition: i386-dis.c:1274
oappend(s)
static char op2out[100]
Definition: i386-dis.c:2029
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static char * obufp
Definition: i386-dis.c:1275
else BadOp()
Definition: i386-dis.c:4295
static disassemble_info * the_info
Definition: i386-dis.c:1280
static char op1out[100]
Definition: i386-dis.c:2029
static const char *const Suffix3DNow[]
Definition: i386-dis.c:4229
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

◆ OP_C() [1/2]

static void OP_C ( int  ,
int   
)
static

◆ OP_C() [2/2]

static void OP_C ( int dummy  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 4052 of file i386-dis.c.

4053 {
4054  int add = 0;
4055  USED_REX (REX_EXTX);
4056  if (rex & REX_EXTX)
4057  add = 8;
4058  sprintf (scratchbuf, "%%cr%d", reg + add);
4060 }
int add
Definition: i386-dis.c:3122
oappend(s)
static int reg
Definition: i386-dis.c:1283
#define USED_REX(value)
Definition: i386-dis.c:283
static int rex
Definition: i386-dis.c:272
static char scratchbuf[100]
Definition: i386-dis.c:1276
#define REX_EXTX
Definition: i386-dis.c:276
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static char intel_syntax
Definition: i386-dis.c:2045

◆ OP_D() [1/2]

static void OP_D ( int  ,
int   
)
static

◆ OP_D() [2/2]

static void OP_D ( int dummy  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 4063 of file i386-dis.c.

4064 {
4065  int add = 0;
4066  USED_REX (REX_EXTX);
4067  if (rex & REX_EXTX)
4068  add = 8;
4069  if (intel_syntax)
4070  sprintf (scratchbuf, "db%d", reg + add);
4071  else
4072  sprintf (scratchbuf, "%%db%d", reg + add);
4073  oappend (scratchbuf);
4074 }
int add
Definition: i386-dis.c:3122
oappend(s)
static int reg
Definition: i386-dis.c:1283
#define USED_REX(value)
Definition: i386-dis.c:283
static int rex
Definition: i386-dis.c:272
static char scratchbuf[100]
Definition: i386-dis.c:1276
#define REX_EXTX
Definition: i386-dis.c:276
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static char intel_syntax
Definition: i386-dis.c:2045

◆ OP_DIR() [1/2]

static void OP_DIR ( int  ,
int   
)
static

◆ OP_DIR() [2/2]

static void OP_DIR ( int dummy  ATTRIBUTE_UNUSED,
int  sizeflag 
)
static

Definition at line 3931 of file i386-dis.c.

3932 {
3933  int seg, offset;
3934 
3935  if (sizeflag & DFLAG)
3936  {
3937  offset = get32 ();
3938  seg = get16 ();
3939  }
3940  else
3941  {
3942  offset = get16 ();
3943  seg = get16 ();
3944  }
3946  if (intel_syntax)
3947  sprintf (scratchbuf, "0x%x,0x%x", seg, offset);
3948  else
3949  sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
3950  oappend (scratchbuf);
3951 }
oappend(s)
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_DATA
Definition: i386-dis.c:305
GLintptr offset
Definition: glext.h:5920
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3573
int sizeflag
Definition: i386-dis.c:3119
#define DFLAG
Definition: i386-dis.c:455
seg
Definition: i386-dis.c:3857
static char scratchbuf[100]
Definition: i386-dis.c:1276
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
static int get16(void)
Definition: i386-dis.c:3602

◆ OP_DSreg()

static void OP_DSreg ( int  code,
int  sizeflag 
)
static

Definition at line 4037 of file i386-dis.c.

4038 {
4039  if ((prefixes
4040  & (PREFIX_CS
4041  | PREFIX_DS
4042  | PREFIX_SS
4043  | PREFIX_ES
4044  | PREFIX_FS
4045  | PREFIX_GS)) == 0)
4046  prefixes |= PREFIX_DS;
4047  append_seg ();
4048  ptr_reg (code, sizeflag);
4049 }
static void ptr_reg(int, int)
Definition: i386-dis.c:4007
static void append_seg(void)
Definition: i386-dis.c:3126
#define PREFIX_GS
Definition: i386-dis.c:304
#define PREFIX_CS
Definition: i386-dis.c:299
#define PREFIX_DS
Definition: i386-dis.c:301
#define PREFIX_ES
Definition: i386-dis.c:302
int sizeflag
Definition: i386-dis.c:3119
static int prefixes
Definition: i386-dis.c:269
#define PREFIX_SS
Definition: i386-dis.c:300
#define PREFIX_FS
Definition: i386-dis.c:303

◆ OP_E()

static void OP_E ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3226 of file i386-dis.c.

3227 {
3228  bfd_vma disp;
3229  int add = 0;
3230  int riprel = 0;
3231  USED_REX (REX_EXTZ);
3232  if (rex & REX_EXTZ)
3233  add += 8;
3234 
3235  /* Skip mod/rm byte. */
3236  MODRM_CHECK;
3237  codep++;
3238 
3239  if (mod == 3)
3240  {
3241  switch (bytemode)
3242  {
3243  case b_mode:
3244  USED_REX (0);
3245  if (rex)
3246  oappend (names8rex[rm + add]);
3247  else
3248  oappend (names8[rm + add]);
3249  break;
3250  case w_mode:
3251  oappend (names16[rm + add]);
3252  break;
3253  case d_mode:
3254  oappend (names32[rm + add]);
3255  break;
3256  case q_mode:
3257  oappend (names64[rm + add]);
3258  break;
3259  case m_mode:
3260  if (mode_64bit)
3261  oappend (names64[rm + add]);
3262  else
3263  oappend (names32[rm + add]);
3264  break;
3265  case v_mode:
3266  case dq_mode:
3267  USED_REX (REX_MODE64);
3268  if (rex & REX_MODE64)
3269  oappend (names64[rm + add]);
3270  else if ((sizeflag & DFLAG) || bytemode == dq_mode)
3271  oappend (names32[rm + add]);
3272  else
3273  oappend (names16[rm + add]);
3275  break;
3276  case 0:
3277  break;
3278  default:
3280  break;
3281  }
3282  return;
3283  }
3284 
3285  disp = 0;
3286  append_seg ();
3287 
3288  if ((sizeflag & AFLAG) || mode_64bit) /* 32 bit address mode */
3289  {
3290  int havesib;
3291  int havebase;
3292  int base;
3293  int index = 0;
3294  int scale = 0;
3295 
3296  havesib = 0;
3297  havebase = 1;
3298  base = rm;
3299 
3300  if (base == 4)
3301  {
3302  havesib = 1;
3303  FETCH_DATA (the_info, codep + 1);
3304  scale = (*codep >> 6) & 3;
3305  index = (*codep >> 3) & 7;
3306  base = *codep & 7;
3307  USED_REX (REX_EXTY);
3308  USED_REX (REX_EXTZ);
3309  if (rex & REX_EXTY)
3310  index += 8;
3311  if (rex & REX_EXTZ)
3312  base += 8;
3313  codep++;
3314  }
3315 
3316  switch (mod)
3317  {
3318  case 0:
3319  if ((base & 7) == 5)
3320  {
3321  havebase = 0;
3322  if (mode_64bit && !havesib && (sizeflag & AFLAG))
3323  riprel = 1;
3324  disp = get32s ();
3325  }
3326  break;
3327  case 1:
3328  FETCH_DATA (the_info, codep + 1);
3329  disp = *codep++;
3330  if ((disp & 0x80) != 0)
3331  disp -= 0x100;
3332  break;
3333  case 2:
3334  disp = get32s ();
3335  break;
3336  }
3337 
3338  if (!intel_syntax)
3339  if (mod != 0 || (base & 7) == 5)
3340  {
3342  oappend (scratchbuf);
3343  if (riprel)
3344  {
3345  set_op (disp, 1);
3346  oappend ("(%rip)");
3347  }
3348  }
3349 
3350  if (havebase || (havesib && (index != 4 || scale != 0)))
3351  {
3352  if (intel_syntax)
3353  {
3354  switch (bytemode)
3355  {
3356  case b_mode:
3357  oappend ("BYTE PTR ");
3358  break;
3359  case w_mode:
3360  oappend ("WORD PTR ");
3361  break;
3362  case v_mode:
3363  if (sizeflag & DFLAG)
3364  oappend ("DWORD PTR ");
3365  else
3366  oappend ("WORD PTR ");
3367  break;
3368  case d_mode:
3369  oappend ("DWORD PTR ");
3370  break;
3371  case q_mode:
3372  oappend ("QWORD PTR ");
3373  break;
3374  case m_mode:
3375  if (mode_64bit)
3376  oappend ("DWORD PTR ");
3377  else
3378  oappend ("QWORD PTR ");
3379  break;
3380  case x_mode:
3381  oappend ("XWORD PTR ");
3382  break;
3383  default:
3384  break;
3385  }
3386  }
3387  *obufp++ = open_char;
3388  if (intel_syntax && riprel)
3389  oappend ("rip + ");
3390  *obufp = '\0';
3391  USED_REX (REX_EXTZ);
3392  if (!havesib && (rex & REX_EXTZ))
3393  base += 8;
3394  if (havebase)
3396  ? names64[base] : names32[base]);
3397  if (havesib)
3398  {
3399  if (index != 4)
3400  {
3401  if (intel_syntax)
3402  {
3403  if (havebase)
3404  {
3405  *obufp++ = separator_char;
3406  *obufp = '\0';
3407  }
3408  sprintf (scratchbuf, "%s",
3409  mode_64bit && (sizeflag & AFLAG)
3410  ? names64[index] : names32[index]);
3411  }
3412  else
3413  sprintf (scratchbuf, ",%s",
3414  mode_64bit && (sizeflag & AFLAG)
3415  ? names64[index] : names32[index]);
3416  oappend (scratchbuf);
3417  }
3418  if (scale != 0 || (!intel_syntax && index != 4))
3419  {
3420  *obufp++ = scale_char;
3421  *obufp = '\0';
3422  sprintf (scratchbuf, "%d", 1 << scale);
3423  oappend (scratchbuf);
3424  }
3425  }
3426  if (intel_syntax)
3427  if (mod != 0 || (base & 7) == 5)
3428  {
3429  /* Don't print zero displacements. */
3430  if (disp != 0)
3431  {
3432  if ((bfd_signed_vma) disp > 0)
3433  {
3434  *obufp++ = '+';
3435  *obufp = '\0';
3436  }
3437 
3439  oappend (scratchbuf);
3440  }
3441  }
3442 
3443  *obufp++ = close_char;
3444  *obufp = '\0';
3445  }
3446  else if (intel_syntax)
3447  {
3448  if (mod != 0 || (base & 7) == 5)
3449  {
3451  | PREFIX_ES | PREFIX_FS | PREFIX_GS))
3452  ;
3453  else
3454  {
3456  oappend (":");
3457  }
3459  oappend (scratchbuf);
3460  }
3461  }
3462  }
3463  else
3464  { /* 16 bit address mode */
3465  switch (mod)
3466  {
3467  case 0:
3468  if ((rm & 7) == 6)
3469  {
3470  disp = get16 ();
3471  if ((disp & 0x8000) != 0)
3472  disp -= 0x10000;
3473  }
3474  break;
3475  case 1:
3476  FETCH_DATA (the_info, codep + 1);
3477  disp = *codep++;
3478  if ((disp & 0x80) != 0)
3479  disp -= 0x100;
3480  break;
3481  case 2:
3482  disp = get16 ();
3483  if ((disp & 0x8000) != 0)
3484  disp -= 0x10000;
3485  break;
3486  }
3487 
3488  if (!intel_syntax)
3489  if (mod != 0 || (rm & 7) == 6)
3490  {
3492  oappend (scratchbuf);
3493  }
3494 
3495  if (mod != 0 || (rm & 7) != 6)
3496  {
3497  *obufp++ = open_char;
3498  *obufp = '\0';
3499  oappend (index16[rm + add]);
3500  *obufp++ = close_char;
3501  *obufp = '\0';
3502  }
3503  }
3504 }
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
int add
Definition: i386-dis.c:3122
disp
Definition: i386-dis.c:3181
oappend(s)
static const char ** index16
Definition: i386-dis.c:1297
static int used_prefixes
Definition: i386-dis.c:293
int riprel
Definition: i386-dis.c:3123
#define REX_EXTZ
Definition: i386-dis.c:278
LONG_PTR bfd_signed_vma
Definition: i386-dis.c:29
static void append_seg(void)
Definition: i386-dis.c:3126
#define PREFIX_DATA
Definition: i386-dis.c:305
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
#define q_mode
Definition: i386-dis.c:461
static const char ** names_seg
Definition: i386-dis.c:1296
static const char ** names64
Definition: i386-dis.c:1291
#define v_mode
Definition: i386-dis.c:458
#define es_reg
Definition: i386-dis.c:468
#define USED_REX(value)
Definition: i386-dis.c:283
static char open_char
Definition: i386-dis.c:2046
#define REX_EXTY
Definition: i386-dis.c:277
#define PREFIX_GS
Definition: i386-dis.c:304
static char * obufp
Definition: i386-dis.c:1275
#define PREFIX_CS
Definition: i386-dis.c:299
print_operand_value(scratchbuf+1, 1, op)
GLuint base
Definition: 3dtext.c:35
set_op(disp, 0)
static const char ** names32
Definition: i386-dis.c:1292
static void int bytemode
Definition: i386-dis.c:3118
GLuint index
Definition: glext.h:6031
#define PREFIX_DS
Definition: i386-dis.c:301
static int mod
Definition: i386-dis.c:1281
#define b_mode
Definition: i386-dis.c:457
#define d_mode
Definition: i386-dis.c:460
static disassemble_info * the_info
Definition: i386-dis.c:1280
#define dq_mode
Definition: i386-dis.c:466
#define PREFIX_ES
Definition: i386-dis.c:302
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
#define DFLAG
Definition: i386-dis.c:455
static char scratchbuf[100]
Definition: i386-dis.c:1276
static const char ** names8
Definition: i386-dis.c:1294
#define MODRM_CHECK
Definition: i386-dis.c:1289
static const char ** names8rex
Definition: i386-dis.c:1295
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
#define ds_reg
Definition: i386-dis.c:471
#define x_mode
Definition: i386-dis.c:462
static int rm
Definition: i386-dis.c:1282
#define w_mode
Definition: i386-dis.c:459
#define PREFIX_SS
Definition: i386-dis.c:300
#define REX_MODE64
Definition: i386-dis.c:275
static char separator_char
Definition: i386-dis.c:2048
static int get16(void)
Definition: i386-dis.c:3602
#define m_mode
Definition: i386-dis.c:463
#define PREFIX_FS
Definition: i386-dis.c:303
static int mode_64bit
Definition: i386-dis.c:266
#define AFLAG
Definition: i386-dis.c:454
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3586
static char scale_char
Definition: i386-dis.c:2049
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static unsigned char * codep
Definition: i386-dis.c:1279
static const char ** names16
Definition: i386-dis.c:1293
static char close_char
Definition: i386-dis.c:2047
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by dofloat(), if(), INVLPG_Fixup(), OP_0f07(), OP_0fae(), OP_EM(), OP_EX(), OP_indirE(), OP_M(), OP_Rd(), and PNI_Fixup().

◆ OP_EM()

static void OP_EM ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4119 of file i386-dis.c.

4120 {
4121  int add = 0;
4122  if (mod != 3)
4123  {
4124  OP_E (bytemode, sizeflag);
4125  return;
4126  }
4127  USED_REX (REX_EXTZ);
4128  if (rex & REX_EXTZ)
4129  add = 8;
4130 
4131  /* Skip mod/rm byte. */
4132  MODRM_CHECK;
4133  codep++;
4135  if (prefixes & PREFIX_DATA)
4136  sprintf (scratchbuf, "%%xmm%d", rm + add);
4137  else
4138  sprintf (scratchbuf, "%%mm%d", rm + add);
4140 }
int add
Definition: i386-dis.c:3122
oappend(s)
static int used_prefixes
Definition: i386-dis.c:293
#define REX_EXTZ
Definition: i386-dis.c:278
#define PREFIX_DATA
Definition: i386-dis.c:305
#define USED_REX(value)
Definition: i386-dis.c:283
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
static char scratchbuf[100]
Definition: i386-dis.c:1276
#define MODRM_CHECK
Definition: i386-dis.c:1289
static void OP_E(int, int)
Definition: i386-dis.c:3226
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
static int rm
Definition: i386-dis.c:1282
static unsigned char * codep
Definition: i386-dis.c:1279

Referenced by OP_MS().

◆ OP_ESreg()

static void OP_ESreg ( int  code,
int  sizeflag 
)
static

Definition at line 4030 of file i386-dis.c.

4031 {
4032  oappend (&"%es:"[intel_syntax]);
4033  ptr_reg (code, sizeflag);
4034 }
oappend(s)
static void ptr_reg(int, int)
Definition: i386-dis.c:4007
int sizeflag
Definition: i386-dis.c:3119
static char intel_syntax
Definition: i386-dis.c:2045

◆ OP_EX()

static void OP_EX ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4143 of file i386-dis.c.

4144 {
4145  int add = 0;
4146  if (mod != 3)
4147  {
4148  OP_E (bytemode, sizeflag);
4149  return;
4150  }
4151  USED_REX (REX_EXTZ);
4152  if (rex & REX_EXTZ)
4153  add = 8;
4154 
4155  /* Skip mod/rm byte. */
4156  MODRM_CHECK;
4157  codep++;
4158  sprintf (scratchbuf, "%%xmm%d", rm + add);
4160 }
int add
Definition: i386-dis.c:3122
oappend(s)
#define REX_EXTZ
Definition: i386-dis.c:278
#define USED_REX(value)
Definition: i386-dis.c:283
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
static char scratchbuf[100]
Definition: i386-dis.c:1276
#define MODRM_CHECK
Definition: i386-dis.c:1289
static void OP_E(int, int)
Definition: i386-dis.c:3226
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static char intel_syntax
Definition: i386-dis.c:2045
static int rm
Definition: i386-dis.c:1282
static unsigned char * codep
Definition: i386-dis.c:1279

Referenced by OP_XS().

◆ OP_G()

static void OP_G ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3507 of file i386-dis.c.

3508 {
3509  int add = 0;
3510  USED_REX (REX_EXTX);
3511  if (rex & REX_EXTX)
3512  add += 8;
3513  switch (bytemode)
3514  {
3515  case b_mode:
3516  USED_REX (0);
3517  if (rex)
3518  oappend (names8rex[reg + add]);
3519  else
3520  oappend (names8[reg + add]);
3521  break;
3522  case w_mode:
3523  oappend (names16[reg + add]);
3524  break;
3525  case d_mode:
3526  oappend (names32[reg + add]);
3527  break;
3528  case q_mode:
3529  oappend (names64[reg + add]);
3530  break;
3531  case v_mode:
3532  USED_REX (REX_MODE64);
3533  if (rex & REX_MODE64)
3534  oappend (names64[reg + add]);
3535  else if (sizeflag & DFLAG)
3536  oappend (names32[reg + add]);
3537  else
3538  oappend (names16[reg + add]);
3540  break;
3541  default:
3543  break;
3544  }
3545 }
int add
Definition: i386-dis.c:3122
oappend(s)
static int reg
Definition: i386-dis.c:1283
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_DATA
Definition: i386-dis.c:305
#define q_mode
Definition: i386-dis.c:461
static const char ** names64
Definition: i386-dis.c:1291
#define v_mode
Definition: i386-dis.c:458
#define USED_REX(value)
Definition: i386-dis.c:283
static const char ** names32
Definition: i386-dis.c:1292
static void int bytemode
Definition: i386-dis.c:3118
#define b_mode
Definition: i386-dis.c:457
#define d_mode
Definition: i386-dis.c:460
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
#define DFLAG
Definition: i386-dis.c:455
static const char ** names8
Definition: i386-dis.c:1294
#define REX_EXTX
Definition: i386-dis.c:276
static const char ** names8rex
Definition: i386-dis.c:1295
static int prefixes
Definition: i386-dis.c:269
#define w_mode
Definition: i386-dis.c:459
#define REX_MODE64
Definition: i386-dis.c:275
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static const char ** names16
Definition: i386-dis.c:1293

◆ OP_I()

static void OP_I ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3737 of file i386-dis.c.

3738 {
3740  bfd_signed_vma mask = -1;
3741 
3742  switch (bytemode)
3743  {
3744  case b_mode:
3745  FETCH_DATA (the_info, codep + 1);
3746  op = *codep++;
3747  mask = 0xff;
3748  break;
3749  case q_mode:
3750  if (mode_64bit)
3751  {
3752  op = get32s ();
3753  break;
3754  }
3755  /* Fall through. */
3756  case v_mode:
3757  USED_REX (REX_MODE64);
3758  if (rex & REX_MODE64)
3759  op = get32s ();
3760  else if (sizeflag & DFLAG)
3761  {
3762  op = get32 ();
3763  mask = 0xffffffff;
3764  }
3765  else
3766  {
3767  op = get16 ();
3768  mask = 0xfffff;
3769  }
3771  break;
3772  case w_mode:
3773  mask = 0xfffff;
3774  op = get16 ();
3775  break;
3776  default:
3778  return;
3779  }
3780 
3781  op &= mask;
3782  scratchbuf[0] = '$';
3783  print_operand_value (scratchbuf + 1, 1, op);
3785  scratchbuf[0] = '\0';
3786 }
oappend(s)
static int used_prefixes
Definition: i386-dis.c:293
LONG_PTR bfd_signed_vma
Definition: i386-dis.c:29
#define PREFIX_DATA
Definition: i386-dis.c:305
#define q_mode
Definition: i386-dis.c:461
#define v_mode
Definition: i386-dis.c:458
#define USED_REX(value)
Definition: i386-dis.c:283
print_operand_value(scratchbuf+1, 1, op)
GLenum GLint GLuint mask
Definition: glext.h:6028
static void int bytemode
Definition: i386-dis.c:3118
#define b_mode
Definition: i386-dis.c:457
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3573
static disassemble_info * the_info
Definition: i386-dis.c:1280
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
#define DFLAG
Definition: i386-dis.c:455
static char scratchbuf[100]
Definition: i386-dis.c:1276
bfd_signed_vma mask
Definition: i386-dis.c:3644
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
#define w_mode
Definition: i386-dis.c:459
#define REX_MODE64
Definition: i386-dis.c:275
static int get16(void)
Definition: i386-dis.c:3602
UINT op
Definition: effect.c:223
static int mode_64bit
Definition: i386-dis.c:266
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3586
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

Referenced by if(), and OP_I64().

◆ OP_I64()

static void OP_I64 ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3789 of file i386-dis.c.

3790 {
3792  bfd_signed_vma mask = -1;
3793 
3794  if (!mode_64bit)
3795  {
3796  OP_I (bytemode, sizeflag);
3797  return;
3798  }
3799 
3800  switch (bytemode)
3801  {
3802  case b_mode:
3803  FETCH_DATA (the_info, codep + 1);
3804  op = *codep++;
3805  mask = 0xff;
3806  break;
3807  case v_mode:
3808  USED_REX (REX_MODE64);
3809  if (rex & REX_MODE64)
3810  op = get64 ();
3811  else if (sizeflag & DFLAG)
3812  {
3813  op = get32 ();
3814  mask = 0xffffffff;
3815  }
3816  else
3817  {
3818  op = get16 ();
3819  mask = 0xfffff;
3820  }
3822  break;
3823  case w_mode:
3824  mask = 0xfffff;
3825  op = get16 ();
3826  break;
3827  default:
3829  return;
3830  }
3831 
3832  op &= mask;
3833  scratchbuf[0] = '$';
3834  print_operand_value (scratchbuf + 1, 1, op);
3836  scratchbuf[0] = '\0';
3837 }
oappend(s)
static int used_prefixes
Definition: i386-dis.c:293
LONG_PTR bfd_signed_vma
Definition: i386-dis.c:29
#define PREFIX_DATA
Definition: i386-dis.c:305
#define v_mode
Definition: i386-dis.c:458
#define USED_REX(value)
Definition: i386-dis.c:283
print_operand_value(scratchbuf+1, 1, op)
GLenum GLint GLuint mask
Definition: glext.h:6028
static void int bytemode
Definition: i386-dis.c:3118
#define b_mode
Definition: i386-dis.c:457
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3573
static disassemble_info * the_info
Definition: i386-dis.c:1280
int sizeflag
Definition: i386-dis.c:3119
static int rex
Definition: i386-dis.c:272
#define DFLAG
Definition: i386-dis.c:455
static char scratchbuf[100]
Definition: i386-dis.c:1276
bfd_signed_vma mask
Definition: i386-dis.c:3644
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
static void OP_I(int, int)
Definition: i386-dis.c:3737
#define w_mode
Definition: i386-dis.c:459
#define REX_MODE64
Definition: i386-dis.c:275
static bfd_vma get64(void)
Definition: i386-dis.c:3548
static int get16(void)
Definition: i386-dis.c:3602
UINT op
Definition: effect.c:223
static int mode_64bit
Definition: i386-dis.c:266
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

◆ OP_IMREG()

static void OP_IMREG ( int  code,
int  sizeflag 
)
static

Definition at line 3690 of file i386-dis.c.

3691 {
3692  const char *s;
3693 
3694  switch (code)
3695  {
3696  case indir_dx_reg:
3697  if (intel_syntax)
3698  s = "[dx]";
3699  else
3700  s = "(%dx)";
3701  break;
3702  case ax_reg: case cx_reg: case dx_reg: case bx_reg:
3703  case sp_reg: case bp_reg: case si_reg: case di_reg:
3704  s = names16[code - ax_reg];
3705  break;
3706  case es_reg: case ss_reg: case cs_reg:
3707  case ds_reg: case fs_reg: case gs_reg:
3708  s = names_seg[code - es_reg];
3709  break;
3710  case al_reg: case ah_reg: case cl_reg: case ch_reg:
3711  case dl_reg: case dh_reg: case bl_reg: case bh_reg:
3712  USED_REX (0);
3713  if (rex)
3714  s = names8rex[code - al_reg];
3715  else
3716  s = names8[code - al_reg];
3717  break;
3718  case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
3719  case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
3720  USED_REX (REX_MODE64);
3721  if (rex & REX_MODE64)
3722  s = names64[code - eAX_reg];
3723  else if (sizeflag & DFLAG)
3724  s = names32[code - eAX_reg];
3725  else
3726  s = names16[code - eAX_reg];
3728  break;
3729  default:
3731  break;
3732  }
3733  oappend (s);
3734 }
#define eDI_reg
Definition: i386-dis.c:482
#define dl_reg
Definition: i386-dis.c:486
oappend(s)
#define indir_dx_reg
Definition: i386-dis.c:511
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_DATA
Definition: i386-dis.c:305
static const char ** names_seg
Definition: i386-dis.c:1296
static const char ** names64
Definition: i386-dis.c:1291
#define bp_reg
Definition: i386-dis.c:498
#define sp_reg
Definition: i386-dis.c:497
#define es_reg
Definition: i386-dis.c:468
#define eAX_reg
Definition: i386-dis.c:475
#define dh_reg
Definition: i386-dis.c:490
#define USED_REX(value)
Definition: i386-dis.c:283
#define ss_reg
Definition: i386-dis.c:470
#define ch_reg
Definition: i386-dis.c:489
#define ax_reg
Definition: i386-dis.c:493
#define dx_reg
Definition: i386-dis.c:495
#define cs_reg
Definition: i386-dis.c:469
#define bl_reg
Definition: i386-dis.c:487
static const char ** names32
Definition: i386-dis.c:1292
#define eSP_reg
Definition: i386-dis.c:479
#define eBX_reg
Definition: i386-dis.c:478
#define fs_reg
Definition: i386-dis.c:472
#define gs_reg
Definition: i386-dis.c:473
int sizeflag
Definition: i386-dis.c:3119
#define eSI_reg
Definition: i386-dis.c:481
#define si_reg
Definition: i386-dis.c:499
static int rex
Definition: i386-dis.c:272
#define cx_reg
Definition: i386-dis.c:494
#define eCX_reg
Definition: i386-dis.c:476
#define eDX_reg
Definition: i386-dis.c:477
#define ah_reg
Definition: i386-dis.c:488
GLdouble s
Definition: gl.h:2039
#define DFLAG
Definition: i386-dis.c:455
#define bh_reg
Definition: i386-dis.c:491
static const char ** names8
Definition: i386-dis.c:1294
static const char ** names8rex
Definition: i386-dis.c:1295
#define cl_reg
Definition: i386-dis.c:485
#define eBP_reg
Definition: i386-dis.c:480
#define di_reg
Definition: i386-dis.c:500
#define al_reg
Definition: i386-dis.c:484
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
#define ds_reg
Definition: i386-dis.c:471
#define REX_MODE64
Definition: i386-dis.c:275
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static const char ** names16
Definition: i386-dis.c:1293
#define bx_reg
Definition: i386-dis.c:496

◆ OP_indirE()

static void OP_indirE ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3161 of file i386-dis.c.

3162 {
3163  if (!intel_syntax)
3164  oappend ("*");
3165  OP_E (bytemode, sizeflag);
3166 }
oappend(s)
static void int bytemode
Definition: i386-dis.c:3118
int sizeflag
Definition: i386-dis.c:3119
static void OP_E(int, int)
Definition: i386-dis.c:3226
static char intel_syntax
Definition: i386-dis.c:2045

◆ OP_J()

static void OP_J ( int  bytemode,
int  sizeflag 
)
static

Definition at line 3889 of file i386-dis.c.

3890 {
3891  bfd_vma disp;
3892  bfd_vma mask = -1;
3893 
3894  switch (bytemode)
3895  {
3896  case b_mode:
3897  FETCH_DATA (the_info, codep + 1);
3898  disp = *codep++;
3899  if ((disp & 0x80) != 0)
3900  disp -= 0x100;
3901  break;
3902  case v_mode:
3903  if (sizeflag & DFLAG)
3904  disp = get32s ();
3905  else
3906  {
3907  disp = get16 ();
3908  /* For some reason, a data16 prefix on a jump instruction
3909  means that the pc is masked to 16 bits after the
3910  displacement is added! */
3911  mask = 0xffff;
3912  }
3913  break;
3914  default:
3916  return;
3917  }
3918  disp = (start_pc + codep - start_codep + disp) & mask;
3919  set_op (disp, 0);
3921  oappend (scratchbuf);
3922 }
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
disp
Definition: i386-dis.c:3181
oappend(s)
#define v_mode
Definition: i386-dis.c:458
print_operand_value(scratchbuf+1, 1, op)
GLenum GLint GLuint mask
Definition: glext.h:6028
set_op(disp, 0)
static void int bytemode
Definition: i386-dis.c:3118
#define b_mode
Definition: i386-dis.c:457
static bfd_vma start_pc
Definition: i386-dis.c:2034
static unsigned char * start_codep
Definition: i386-dis.c:1277
static disassemble_info * the_info
Definition: i386-dis.c:1280
int sizeflag
Definition: i386-dis.c:3119
#define DFLAG
Definition: i386-dis.c:455
static char scratchbuf[100]
Definition: i386-dis.c:1276
static int get16(void)
Definition: i386-dis.c:3602
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3586
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1859
static unsigned char * codep
Definition: i386-dis.c:1279
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:312

◆ OP_M()

static void OP_M ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4181 of file i386-dis.c.

4182 {
4183  if (mod == 3)
4184  BadOp (); /* bad lea,lds,les,lfs,lgs,lss modrm */
4185  else
4186  OP_E (bytemode, sizeflag);
4187 }
else BadOp()
Definition: i386-dis.c:4295
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119
static void OP_E(int, int)
Definition: i386-dis.c:3226

◆ OP_MMX() [1/2]

static void OP_MMX ( int  ,
int   
)
static

◆ OP_MMX() [2/2]

static void OP_MMX ( int bytemode  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 4093 of file i386-dis.c.

4094 {
4095  int add = 0;
4096  USED_REX (REX_EXTX);
4097  if (rex & REX_EXTX)
4098  add = 8;
4100  if (prefixes & PREFIX_DATA)
4101  sprintf (scratchbuf, "%%xmm%d", reg + add);
4102  else
4103  sprintf (scratchbuf, "%%mm%d", reg + add);
4105 }
int add
Definition: i386-dis.c:3122
oappend(s)
static int reg
Definition: i386-dis.c:1283
static int used_prefixes
Definition: i386-dis.c:293
#define PREFIX_DATA
Definition: i386-dis.c:305
#define USED_REX(value)
Definition: i386-dis.c:283
static int rex
Definition: i386-dis.c:272
static char scratchbuf[100]
Definition: i386-dis.c:1276
#define REX_EXTX
Definition: i386-dis.c:276
int sprintf(char *str, const char *format,...)
Definition: utprint.c:762
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045

◆ OP_MS()

static void OP_MS ( int  bytemode,
int  sizeflag 
)
static

Definition at line 4163 of file i386-dis.c.

4164 {
4165  if (mod == 3)
4166  OP_EM (bytemode, sizeflag);
4167  else
4168  BadOp ();
4169 }
static void OP_EM(int, int)
Definition: i386-dis.c:4119
else BadOp()
Definition: i386-dis.c:4295
static void int bytemode
Definition: i386-dis.c:3118
static int mod
Definition: i386-dis.c:1281
int sizeflag
Definition: i386-dis.c:3119

◆ OP_OFF() [1/2]

static void OP_OFF ( int  ,
int   
)
static

Referenced by OP_OFF64().

◆ OP_OFF() [2/2]

static void OP_OFF ( int bytemode  ATTRIBUTE_UNUSED,
int  sizeflag 
)
static

Definition at line 3954 of file i386-dis.c.

3955 {
3956  bfd_vma off;
3957 
3958  append_seg ();
3959 
3960  if ((sizeflag & AFLAG) || mode_64bit)
3961  off = get32 ();
3962  else
3963  off = get16 ();
3964 
3965  if (intel_syntax)
3966  {
3967  if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
3968  | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
3969  {
3971  oappend (":");
3972  }
3973  }
3975  oappend (scratchbuf);
3976 }
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
oappend(s)
static void append_seg(void)
Definition: i386-dis.c:3126
static const char ** names_seg
Definition: i386-dis.c:1296
#define es_reg
Definition: i386-dis.c:468
#define PREFIX_GS
Definition: i386-dis.c:304
#define PREFIX_CS
Definition: i386-dis.c:299
print_operand_value(scratchbuf+1, 1, op)
#define PREFIX_DS
Definition: i386-dis.c:301
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3573
#define PREFIX_ES
Definition: i386-dis.c:302
int sizeflag
Definition: i386-dis.c:3119
static char scratchbuf[100]
Definition: i386-dis.c:1276
static int prefixes
Definition: i386-dis.c:269
static char intel_syntax
Definition: i386-dis.c:2045
#define ds_reg
Definition: i386-dis.c:471
#define PREFIX_SS
Definition: i386-dis.c:300
static int get16(void)
Definition: i386-dis.c:3602
#define PREFIX_FS
Definition: i386-dis.c:303
static int mode_64bit
Definition: i386-dis.c:266
#define AFLAG
Definition: i386-dis.c:454
off
Definition: i386-dis.c:3909

◆ OP_OFF64() [1/2]

static void OP_OFF64 ( int  ,
int   
)
static

◆ OP_OFF64() [2/2]

static void OP_OFF64 ( int bytemode  ATTRIBUTE_UNUSED,
int sizeflag  ATTRIBUTE_UNUSED 
)
static

Definition at line 3979 of file i386-dis.c.

3980 {
3981  bfd_vma off;
3982 
3983  if (!mode_64bit)
3984  {
3986  return;
3987  }
3988 
3989  append_seg ();
3990 
3991  off = get64 ();
3992 
3993  if (intel_syntax)
3994  {
3995  if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
3996  | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
3997  {
3999  oappend (":");
4000  }
4001  }
4003  oappend (scratchbuf);
4004 }
ULONG_PTR bfd_vma
Definition: i386-dis.c:25
oappend(s)
static void append_seg(void)
Definition: i386-dis.c:3126
static const char ** names_seg
Definition: i386-dis.c:1296
#define es_reg
Definition: i386-dis.c:468
#define PREFIX_GS
Definition: i386-dis.c:304
#define PREFIX_CS
Definition: i386-dis.c:299
print_operand_value(scratchbuf+1, 1, op)
static void int bytemode
Definition: i386-dis.c:3118
#define PREFIX_DS
Definition: i386-dis.c:301
#define PREFIX_ES
Definition: i386-dis.c:302
int sizeflag
Definition: i386-dis.c:3119
static char scratchbuf[100]
Definition: i386-dis.c:1276
static int prefixes
Definition: i386-dis.c:269
static void OP_OFF(int, int)
static char intel_syntax
Definition: i386-dis.c:2045
#define ds_reg
Definition: i386-dis.c:471
#define PREFIX_SS
Definition: i386-dis.c:30