ReactOS  0.4.15-dev-5109-g2469ce2
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%IX", 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 uintptr_t bfd_vma
 
typedef unsigned char bfd_byte
 
typedef voidbfd
 
typedef intptr_t bfd_signed_vma
 
typedef void(* op_rtn) (int bytemode, int sizeflag)
 

Enumerations

enum  bfd_flavour { bfd_target_unknown_flavour }
 
enum  bfd_architecture { bfd_arch_i386 }
 
enum  bfd_endian { 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 (uintptr_t Addr, unsigned char *Data, unsigned int Length, struct disassemble_info *Ignored)
 
static void KdbpMemoryError (int Status, uintptr_t Addr, struct disassemble_info *Ignored)
 
static void KdbpPrintAddressInCode (uintptr_t Addr, struct disassemble_info *Ignored)
 
static void KdbpNopPrintAddress (uintptr_t Addr, struct disassemble_info *Ignored)
 
LONG KdbpGetInstLength (IN ULONG_PTR Address)
 
LONG KdbpDisassemble (IN ULONG_PTR 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 462 of file i386-dis.c.

◆ AH

#define AH   OP_IMREG, ah_reg

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

◆ ah_reg

#define ah_reg   120

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

◆ AL [1/2]

#define AL   OP_IMREG, al_reg

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

◆ AL [2/2]

#define AL   OP_IMREG, al_reg

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

◆ al_reg

#define al_reg   116

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

◆ Ap

#define Ap   OP_DIR, 0

Definition at line 430 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 425 of file i386-dis.c.

◆ ax_reg

#define ax_reg   124

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

◆ b_mode

#define b_mode   1 /* byte operand */

Definition at line 465 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 424 of file i386-dis.c.

◆ bh_reg

#define bh_reg   123

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

◆ BL

#define BL   OP_IMREG, bl_reg

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

◆ bl_reg

#define bl_reg   119

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

◆ bp_reg

#define bp_reg   129

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

◆ bx_reg

#define bx_reg   127

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

◆ CH

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

◆ ch_reg

#define ch_reg   121

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

◆ CL

#define CL   OP_IMREG, cl_reg

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

◆ cl_reg

#define cl_reg   117

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

◆ Cm

#define Cm   OP_C, m_mode

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

◆ cond_jump_flag

#define cond_jump_flag   NULL, cond_jump_mode

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

◆ cond_jump_mode

#define cond_jump_mode   8

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

◆ cs

static CRITICAL_SECTION cs   OP_REG, cs_reg

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

◆ cs_reg

#define cs_reg   101

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

◆ cx_reg

#define cx_reg   125

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

◆ d_mode

#define d_mode   4 /* double word operand */

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

◆ DFLAG

#define DFLAG   1

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

◆ DH

#define DH   OP_IMREG, dh_reg

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

◆ dh_reg

#define dh_reg   122

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

◆ di_reg

#define di_reg   131

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

◆ DL

#define DL   OP_IMREG, dl_reg

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

◆ dl_reg

#define dl_reg   118

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

◆ Dm

#define Dm   OP_D, m_mode

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

◆ dq_mode

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

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

◆ ds

#define ds   OP_REG, ds_reg

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

◆ ds_reg

#define ds_reg   103

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

◆ DSBX

#define DSBX   OP_DSreg, eBX_reg

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

◆ DX

#define DX   OP_IMREG, dx_reg

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

◆ dx_reg

#define dx_reg   126

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

◆ eAX

#define eAX   OP_IMREG, eAX_reg

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

◆ eAX_reg

#define eAX_reg   108

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

◆ Eb

#define Eb   OP_E, b_mode

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

◆ eBP

#define eBP   OP_IMREG, eBP_reg

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

◆ eBP_reg

#define eBP_reg   113

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

◆ eBX

#define eBX   OP_IMREG, eBX_reg

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

◆ eBX_reg

#define eBX_reg   111

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

◆ eCX

#define eCX   OP_IMREG, eCX_reg

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

◆ eCX_reg

#define eCX_reg   109

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

◆ Ed

#define Ed   OP_E, d_mode

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

◆ eDI

#define eDI   OP_IMREG, eDI_reg

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

◆ eDI_reg

#define eDI_reg   115

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

◆ Edq

#define Edq   OP_E, dq_mode

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

◆ eDX

#define eDX   OP_IMREG, eDX_reg

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

◆ eDX_reg

#define eDX_reg   110

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

◆ EM

#define EM   OP_EM, v_mode

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

◆ es

#define es   OP_REG, es_reg

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

◆ es_reg

#define es_reg   100

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

◆ eSI

#define eSI   OP_IMREG, eSI_reg

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

◆ eSI_reg

#define eSI_reg   114

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

◆ eSP

#define eSP   OP_IMREG, eSP_reg

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

◆ eSP_reg

#define eSP_reg   112

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

◆ Ev

#define Ev   OP_E, v_mode

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

◆ Ew

#define Ew   OP_E, w_mode

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

◆ EX

#define EX   OP_EX, v_mode

Definition at line 451 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:325
GLenum const GLvoid * addr
Definition: glext.h:9621

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

◆ FGRPd9_2

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

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

◆ FGRPd9_4

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

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

◆ FGRPd9_5

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

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

◆ FGRPd9_6

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

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

◆ FGRPd9_7

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

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

◆ FGRPda_5

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

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

◆ FGRPdb_4

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

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

◆ FGRPde_3

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

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

◆ FGRPdf_4

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

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

◆ FLOAT

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

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

◆ FLOATCODE

#define FLOATCODE   1

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

◆ fs

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

◆ fs_reg

#define fs_reg   104

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

◆ FWAIT_OPCODE

#define FWAIT_OPCODE   (0x9b)

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

◆ Gb

#define Gb   OP_G, b_mode

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

◆ Gd

#define Gd   OP_G, d_mode

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

◆ GRP10

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

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

◆ GRP11

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

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

◆ GRP12

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

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

◆ GRP13

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

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

◆ GRP14

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

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

◆ GRP1b

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

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

◆ GRP1S

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

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

◆ GRP1Ss

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

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

◆ GRP2b

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

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

◆ GRP2b_cl

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

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

◆ GRP2b_one

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

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

◆ GRP2S

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

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

◆ GRP2S_cl

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

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

◆ GRP2S_one

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

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

◆ GRP3b

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

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

◆ GRP3S

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

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

◆ GRP4

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

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

◆ GRP5

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

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

◆ GRP6

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

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

◆ GRP7

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

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

◆ GRP8

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

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

◆ GRP9

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

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

◆ GRPAMD

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

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

◆ GRPPADLCK

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

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

◆ gs

#define gs   OP_REG, gs_reg

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

◆ gs_reg

#define gs_reg   105

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

◆ Gv

#define Gv   OP_G, v_mode

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

◆ Gw

#define Gw   OP_G, w_mode

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

◆ Ib

#define Ib   OP_I, b_mode

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

◆ indir_dx_reg

#define indir_dx_reg   150

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

◆ indirDX

#define indirDX   OP_IMREG, indir_dx_reg

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

◆ indirEb

#define indirEb   OP_indirE, b_mode

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

◆ indirEv

#define indirEv   OP_indirE, v_mode

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

◆ INTERNAL_DISASSEMBLER_ERROR

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

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

◆ Iq

#define Iq   OP_I, q_mode

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

◆ Iv

#define Iv   OP_I, v_mode

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

◆ Iv64

#define Iv64   OP_I64, v_mode

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

◆ Iw

#define Iw   OP_I, w_mode

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

◆ Jb

#define Jb   OP_J, b_mode

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

◆ Jv

#define Jv   OP_J, v_mode

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

◆ loop_jcxz_flag

#define loop_jcxz_flag   NULL, loop_jcxz_mode

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

◆ loop_jcxz_mode

#define loop_jcxz_mode   9

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

◆ M

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

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

◆ m_mode

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

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

◆ Ma

#define Ma   OP_E, v_mode

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

◆ MAXLEN

#define MAXLEN   20

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

◆ MODRM_CHECK

#define MODRM_CHECK   if (!need_modrm) abort ()

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

◆ Mp

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

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

◆ MS

#define MS   OP_MS, v_mode

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

◆ MX

#define MX   OP_MMX, 0

Definition at line 448 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 431 of file i386-dis.c.

◆ Ob64

#define Ob64   OP_OFF64, b_mode

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

◆ OPSIMD

#define OPSIMD   OP_SIMD_Suffix, 0

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

◆ OPSUF

#define OPSUF   OP_3DNowSuffix, 0

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

◆ Ov

#define Ov   OP_OFF, v_mode

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

◆ Ov64

#define Ov64   OP_OFF64, v_mode

Definition at line 434 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 314 of file i386-dis.c.

◆ PREFIX_CS

#define PREFIX_CS   8

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

◆ PREFIX_DATA

#define PREFIX_DATA   0x200

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

◆ PREFIX_DS

#define PREFIX_DS   0x20

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

◆ PREFIX_ES

#define PREFIX_ES   0x40

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

◆ PREFIX_FS

#define PREFIX_FS   0x80

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

◆ PREFIX_FWAIT

#define PREFIX_FWAIT   0x800

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

◆ PREFIX_GS

#define PREFIX_GS   0x100

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

◆ PREFIX_LOCK

#define PREFIX_LOCK   4

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

◆ PREFIX_REPNZ

#define PREFIX_REPNZ   2

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

◆ PREFIX_REPZ

#define PREFIX_REPZ   1

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

◆ PREFIX_SS

#define PREFIX_SS   0x10

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

◆ PREGRP0

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

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

◆ PREGRP1

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

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

◆ PREGRP10

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

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

◆ PREGRP11

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

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

◆ PREGRP12

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

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

◆ PREGRP13

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

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

◆ PREGRP14

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

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

◆ PREGRP15

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

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

◆ PREGRP16

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

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

◆ PREGRP17

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

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

◆ PREGRP18

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

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

◆ PREGRP19

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

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

◆ PREGRP2

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

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

◆ PREGRP20

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

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

◆ PREGRP21

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

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

◆ PREGRP22

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

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

◆ PREGRP23

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

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

◆ PREGRP24

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

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

◆ PREGRP25

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

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

◆ PREGRP26

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

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

◆ PREGRP27

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

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

◆ PREGRP28

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

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

◆ PREGRP29

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

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

◆ PREGRP3

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

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

◆ PREGRP30

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

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

◆ PREGRP31

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

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

◆ PREGRP32

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

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

◆ PREGRP4

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

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

◆ PREGRP5

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

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

◆ PREGRP6

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

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

◆ PREGRP7

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

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

◆ PREGRP8

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

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

◆ PREGRP9

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

Definition at line 562 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 469 of file i386-dis.c.

◆ rAX_reg

#define rAX_reg   132

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

◆ rBP_reg

#define rBP_reg   137

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

◆ rBX_reg

#define rBX_reg   135

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

◆ rCX_reg

#define rCX_reg   133

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

◆ Rd

#define Rd   OP_Rd, d_mode

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

◆ rDI_reg

#define rDI_reg   139

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

◆ rDX_reg

#define rDX_reg   134

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

◆ REX_EXTX

#define REX_EXTX   4

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

◆ REX_EXTY

#define REX_EXTY   2

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

◆ REX_EXTZ

#define REX_EXTZ   1

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

◆ REX_MODE64

#define REX_MODE64   8

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

◆ Rm

#define Rm   OP_Rd, m_mode

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

◆ RMAH

#define RMAH   OP_REG, ah_reg

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

◆ RMAL [1/2]

#define RMAL   OP_REG, al_reg

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

◆ RMAL [2/2]

#define RMAL   OP_REG, al_reg

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

◆ RMAX

#define RMAX   OP_REG, ax_reg

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

◆ RMBH

#define RMBH   OP_REG, bh_reg

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

◆ RMBL

#define RMBL   OP_REG, bl_reg

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

◆ RMCH

#define RMCH   OP_REG, ch_reg

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

◆ RMCL

#define RMCL   OP_REG, cl_reg

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

◆ RMDH

#define RMDH   OP_REG, dh_reg

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

◆ RMDL

#define RMDL   OP_REG, dl_reg

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

◆ RMDX

#define RMDX   OP_REG, dx_reg

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

◆ RMeAX

#define RMeAX   OP_REG, eAX_reg

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

◆ RMeBP

#define RMeBP   OP_REG, eBP_reg

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

◆ RMeBX

#define RMeBX   OP_REG, eBX_reg

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

◆ RMeCX

#define RMeCX   OP_REG, eCX_reg

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

◆ RMeDI

#define RMeDI   OP_REG, eDI_reg

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

◆ RMeDX

#define RMeDX   OP_REG, eDX_reg

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

◆ RMeSI

#define RMeSI   OP_REG, eSI_reg

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

◆ RMeSP

#define RMeSP   OP_REG, eSP_reg

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

◆ RMrAX

#define RMrAX   OP_REG, rAX_reg

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

◆ RMrBP

#define RMrBP   OP_REG, rBP_reg

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

◆ RMrBX

#define RMrBX   OP_REG, rBX_reg

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

◆ RMrCX

#define RMrCX   OP_REG, rCX_reg

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

◆ RMrDI

#define RMrDI   OP_REG, rDI_reg

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

◆ RMrDX

#define RMrDX   OP_REG, rDX_reg

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

◆ RMrSI

#define RMrSI   OP_REG, rSI_reg

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

◆ RMrSP

#define RMrSP   OP_REG, rSP_reg

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

◆ rSI_reg

#define rSI_reg   138

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

◆ rSP_reg

#define rSP_reg   136

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

◆ si_reg

#define si_reg   130

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

◆ sIb

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

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

◆ sp_reg

#define sp_reg   128

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

◆ sprintf_vma

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

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

◆ ss

#define ss   OP_REG, ss_reg

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

◆ ss_reg

#define ss_reg   102

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

◆ ST

#define ST   OP_ST, 0

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

◆ STi

#define STi   OP_STi, 0

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

◆ SUFFIX_ALWAYS

#define SUFFIX_ALWAYS   4

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

◆ Sw

#define Sw   OP_SEG, w_mode

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

◆ Td

#define Td   OP_T, d_mode

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

◆ UNIXWARE_COMPAT

#define UNIXWARE_COMPAT   1

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

◆ USE_GROUPS

#define USE_GROUPS   2

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

◆ USE_PREFIX_USER_TABLE

#define USE_PREFIX_USER_TABLE   3

Definition at line 523 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; \
}
Definition: pdh_main.c:93
GLsizei const GLfloat * value
Definition: glext.h:6069
static int rex
Definition: i386-dis.c:280

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

◆ v_mode

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

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

◆ w_mode

#define w_mode   3 /* word operand */

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

◆ X86_64_0

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

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

◆ X86_64_SPECIAL

#define X86_64_SPECIAL   4

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

◆ x_mode

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

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

◆ Xb

#define Xb   OP_DSreg, eSI_reg

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

◆ XM

#define XM   OP_XMM, 0

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

◆ XS

#define XS   OP_XS, v_mode

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

◆ Xv

#define Xv   OP_DSreg, eSI_reg

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

◆ XX

#define XX   NULL, 0

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

◆ Yb

#define Yb   OP_ESreg, eDI_reg

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

◆ Yv

#define Yv   OP_ESreg, eDI_reg

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

Typedef Documentation

◆ bfd

typedef void* bfd

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

◆ bfd_arch

◆ 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 uintptr_t bfd_vma

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

◆ op_rtn

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

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

Enumeration Type Documentation

◆ bfd_architecture

Enumerator
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 

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

◆ bfd_flavour

Enumerator
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 3138 of file i386-dis.c.

3139 {
3140  if (prefixes & PREFIX_CS)
3141  {
3143  oappend (&"%cs:"[intel_syntax]);
3144  }
3145  if (prefixes & PREFIX_DS)
3146  {
3148  oappend (&"%ds:"[intel_syntax]);
3149  }
3150  if (prefixes & PREFIX_SS)
3151  {
3153  oappend (&"%ss:"[intel_syntax]);
3154  }
3155  if (prefixes & PREFIX_ES)
3156  {
3158  oappend (&"%es:"[intel_syntax]);
3159  }
3160  if (prefixes & PREFIX_FS)
3161  {
3163  oappend (&"%fs:"[intel_syntax]);
3164  }
3165  if (prefixes & PREFIX_GS)
3166  {
3168  oappend (&"%gs:"[intel_syntax]);
3169  }
3170 }
#define PREFIX_DS
Definition: i386-dis.c:309
static char intel_syntax
Definition: i386-dis.c:2053
static void oappend(const char *)
Definition: i386-dis.c:3131
#define PREFIX_CS
Definition: i386-dis.c:307
#define PREFIX_GS
Definition: i386-dis.c:312
#define PREFIX_SS
Definition: i386-dis.c:308
#define PREFIX_FS
Definition: i386-dis.c:311
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277

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

◆ BadOp()

static void BadOp ( void  )
static

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

4450 {
4451  /* Throw away prefixes and 1st. opcode byte. */
4452  codep = insn_codep + 1;
4453  oappend ("(bad)");
4454 }
static void oappend(const char *)
Definition: i386-dis.c:3131
static unsigned char * codep
Definition: i386-dis.c:1287
static unsigned char * insn_codep
Definition: i386-dis.c:1286

Referenced by OP_0f07(), OP_0fae(), OP_3DNowSuffix(), OP_M(), OP_MS(), OP_Rd(), OP_SIMD_Suffix(), and OP_XS().

◆ ckprefix()

static void ckprefix ( void  )
static

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

1871 {
1872  int newrex;
1873  rex = 0;
1874  prefixes = 0;
1875  used_prefixes = 0;
1876  rex_used = 0;
1877  while (1)
1878  {
1879  FETCH_DATA (the_info, codep + 1);
1880  newrex = 0;
1881  switch (*codep)
1882  {
1883  /* REX prefixes family. */
1884  case 0x40:
1885  case 0x41:
1886  case 0x42:
1887  case 0x43:
1888  case 0x44:
1889  case 0x45:
1890  case 0x46:
1891  case 0x47:
1892  case 0x48:
1893  case 0x49:
1894  case 0x4a:
1895  case 0x4b:
1896  case 0x4c:
1897  case 0x4d:
1898  case 0x4e:
1899  case 0x4f:
1900  if (mode_64bit)
1901  newrex = *codep;
1902  else
1903  return;
1904  break;
1905  case 0xf3:
1906  prefixes |= PREFIX_REPZ;
1907  break;
1908  case 0xf2:
1910  break;
1911  case 0xf0:
1912  prefixes |= PREFIX_LOCK;
1913  break;
1914  case 0x2e:
1915  prefixes |= PREFIX_CS;
1916  break;
1917  case 0x36:
1918  prefixes |= PREFIX_SS;
1919  break;
1920  case 0x3e:
1921  prefixes |= PREFIX_DS;
1922  break;
1923  case 0x26:
1924  prefixes |= PREFIX_ES;
1925  break;
1926  case 0x64:
1927  prefixes |= PREFIX_FS;
1928  break;
1929  case 0x65:
1930  prefixes |= PREFIX_GS;
1931  break;
1932  case 0x66:
1933  prefixes |= PREFIX_DATA;
1934  break;
1935  case 0x67:
1936  prefixes |= PREFIX_ADDR;
1937  break;
1938  case FWAIT_OPCODE:
1939  /* fwait is really an instruction. If there are prefixes
1940  before the fwait, they belong to the fwait, *not* to the
1941  following instruction. */
1942  if (prefixes)
1943  {
1945  codep++;
1946  return;
1947  }
1949  break;
1950  default:
1951  return;
1952  }
1953  /* Rex is ignored when followed by another prefix. */
1954  if (rex)
1955  {
1956  oappend (prefix_name (rex, 0));
1957  oappend (" ");
1958  }
1959  rex = newrex;
1960  codep++;
1961  }
1962 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
#define PREFIX_REPNZ
Definition: i386-dis.c:305
#define PREFIX_DS
Definition: i386-dis.c:309
static int mode_64bit
Definition: i386-dis.c:273
static void oappend(const char *)
Definition: i386-dis.c:3131
#define PREFIX_FWAIT
Definition: i386-dis.c:315
static unsigned char * codep
Definition: i386-dis.c:1287
#define PREFIX_LOCK
Definition: i386-dis.c:306
#define PREFIX_CS
Definition: i386-dis.c:307
static const char * prefix_name(int, int)
Definition: i386-dis.c:1968
#define PREFIX_GS
Definition: i386-dis.c:312
#define PREFIX_REPZ
Definition: i386-dis.c:304
#define PREFIX_ADDR
Definition: i386-dis.c:314
static int rex_used
Definition: i386-dis.c:282
#define PREFIX_SS
Definition: i386-dis.c:308
#define PREFIX_FS
Definition: i386-dis.c:311
#define FWAIT_OPCODE
Definition: i386-dis.c:267
static int rex
Definition: i386-dis.c:280
static disassemble_info * the_info
Definition: i386-dis.c:1288
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277

Referenced by print_insn().

◆ dofloat()

static void dofloat ( int  sizeflag)
static

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

2802 {
2803  const struct dis386 *dp;
2804  unsigned char floatop;
2805 
2806  floatop = codep[-1];
2807 
2808  if (mod != 3)
2809  {
2810  int fp_indx = (floatop - 0xd8) * 8 + reg;
2811 
2812  putop (float_mem[fp_indx], sizeflag);
2813  obufp = op1out;
2814  OP_E (float_mem_mode[fp_indx], sizeflag);
2815  return;
2816  }
2817  /* Skip mod/rm byte. */
2818  MODRM_CHECK;
2819  codep++;
2820 
2821  dp = &float_reg[floatop - 0xd8][reg];
2822  if (dp->name == NULL)
2823  {
2824  putop (fgrps[dp->bytemode1][rm], sizeflag);
2825 
2826  /* Instruction fnstsw is only one with strange arg. */
2827  if (floatop == 0xdf && codep[-1] == 0xe0)
2828  strcpy (op1out, names16[0]);
2829  }
2830  else
2831  {
2832  putop (dp->name, sizeflag);
2833 
2834  obufp = op1out;
2835  if (dp->op1)
2836  (*dp->op1) (dp->bytemode1, sizeflag);
2837  obufp = op2out;
2838  if (dp->op2)
2839  (*dp->op2) (dp->bytemode2, sizeflag);
2840  }
2841 }
static char op1out[100]
Definition: i386-dis.c:2037
static const unsigned char float_mem_mode[]
Definition: i386-dis.c:2559
int bytemode1
Definition: i386-dis.c:594
static const struct dis386 float_reg[][8]
Definition: i386-dis.c:2647
const char * name
Definition: i386-dis.c:592
static char * fgrps[][8]
Definition: i386-dis.c:2752
static int putop(const char *, int)
Definition: i386-dis.c:2858
#define MODRM_CHECK
Definition: i386-dis.c:1297
static unsigned char * codep
Definition: i386-dis.c:1287
static const char * float_mem[]
Definition: i386-dis.c:2484
static int reg
Definition: i386-dis.c:1291
static const char ** names16
Definition: i386-dis.c:1301
static void OP_E(int, int)
Definition: i386-dis.c:3238
#define NULL
Definition: types.h:112
int bytemode2
Definition: i386-dis.c:596
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static int rm
Definition: i386-dis.c:1290
op_rtn op1
Definition: i386-dis.c:593
static char * obufp
Definition: i386-dis.c:1283
static char op2out[100]
Definition: i386-dis.c:2037
static int mod
Definition: i386-dis.c:1289
op_rtn op2
Definition: i386-dis.c:595

Referenced by print_insn().

◆ fetch_data()

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

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

326 {
327  int status;
328  struct dis_private *priv = (struct dis_private *) info->private_data;
329  bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
330 
331  status = (*info->read_memory_func) (start,
332  priv->max_fetched,
333  addr - priv->max_fetched,
334  info);
335  if (status != 0)
336  {
337  /* If we did manage to read at least one byte, then
338  print_insn_i386 will do something sensible. Otherwise, print
339  an error. We do that here because this is where we know
340  STATUS. */
341  if (priv->max_fetched == priv->the_buffer)
342  (*info->memory_error_func) (status, start, info);
343  longjmp (priv->bailout, 1);
344  }
345  else
346  priv->max_fetched = addr;
347  return 1;
348 }
jmp_buf bailout
Definition: i386-dis.c:262
bfd_byte * max_fetched
Definition: i386-dis.c:258
bfd_vma insn_start
Definition: i386-dis.c:260
bfd_byte the_buffer[MAXLEN]
Definition: i386-dis.c:259
uintptr_t bfd_vma
Definition: i386-dis.c:25
GLenum const GLvoid * addr
Definition: glext.h:9621
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 3614 of file i386-dis.c.

3615 {
3616  int x = 0;
3617 
3618  FETCH_DATA (the_info, codep + 2);
3619  x = *codep++ & 0xff;
3620  x |= (*codep++ & 0xff) << 8;
3621  return x;
3622 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static unsigned char * codep
Definition: i386-dis.c:1287
static disassemble_info * the_info
Definition: i386-dis.c:1288

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 3585 of file i386-dis.c.

3586 {
3587  bfd_signed_vma x = 0;
3588 
3589  FETCH_DATA (the_info, codep + 4);
3590  x = *codep++ & (bfd_signed_vma) 0xff;
3591  x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
3592  x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
3593  x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
3594  return x;
3595 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
intptr_t bfd_signed_vma
Definition: i386-dis.c:29
static unsigned char * codep
Definition: i386-dis.c:1287
static disassemble_info * the_info
Definition: i386-dis.c:1288

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

◆ get32s()

static bfd_signed_vma get32s ( void  )
static

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

3599 {
3600  bfd_signed_vma x = 0;
3601 
3602  FETCH_DATA (the_info, codep + 4);
3603  x = *codep++ & (bfd_signed_vma) 0xff;
3604  x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
3605  x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
3606  x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
3607 
3608  x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
3609 
3610  return x;
3611 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
intptr_t bfd_signed_vma
Definition: i386-dis.c:29
static unsigned char * codep
Definition: i386-dis.c:1287
static disassemble_info * the_info
Definition: i386-dis.c:1288

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

◆ get64()

static bfd_vma get64 ( void  )
static

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

3561 {
3562  bfd_vma x;
3563 #ifdef BFD64
3564  unsigned int a;
3565  unsigned int b;
3566 
3567  FETCH_DATA (the_info, codep + 8);
3568  a = *codep++ & 0xff;
3569  a |= (*codep++ & 0xff) << 8;
3570  a |= (*codep++ & 0xff) << 16;
3571  a |= (*codep++ & 0xff) << 24;
3572  b = *codep++ & 0xff;
3573  b |= (*codep++ & 0xff) << 8;
3574  b |= (*codep++ & 0xff) << 16;
3575  b |= (*codep++ & 0xff) << 24;
3576  x = a + ((bfd_vma) b << 32);
3577 #else
3578  abort ();
3579  x = 0;
3580 #endif
3581  return x;
3582 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define a
Definition: ke_i.h:78
static unsigned char * codep
Definition: i386-dis.c:1287
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
uintptr_t bfd_vma
Definition: i386-dis.c:25
#define abort()
Definition: i386-dis.c:35
static disassemble_info * the_info
Definition: i386-dis.c:1288
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Referenced by OP_I64(), and OP_OFF64().

◆ INVLPG_Fixup()

static void INVLPG_Fixup ( int  bytemode,
int  sizeflag 
)
static

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

4435 {
4436  if (*codep == 0xf8)
4437  {
4438  char *p = obuf + strlen (obuf);
4439 
4440  /* Override "invlpg". */
4441  strcpy (p - 6, "swapgs");
4442  codep++;
4443  }
4444  else
4445  OP_E (bytemode, sizeflag);
4446 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static unsigned char * codep
Definition: i386-dis.c:1287
static char obuf[100]
Definition: i386-dis.c:1282
static void OP_E(int, int)
Definition: i386-dis.c:3238
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
GLfloat GLfloat p
Definition: glext.h:8902

◆ KdbpDisassemble()

LONG KdbpDisassemble ( IN ULONG_PTR  Address,
IN ULONG  IntelSyntax 
)

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

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

Referenced by KdbpCliMainLoop(), and KdbpCmdDisassembleX().

◆ KdbpGetInstLength()

LONG KdbpGetInstLength ( IN ULONG_PTR  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 #ifdef _M_AMD64
105  info.mach = bfd_mach_x86_64;
106 #else
107  info.mach = bfd_mach_i386_i386;
108 #endif
109  info.insn_sets = 0;
110  info.flags = 0;
111  info.read_memory_func = KdbpReadMemory;
112  info.memory_error_func = KdbpMemoryError;
113  info.print_address_func = KdbpNopPrintAddress;
114  info.symbol_at_address_func = NULL;
115  info.buffer = NULL;
116  info.buffer_vma = info.buffer_length = 0;
117  info.bytes_per_chunk = 0;
118  info.display_endian = BIG_ENDIAN_LITTLE;
119  info.disassembler_options = NULL;
120 
121  return(print_insn_i386(Address, &info));
122 }
static void KdbpNopPrintAddress(uintptr_t Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:88
#define bfd_mach_i386_i386
Definition: i386-dis.c:33
static void KdbpMemoryError(int Status, uintptr_t Addr, struct disassemble_info *Ignored)
Definition: i386-dis.c:73
static struct _test_info info[]
Definition: SetCursorPos.c:19
static WCHAR Address[46]
Definition: ping.c:68
int print_insn_i386(bfd_vma pc, struct disassemble_info *info)
Definition: i386-dis.c:2079
#define bfd_mach_x86_64
Definition: i386-dis.c:31
#define NULL
Definition: types.h:112
static int KdbpReadMemory(uintptr_t Addr, unsigned char *Data, unsigned int Length, struct disassemble_info *Ignored)
Definition: i386-dis.c:66
int KdbpNopPrintDisasm(void *Ignored, const char *fmt,...)
Definition: i386-dis.c:60

Referenced by KdbpStepOverInstruction().

◆ KdbpMemoryError()

static void KdbpMemoryError ( int  Status,
uintptr_t  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 ( uintptr_t  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 }

Referenced by KdbpGetInstLength().

◆ KdbpPrintAddressInCode()

static void KdbpPrintAddressInCode ( uintptr_t  Addr,
struct disassemble_info Ignored 
)
static

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

80 {
81  if (!KdbSymPrintAddress((void*)Addr, NULL))
82  {
83  KdpDprintf("<%08x>", Addr);
84  }
85 }
BOOLEAN KdbSymPrintAddress(IN PVOID Address, IN PCONTEXT Context)
Print address...
Definition: kdb_symbols.c:148
#define NULL
Definition: types.h:112
#define KdpDprintf(...)
Definition: mmdbg.c:19

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  KdpDprintf("%s", buffer);
55  va_end(ap);
56  return(ret);
57 }
GLuint buffer
Definition: glext.h:5915
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
va_start(ap, x)
int ret
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943
#define KdpDprintf(...)
Definition: mmdbg.c:19

Referenced by KdbpDisassemble().

◆ KdbpReadMemory()

static int KdbpReadMemory ( uintptr_t  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:1690

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 4234 of file i386-dis.c.

4235 {
4236  /* NOP with REPZ prefix is called PAUSE. */
4237  if (prefixes == PREFIX_REPZ)
4238  strcpy (obuf, "pause");
4239 }
#define PREFIX_REPZ
Definition: i386-dis.c:304
static char obuf[100]
Definition: i386-dis.c:1282
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static int prefixes
Definition: i386-dis.c:277

◆ oappend()

static void oappend ( const char s)
static

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

3132 {
3133  strcpy (obufp, s);
3134  obufp += strlen (s);
3135 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static char * obufp
Definition: i386-dis.c:1283

Referenced by append_seg(), BadOp(), ckprefix(), OP_3DNowSuffix(), OP_C(), OP_D(), OP_DIR(), OP_E(), OP_EM(), OP_ESreg(), OP_EX(), OP_G(), OP_I(), OP_I64(), OP_IMREG(), OP_indirE(), OP_J(), OP_MMX(), OP_OFF(), OP_OFF64(), OP_REG(), OP_SEG(), OP_sI(), OP_SIMD_Suffix(), OP_ST(), OP_STi(), OP_T(), OP_XMM(), print_insn(), and ptr_reg().

◆ OP_0f07()

static void OP_0f07 ( int  bytemode,
int  sizeflag 
)
static

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

4203 {
4204  if (mod != 3 || rm != 0)
4205  BadOp ();
4206  else
4207  OP_E (bytemode, sizeflag);
4208 }
static void BadOp(void)
Definition: i386-dis.c:4449
static void OP_E(int, int)
Definition: i386-dis.c:3238
static int rm
Definition: i386-dis.c:1290
static int mod
Definition: i386-dis.c:1289

◆ OP_0fae()

static void OP_0fae ( int  bytemode,
int  sizeflag 
)
static

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

4212 {
4213  if (mod == 3)
4214  {
4215  if (reg == 7)
4216  strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence");
4217 
4218  if (reg < 5 || rm != 0)
4219  {
4220  BadOp (); /* bad sfence, mfence, or lfence */
4221  return;
4222  }
4223  }
4224  else if (reg != 7)
4225  {
4226  BadOp (); /* bad clflush */
4227  return;
4228  }
4229 
4230  OP_E (bytemode, sizeflag);
4231 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void BadOp(void)
Definition: i386-dis.c:4449
static int reg
Definition: i386-dis.c:1291
static char obuf[100]
Definition: i386-dis.c:1282
static void OP_E(int, int)
Definition: i386-dis.c:3238
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static int rm
Definition: i386-dis.c:1290
static int mod
Definition: i386-dis.c:1289

◆ 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 4309 of file i386-dis.c.

4310 {
4311  const char *mnemonic;
4312 
4313  FETCH_DATA (the_info, codep + 1);
4314  /* AMD 3DNow! instructions are specified by an opcode suffix in the
4315  place where an 8-bit immediate would normally go. ie. the last
4316  byte of the instruction. */
4317  obufp = obuf + strlen (obuf);
4318  mnemonic = Suffix3DNow[*codep++ & 0xff];
4319  if (mnemonic)
4320  oappend (mnemonic);
4321  else
4322  {
4323  /* Since a variable sized modrm/sib chunk is between the start
4324  of the opcode (0x0f0f) and the opcode suffix, we need to do
4325  all the modrm processing first, and don't know until now that
4326  we have a bad opcode. This necessitates some cleaning up. */
4327  op1out[0] = '\0';
4328  op2out[0] = '\0';
4329  BadOp ();
4330  }
4331 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
static char op1out[100]
Definition: i386-dis.c:2037
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void BadOp(void)
Definition: i386-dis.c:4449
static const char *const Suffix3DNow[]
Definition: i386-dis.c:4241
static void oappend(const char *)
Definition: i386-dis.c:3131
static unsigned char * codep
Definition: i386-dis.c:1287
static char obuf[100]
Definition: i386-dis.c:1282
static disassemble_info * the_info
Definition: i386-dis.c:1288
static char * obufp
Definition: i386-dis.c:1283
static char op2out[100]
Definition: i386-dis.c:2037

◆ 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 4064 of file i386-dis.c.

4065 {
4066  int add = 0;
4067  USED_REX (REX_EXTX);
4068  if (rex & REX_EXTX)
4069  add = 8;
4070  sprintf (scratchbuf, "%%cr%d", reg + add);
4072 }
static char intel_syntax
Definition: i386-dis.c:2053
#define REX_EXTX
Definition: i386-dis.c:284
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define USED_REX(value)
Definition: i386-dis.c:291
static int reg
Definition: i386-dis.c:1291
static int rex
Definition: i386-dis.c:280
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

◆ 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 4075 of file i386-dis.c.

4076 {
4077  int add = 0;
4078  USED_REX (REX_EXTX);
4079  if (rex & REX_EXTX)
4080  add = 8;
4081  if (intel_syntax)
4082  sprintf (scratchbuf, "db%d", reg + add);
4083  else
4084  sprintf (scratchbuf, "%%db%d", reg + add);
4085  oappend (scratchbuf);
4086 }
static char intel_syntax
Definition: i386-dis.c:2053
#define REX_EXTX
Definition: i386-dis.c:284
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define USED_REX(value)
Definition: i386-dis.c:291
static int reg
Definition: i386-dis.c:1291
static int rex
Definition: i386-dis.c:280
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

◆ 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 3943 of file i386-dis.c.

3944 {
3945  int seg, offset;
3946 
3947  if (sizeflag & DFLAG)
3948  {
3949  offset = get32 ();
3950  seg = get16 ();
3951  }
3952  else
3953  {
3954  offset = get16 ();
3955  seg = get16 ();
3956  }
3958  if (intel_syntax)
3959  sprintf (scratchbuf, "0x%x,0x%x", seg, offset);
3960  else
3961  sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
3962  oappend (scratchbuf);
3963 }
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3585
static char intel_syntax
Definition: i386-dis.c:2053
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define DFLAG
Definition: i386-dis.c:463
GLintptr offset
Definition: glext.h:5920
static int get16(void)
Definition: i386-dis.c:3614
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int prefixes
Definition: i386-dis.c:277
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

◆ OP_DSreg()

static void OP_DSreg ( int  code,
int  sizeflag 
)
static

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

4050 {
4051  if ((prefixes
4052  & (PREFIX_CS
4053  | PREFIX_DS
4054  | PREFIX_SS
4055  | PREFIX_ES
4056  | PREFIX_FS
4057  | PREFIX_GS)) == 0)
4058  prefixes |= PREFIX_DS;
4059  append_seg ();
4060  ptr_reg (code, sizeflag);
4061 }
#define PREFIX_DS
Definition: i386-dis.c:309
static void append_seg(void)
Definition: i386-dis.c:3138
static void ptr_reg(int, int)
Definition: i386-dis.c:4019
#define PREFIX_CS
Definition: i386-dis.c:307
#define PREFIX_GS
Definition: i386-dis.c:312
#define PREFIX_SS
Definition: i386-dis.c:308
#define PREFIX_FS
Definition: i386-dis.c:311
Definition: inflate.c:139
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277

◆ OP_E()

static void OP_E ( int  bytemode,
int  sizeflag 
)
static

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

3239 {
3240  bfd_vma disp;
3241  int add = 0;
3242  int riprel = 0;
3243  USED_REX (REX_EXTZ);
3244  if (rex & REX_EXTZ)
3245  add += 8;
3246 
3247  /* Skip mod/rm byte. */
3248  MODRM_CHECK;
3249  codep++;
3250 
3251  if (mod == 3)
3252  {
3253  switch (bytemode)
3254  {
3255  case b_mode:
3256  USED_REX (0);
3257  if (rex)
3258  oappend (names8rex[rm + add]);
3259  else
3260  oappend (names8[rm + add]);
3261  break;
3262  case w_mode:
3263  oappend (names16[rm + add]);
3264  break;
3265  case d_mode:
3266  oappend (names32[rm + add]);
3267  break;
3268  case q_mode:
3269  oappend (names64[rm + add]);
3270  break;
3271  case m_mode:
3272  if (mode_64bit)
3273  oappend (names64[rm + add]);
3274  else
3275  oappend (names32[rm + add]);
3276  break;
3277  case v_mode:
3278  case dq_mode:
3279  USED_REX (REX_MODE64);
3280  if (rex & REX_MODE64)
3281  oappend (names64[rm + add]);
3282  else if ((sizeflag & DFLAG) || bytemode == dq_mode)
3283  oappend (names32[rm + add]);
3284  else
3285  oappend (names16[rm + add]);
3287  break;
3288  case 0:
3289  break;
3290  default:
3292  break;
3293  }
3294  return;
3295  }
3296 
3297  disp = 0;
3298  append_seg ();
3299 
3300  if ((sizeflag & AFLAG) || mode_64bit) /* 32 bit address mode */
3301  {
3302  int havesib;
3303  int havebase;
3304  int base;
3305  int index = 0;
3306  int scale = 0;
3307 
3308  havesib = 0;
3309  havebase = 1;
3310  base = rm;
3311 
3312  if (base == 4)
3313  {
3314  havesib = 1;
3315  FETCH_DATA (the_info, codep + 1);
3316  scale = (*codep >> 6) & 3;
3317  index = (*codep >> 3) & 7;
3318  base = *codep & 7;
3319  USED_REX (REX_EXTY);
3320  USED_REX (REX_EXTZ);
3321  if (rex & REX_EXTY)
3322  index += 8;
3323  if (rex & REX_EXTZ)
3324  base += 8;
3325  codep++;
3326  }
3327 
3328  switch (mod)
3329  {
3330  case 0:
3331  if ((base & 7) == 5)
3332  {
3333  havebase = 0;
3334  if (mode_64bit && !havesib && (sizeflag & AFLAG))
3335  riprel = 1;
3336  disp = get32s ();
3337  }
3338  break;
3339  case 1:
3340  FETCH_DATA (the_info, codep + 1);
3341  disp = *codep++;
3342  if ((disp & 0x80) != 0)
3343  disp -= 0x100;
3344  break;
3345  case 2:
3346  disp = get32s ();
3347  break;
3348  }
3349 
3350  if (!intel_syntax)
3351  if (mod != 0 || (base & 7) == 5)
3352  {
3353  print_operand_value (scratchbuf, !riprel, disp);
3354  oappend (scratchbuf);
3355  if (riprel)
3356  {
3357  set_op (disp, 1);
3358  oappend ("(%rip)");
3359  }
3360  }
3361 
3362  if (havebase || (havesib && (index != 4 || scale != 0)))
3363  {
3364  if (intel_syntax)
3365  {
3366  switch (bytemode)
3367  {
3368  case b_mode:
3369  oappend ("BYTE PTR ");
3370  break;
3371  case w_mode:
3372  oappend ("WORD PTR ");
3373  break;
3374  case v_mode:
3375  if (sizeflag & DFLAG)
3376  oappend ("DWORD PTR ");
3377  else
3378  oappend ("WORD PTR ");
3379  break;
3380  case d_mode:
3381  oappend ("DWORD PTR ");
3382  break;
3383  case q_mode:
3384  oappend ("QWORD PTR ");
3385  break;
3386  case m_mode:
3387  if (mode_64bit)
3388  oappend ("DWORD PTR ");
3389  else
3390  oappend ("QWORD PTR ");
3391  break;
3392  case x_mode:
3393  oappend ("XWORD PTR ");
3394  break;
3395  default:
3396  break;
3397  }
3398  }
3399  *obufp++ = open_char;
3400  if (intel_syntax && riprel)
3401  oappend ("rip + ");
3402  *obufp = '\0';
3403  USED_REX (REX_EXTZ);
3404  if (!havesib && (rex & REX_EXTZ))
3405  base += 8;
3406  if (havebase)
3407  oappend (mode_64bit && (sizeflag & AFLAG)
3408  ? names64[base] : names32[base]);
3409  if (havesib)
3410  {
3411  if (index != 4)
3412  {
3413  if (intel_syntax)
3414  {
3415  if (havebase)
3416  {
3417  *obufp++ = separator_char;
3418  *obufp = '\0';
3419  }
3420  sprintf (scratchbuf, "%s",
3421  mode_64bit && (sizeflag & AFLAG)
3422  ? names64[index] : names32[index]);
3423  }
3424  else
3425  sprintf (scratchbuf, ",%s",
3426  mode_64bit && (sizeflag & AFLAG)
3427  ? names64[index] : names32[index]);
3428  oappend (scratchbuf);
3429  }
3430  if (scale != 0 || (!intel_syntax && index != 4))
3431  {
3432  *obufp++ = scale_char;
3433  *obufp = '\0';
3434  sprintf (scratchbuf, "%d", 1 << scale);
3435  oappend (scratchbuf);
3436  }
3437  }
3438  if (intel_syntax)
3439  if (mod != 0 || (base & 7) == 5)
3440  {
3441  /* Don't print zero displacements. */
3442  if (disp != 0)
3443  {
3444  if ((bfd_signed_vma) disp > 0)
3445  {
3446  *obufp++ = '+';
3447  *obufp = '\0';
3448  }
3449 
3450  print_operand_value (scratchbuf, 0, disp);
3451  oappend (scratchbuf);
3452  }
3453  }
3454 
3455  *obufp++ = close_char;
3456  *obufp = '\0';
3457  }
3458  else if (intel_syntax)
3459  {
3460  if (mod != 0 || (base & 7) == 5)
3461  {
3463  | PREFIX_ES | PREFIX_FS | PREFIX_GS))
3464  ;
3465  else
3466  {
3468  oappend (":");
3469  }
3470  print_operand_value (scratchbuf, 1, disp);
3471  oappend (scratchbuf);
3472  }
3473  }
3474  }
3475  else
3476  { /* 16 bit address mode */
3477  switch (mod)
3478  {
3479  case 0:
3480  if ((rm & 7) == 6)
3481  {
3482  disp = get16 ();
3483  if ((disp & 0x8000) != 0)
3484  disp -= 0x10000;
3485  }
3486  break;
3487  case 1:
3488  FETCH_DATA (the_info, codep + 1);
3489  disp = *codep++;
3490  if ((disp & 0x80) != 0)
3491  disp -= 0x100;
3492  break;
3493  case 2:
3494  disp = get16 ();
3495  if ((disp & 0x8000) != 0)
3496  disp -= 0x10000;
3497  break;
3498  }
3499 
3500  if (!intel_syntax)
3501  if (mod != 0 || (rm & 7) == 6)
3502  {
3503  print_operand_value (scratchbuf, 0, disp);
3504  oappend (scratchbuf);
3505  }
3506 
3507  if (mod != 0 || (rm & 7) != 6)
3508  {
3509  *obufp++ = open_char;
3510  *obufp = '\0';
3511  oappend (index16[rm + add]);
3512  *obufp++ = close_char;
3513  *obufp = '\0';
3514  }
3515  }
3516 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
static const char ** index16
Definition: i386-dis.c:1305
static char open_char
Definition: i386-dis.c:2054
#define PREFIX_DS
Definition: i386-dis.c:309
static char intel_syntax
Definition: i386-dis.c:2053
#define q_mode
Definition: i386-dis.c:469
#define d_mode
Definition: i386-dis.c:468
static int mode_64bit
Definition: i386-dis.c:273
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
static void append_seg(void)
Definition: i386-dis.c:3138
static char scratchbuf[100]
Definition: i386-dis.c:1284
static char scale_char
Definition: i386-dis.c:2057
intptr_t bfd_signed_vma
Definition: i386-dis.c:29
static void oappend(const char *)
Definition: i386-dis.c:3131
#define es_reg
Definition: i386-dis.c:476
#define b_mode
Definition: i386-dis.c:465
static const char ** names32
Definition: i386-dis.c:1300
static const char ** names8
Definition: i386-dis.c:1302
GLuint base
Definition: 3dtext.c:35
#define ds_reg
Definition: i386-dis.c:479
#define MODRM_CHECK
Definition: i386-dis.c:1297
static const char ** names_seg
Definition: i386-dis.c:1304
static unsigned char * codep
Definition: i386-dis.c:1287
GLuint index
Definition: glext.h:6031
#define DFLAG
Definition: i386-dis.c:463
#define PREFIX_CS
Definition: i386-dis.c:307
#define USED_REX(value)
Definition: i386-dis.c:291
uintptr_t bfd_vma
Definition: i386-dis.c:25
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3598
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
#define REX_EXTZ
Definition: i386-dis.c:286
#define PREFIX_GS
Definition: i386-dis.c:312
static const char ** names64
Definition: i386-dis.c:1299
#define AFLAG
Definition: i386-dis.c:462
#define PREFIX_SS
Definition: i386-dis.c:308
static const char ** names16
Definition: i386-dis.c:1301
#define PREFIX_FS
Definition: i386-dis.c:311
static char close_char
Definition: i386-dis.c:2055
static int get16(void)
Definition: i386-dis.c:3614
static int rex
Definition: i386-dis.c:280
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
#define REX_EXTY
Definition: i386-dis.c:285
static disassemble_info * the_info
Definition: i386-dis.c:1288
#define dq_mode
Definition: i386-dis.c:474
#define w_mode
Definition: i386-dis.c:467
static int used_prefixes
Definition: i386-dis.c:301
static char separator_char
Definition: i386-dis.c:2056
#define x_mode
Definition: i386-dis.c:470
#define PREFIX_DATA
Definition: i386-dis.c:313
static int rm
Definition: i386-dis.c:1290
#define m_mode
Definition: i386-dis.c:471
static char * obufp
Definition: i386-dis.c:1283
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277
#define v_mode
Definition: i386-dis.c:466
static void set_op(bfd_vma, int)
Definition: i386-dis.c:3625
static const char ** names8rex
Definition: i386-dis.c:1303
static int mod
Definition: i386-dis.c:1289
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768
#define REX_MODE64
Definition: i386-dis.c:283

Referenced by dofloat(), 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 4131 of file i386-dis.c.

4132 {
4133  int add = 0;
4134  if (mod != 3)
4135  {
4136  OP_E (bytemode, sizeflag);
4137  return;
4138  }
4139  USED_REX (REX_EXTZ);
4140  if (rex & REX_EXTZ)
4141  add = 8;
4142 
4143  /* Skip mod/rm byte. */
4144  MODRM_CHECK;
4145  codep++;
4147  if (prefixes & PREFIX_DATA)
4148  sprintf (scratchbuf, "%%xmm%d", rm + add);
4149  else
4150  sprintf (scratchbuf, "%%mm%d", rm + add);
4152 }
static char intel_syntax
Definition: i386-dis.c:2053
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define MODRM_CHECK
Definition: i386-dis.c:1297
static unsigned char * codep
Definition: i386-dis.c:1287
#define USED_REX(value)
Definition: i386-dis.c:291
#define REX_EXTZ
Definition: i386-dis.c:286
static int rex
Definition: i386-dis.c:280
static void OP_E(int, int)
Definition: i386-dis.c:3238
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int rm
Definition: i386-dis.c:1290
static int prefixes
Definition: i386-dis.c:277
static int mod
Definition: i386-dis.c:1289
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

Referenced by OP_MS().

◆ OP_ESreg()

static void OP_ESreg ( int  code,
int  sizeflag 
)
static

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

4043 {
4044  oappend (&"%es:"[intel_syntax]);
4045  ptr_reg (code, sizeflag);
4046 }
static char intel_syntax
Definition: i386-dis.c:2053
static void ptr_reg(int, int)
Definition: i386-dis.c:4019
static void oappend(const char *)
Definition: i386-dis.c:3131
Definition: inflate.c:139

◆ OP_EX()

static void OP_EX ( int  bytemode,
int  sizeflag 
)
static

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

4156 {
4157  int add = 0;
4158  if (mod != 3)
4159  {
4160  OP_E (bytemode, sizeflag);
4161  return;
4162  }
4163  USED_REX (REX_EXTZ);
4164  if (rex & REX_EXTZ)
4165  add = 8;
4166 
4167  /* Skip mod/rm byte. */
4168  MODRM_CHECK;
4169  codep++;
4170  sprintf (scratchbuf, "%%xmm%d", rm + add);
4172 }
static char intel_syntax
Definition: i386-dis.c:2053
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define MODRM_CHECK
Definition: i386-dis.c:1297
static unsigned char * codep
Definition: i386-dis.c:1287
#define USED_REX(value)
Definition: i386-dis.c:291
#define REX_EXTZ
Definition: i386-dis.c:286
static int rex
Definition: i386-dis.c:280
static void OP_E(int, int)
Definition: i386-dis.c:3238
static int rm
Definition: i386-dis.c:1290
static int mod
Definition: i386-dis.c:1289
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

Referenced by OP_XS().

◆ OP_G()

static void OP_G ( int  bytemode,
int  sizeflag 
)
static

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

3520 {
3521  int add = 0;
3522  USED_REX (REX_EXTX);
3523  if (rex & REX_EXTX)
3524  add += 8;
3525  switch (bytemode)
3526  {
3527  case b_mode:
3528  USED_REX (0);
3529  if (rex)
3530  oappend (names8rex[reg + add]);
3531  else
3532  oappend (names8[reg + add]);
3533  break;
3534  case w_mode:
3535  oappend (names16[reg + add]);
3536  break;
3537  case d_mode:
3538  oappend (names32[reg + add]);
3539  break;
3540  case q_mode:
3541  oappend (names64[reg + add]);
3542  break;
3543  case v_mode:
3544  USED_REX (REX_MODE64);
3545  if (rex & REX_MODE64)
3546  oappend (names64[reg + add]);
3547  else if (sizeflag & DFLAG)
3548  oappend (names32[reg + add]);
3549  else
3550  oappend (names16[reg + add]);
3552  break;
3553  default:
3555  break;
3556  }
3557 }
#define q_mode
Definition: i386-dis.c:469
#define d_mode
Definition: i386-dis.c:468
#define REX_EXTX
Definition: i386-dis.c:284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define b_mode
Definition: i386-dis.c:465
static const char ** names32
Definition: i386-dis.c:1300
static const char ** names8
Definition: i386-dis.c:1302
#define DFLAG
Definition: i386-dis.c:463
#define USED_REX(value)
Definition: i386-dis.c:291
static const char ** names64
Definition: i386-dis.c:1299
static int reg
Definition: i386-dis.c:1291
static const char ** names16
Definition: i386-dis.c:1301
static int rex
Definition: i386-dis.c:280
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
#define w_mode
Definition: i386-dis.c:467
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int prefixes
Definition: i386-dis.c:277
#define v_mode
Definition: i386-dis.c:466
static const char ** names8rex
Definition: i386-dis.c:1303
#define REX_MODE64
Definition: i386-dis.c:283

◆ OP_I()

static void OP_I ( int  bytemode,
int  sizeflag 
)
static

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

3750 {
3752  bfd_signed_vma mask = -1;
3753 
3754  switch (bytemode)
3755  {
3756  case b_mode:
3757  FETCH_DATA (the_info, codep + 1);
3758  op = *codep++;
3759  mask = 0xff;
3760  break;
3761  case q_mode:
3762  if (mode_64bit)
3763  {
3764  op = get32s ();
3765  break;
3766  }
3767  /* Fall through. */
3768  case v_mode:
3769  USED_REX (REX_MODE64);
3770  if (rex & REX_MODE64)
3771  op = get32s ();
3772  else if (sizeflag & DFLAG)
3773  {
3774  op = get32 ();
3775  mask = 0xffffffff;
3776  }
3777  else
3778  {
3779  op = get16 ();
3780  mask = 0xfffff;
3781  }
3783  break;
3784  case w_mode:
3785  mask = 0xfffff;
3786  op = get16 ();
3787  break;
3788  default:
3790  return;
3791  }
3792 
3793  op &= mask;
3794  scratchbuf[0] = '$';
3795  print_operand_value (scratchbuf + 1, 1, op);
3797  scratchbuf[0] = '\0';
3798 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3585
static char intel_syntax
Definition: i386-dis.c:2053
#define q_mode
Definition: i386-dis.c:469
static int mode_64bit
Definition: i386-dis.c:273
static char scratchbuf[100]
Definition: i386-dis.c:1284
intptr_t bfd_signed_vma
Definition: i386-dis.c:29
static void oappend(const char *)
Definition: i386-dis.c:3131
#define b_mode
Definition: i386-dis.c:465
GLenum GLint GLuint mask
Definition: glext.h:6028
static unsigned char * codep
Definition: i386-dis.c:1287
#define DFLAG
Definition: i386-dis.c:463
#define USED_REX(value)
Definition: i386-dis.c:291
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3598
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
UINT op
Definition: effect.c:236
static int get16(void)
Definition: i386-dis.c:3614
static int rex
Definition: i386-dis.c:280
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
static disassemble_info * the_info
Definition: i386-dis.c:1288
#define w_mode
Definition: i386-dis.c:467
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int prefixes
Definition: i386-dis.c:277
#define v_mode
Definition: i386-dis.c:466
#define REX_MODE64
Definition: i386-dis.c:283

Referenced by OP_I64().

◆ OP_I64()

static void OP_I64 ( int  bytemode,
int  sizeflag 
)
static

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

3802 {
3804  bfd_signed_vma mask = -1;
3805 
3806  if (!mode_64bit)
3807  {
3808  OP_I (bytemode, sizeflag);
3809  return;
3810  }
3811 
3812  switch (bytemode)
3813  {
3814  case b_mode:
3815  FETCH_DATA (the_info, codep + 1);
3816  op = *codep++;
3817  mask = 0xff;
3818  break;
3819  case v_mode:
3820  USED_REX (REX_MODE64);
3821  if (rex & REX_MODE64)
3822  op = get64 ();
3823  else if (sizeflag & DFLAG)
3824  {
3825  op = get32 ();
3826  mask = 0xffffffff;
3827  }
3828  else
3829  {
3830  op = get16 ();
3831  mask = 0xfffff;
3832  }
3834  break;
3835  case w_mode:
3836  mask = 0xfffff;
3837  op = get16 ();
3838  break;
3839  default:
3841  return;
3842  }
3843 
3844  op &= mask;
3845  scratchbuf[0] = '$';
3846  print_operand_value (scratchbuf + 1, 1, op);
3848  scratchbuf[0] = '\0';
3849 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3585
static char intel_syntax
Definition: i386-dis.c:2053
static int mode_64bit
Definition: i386-dis.c:273
static char scratchbuf[100]
Definition: i386-dis.c:1284
intptr_t bfd_signed_vma
Definition: i386-dis.c:29
static void oappend(const char *)
Definition: i386-dis.c:3131
#define b_mode
Definition: i386-dis.c:465
GLenum GLint GLuint mask
Definition: glext.h:6028
static bfd_vma get64(void)
Definition: i386-dis.c:3560
static unsigned char * codep
Definition: i386-dis.c:1287
#define DFLAG
Definition: i386-dis.c:463
#define USED_REX(value)
Definition: i386-dis.c:291
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
UINT op
Definition: effect.c:236
static int get16(void)
Definition: i386-dis.c:3614
static int rex
Definition: i386-dis.c:280
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
static disassemble_info * the_info
Definition: i386-dis.c:1288
#define w_mode
Definition: i386-dis.c:467
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int prefixes
Definition: i386-dis.c:277
#define v_mode
Definition: i386-dis.c:466
static void OP_I(int, int)
Definition: i386-dis.c:3749
#define REX_MODE64
Definition: i386-dis.c:283

◆ OP_IMREG()

static void OP_IMREG ( int  code,
int  sizeflag 
)
static

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

3703 {
3704  const char *s;
3705 
3706  switch (code)
3707  {
3708  case indir_dx_reg:
3709  if (intel_syntax)
3710  s = "[dx]";
3711  else
3712  s = "(%dx)";
3713  break;
3714  case ax_reg: case cx_reg: case dx_reg: case bx_reg:
3715  case sp_reg: case bp_reg: case si_reg: case di_reg:
3716  s = names16[code - ax_reg];
3717  break;
3718  case es_reg: case ss_reg: case cs_reg:
3719  case ds_reg: case fs_reg: case gs_reg:
3720  s = names_seg[code - es_reg];
3721  break;
3722  case al_reg: case ah_reg: case cl_reg: case ch_reg:
3723  case dl_reg: case dh_reg: case bl_reg: case bh_reg:
3724  USED_REX (0);
3725  if (rex)
3726  s = names8rex[code - al_reg];
3727  else
3728  s = names8[code - al_reg];
3729  break;
3730  case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
3731  case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
3732  USED_REX (REX_MODE64);
3733  if (rex & REX_MODE64)
3734  s = names64[code - eAX_reg];
3735  else if (sizeflag & DFLAG)
3736  s = names32[code - eAX_reg];
3737  else
3738  s = names16[code - eAX_reg];
3740  break;
3741  default:
3743  break;
3744  }
3745  oappend (s);
3746 }
#define bx_reg
Definition: i386-dis.c:504
static char intel_syntax
Definition: i386-dis.c:2053
#define bh_reg
Definition: i386-dis.c:499
#define eAX_reg
Definition: i386-dis.c:483
#define gs_reg
Definition: i386-dis.c:481
#define dx_reg
Definition: i386-dis.c:503
#define eSP_reg
Definition: i386-dis.c:487
#define ax_reg
Definition: i386-dis.c:501
#define eBP_reg
Definition: i386-dis.c:488
static void oappend(const char *)
Definition: i386-dis.c:3131
#define es_reg
Definition: i386-dis.c:476
#define eCX_reg
Definition: i386-dis.c:484
static const char ** names32
Definition: i386-dis.c:1300
static const char ** names8
Definition: i386-dis.c:1302
#define bp_reg
Definition: i386-dis.c:506
#define ss_reg
Definition: i386-dis.c:478
#define ds_reg
Definition: i386-dis.c:479
#define bl_reg
Definition: i386-dis.c:495
#define cx_reg
Definition: i386-dis.c:502
#define ah_reg
Definition: i386-dis.c:496
static const char ** names_seg
Definition: i386-dis.c:1304
#define ch_reg
Definition: i386-dis.c:497
#define DFLAG
Definition: i386-dis.c:463
#define USED_REX(value)
Definition: i386-dis.c:291
#define di_reg
Definition: i386-dis.c:508
#define dl_reg
Definition: i386-dis.c:494
#define cl_reg
Definition: i386-dis.c:493
#define indir_dx_reg
Definition: i386-dis.c:519
static const char ** names64
Definition: i386-dis.c:1299
#define eDX_reg
Definition: i386-dis.c:485
static const char ** names16
Definition: i386-dis.c:1301
#define eBX_reg
Definition: i386-dis.c:486
GLdouble s
Definition: gl.h:2039
Definition: inflate.c:139
static int rex
Definition: i386-dis.c:280
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
#define dh_reg
Definition: i386-dis.c:498
static int used_prefixes
Definition: i386-dis.c:301
#define cs_reg
Definition: i386-dis.c:477
#define al_reg
Definition: i386-dis.c:492
#define PREFIX_DATA
Definition: i386-dis.c:313
#define si_reg
Definition: i386-dis.c:507
#define fs_reg
Definition: i386-dis.c:480
#define eDI_reg
Definition: i386-dis.c:490
#define eSI_reg
Definition: i386-dis.c:489
static int prefixes
Definition: i386-dis.c:277
#define sp_reg
Definition: i386-dis.c:505
static const char ** names8rex
Definition: i386-dis.c:1303
#define REX_MODE64
Definition: i386-dis.c:283

◆ OP_indirE()

static void OP_indirE ( int  bytemode,
int  sizeflag 
)
static

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

3174 {
3175  if (!intel_syntax)
3176  oappend ("*");
3177  OP_E (bytemode, sizeflag);
3178 }
static char intel_syntax
Definition: i386-dis.c:2053
static void oappend(const char *)
Definition: i386-dis.c:3131
static void OP_E(int, int)
Definition: i386-dis.c:3238

◆ OP_J()

static void OP_J ( int  bytemode,
int  sizeflag 
)
static

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

3902 {
3903  bfd_vma disp;
3904  bfd_vma mask = -1;
3905 
3906  switch (bytemode)
3907  {
3908  case b_mode:
3909  FETCH_DATA (the_info, codep + 1);
3910  disp = *codep++;
3911  if ((disp & 0x80) != 0)
3912  disp -= 0x100;
3913  break;
3914  case v_mode:
3915  if (sizeflag & DFLAG)
3916  disp = get32s ();
3917  else
3918  {
3919  disp = get16 ();
3920  /* For some reason, a data16 prefix on a jump instruction
3921  means that the pc is masked to 16 bits after the
3922  displacement is added! */
3923  mask = 0xffff;
3924  }
3925  break;
3926  default:
3928  return;
3929  }
3930  disp = (start_pc + codep - start_codep + disp) & mask;
3931  set_op (disp, 0);
3932  print_operand_value (scratchbuf, 1, disp);
3933  oappend (scratchbuf);
3934 }
#define FETCH_DATA(info, addr)
Definition: i386-dis.c:320
static unsigned char * start_codep
Definition: i386-dis.c:1285
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define b_mode
Definition: i386-dis.c:465
GLenum GLint GLuint mask
Definition: glext.h:6028
static unsigned char * codep
Definition: i386-dis.c:1287
#define DFLAG
Definition: i386-dis.c:463
static bfd_vma start_pc
Definition: i386-dis.c:2042
uintptr_t bfd_vma
Definition: i386-dis.c:25
static bfd_signed_vma get32s(void)
Definition: i386-dis.c:3598
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
static int get16(void)
Definition: i386-dis.c:3614
#define INTERNAL_DISASSEMBLER_ERROR
Definition: i386-dis.c:1867
static disassemble_info * the_info
Definition: i386-dis.c:1288
#define v_mode
Definition: i386-dis.c:466
static void set_op(bfd_vma, int)
Definition: i386-dis.c:3625

◆ OP_M()

static void OP_M ( int  bytemode,
int  sizeflag 
)
static

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

4194 {
4195  if (mod == 3)
4196  BadOp (); /* bad lea,lds,les,lfs,lgs,lss modrm */
4197  else
4198  OP_E (bytemode, sizeflag);
4199 }
static void BadOp(void)
Definition: i386-dis.c:4449
static void OP_E(int, int)
Definition: i386-dis.c:3238
static int mod
Definition: i386-dis.c:1289

◆ 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 4105 of file i386-dis.c.

4106 {
4107  int add = 0;
4108  USED_REX (REX_EXTX);
4109  if (rex & REX_EXTX)
4110  add = 8;
4112  if (prefixes & PREFIX_DATA)
4113  sprintf (scratchbuf, "%%xmm%d", reg + add);
4114  else
4115  sprintf (scratchbuf, "%%mm%d", reg + add);
4117 }
static char intel_syntax
Definition: i386-dis.c:2053
#define REX_EXTX
Definition: i386-dis.c:284
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define USED_REX(value)
Definition: i386-dis.c:291
static int reg
Definition: i386-dis.c:1291
static int rex
Definition: i386-dis.c:280
static int used_prefixes
Definition: i386-dis.c:301
#define PREFIX_DATA
Definition: i386-dis.c:313
static int prefixes
Definition: i386-dis.c:277
int sprintf(char *str, const char *format,...)
Definition: utprint.c:768

◆ OP_MS()

static void OP_MS ( int  bytemode,
int  sizeflag 
)
static

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

4176 {
4177  if (mod == 3)
4178  OP_EM (bytemode, sizeflag);
4179  else
4180  BadOp ();
4181 }
static void BadOp(void)
Definition: i386-dis.c:4449
static void OP_EM(int, int)
Definition: i386-dis.c:4131
static int mod
Definition: i386-dis.c:1289

◆ 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 3966 of file i386-dis.c.

3967 {
3968  bfd_vma off;
3969 
3970  append_seg ();
3971 
3972  if ((sizeflag & AFLAG) || mode_64bit)
3973  off = get32 ();
3974  else
3975  off = get16 ();
3976 
3977  if (intel_syntax)
3978  {
3979  if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
3980  | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
3981  {
3983  oappend (":");
3984  }
3985  }
3986  print_operand_value (scratchbuf, 1, off);
3987  oappend (scratchbuf);
3988 }
static bfd_signed_vma get32(void)
Definition: i386-dis.c:3585
#define PREFIX_DS
Definition: i386-dis.c:309
static char intel_syntax
Definition: i386-dis.c:2053
static int mode_64bit
Definition: i386-dis.c:273
static void append_seg(void)
Definition: i386-dis.c:3138
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define es_reg
Definition: i386-dis.c:476
#define ds_reg
Definition: i386-dis.c:479
static const char ** names_seg
Definition: i386-dis.c:1304
#define PREFIX_CS
Definition: i386-dis.c:307
uintptr_t bfd_vma
Definition: i386-dis.c:25
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
#define PREFIX_GS
Definition: i386-dis.c:312
#define AFLAG
Definition: i386-dis.c:462
#define PREFIX_SS
Definition: i386-dis.c:308
#define PREFIX_FS
Definition: i386-dis.c:311
static int get16(void)
Definition: i386-dis.c:3614
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277

◆ 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 3991 of file i386-dis.c.

3992 {
3993  bfd_vma off;
3994 
3995  if (!mode_64bit)
3996  {
3997  OP_OFF (bytemode, sizeflag);
3998  return;
3999  }
4000 
4001  append_seg ();
4002 
4003  off = get64 ();
4004 
4005  if (intel_syntax)
4006  {
4007  if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
4008  | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
4009  {
4011  oappend (":");
4012  }
4013  }
4014  print_operand_value (scratchbuf, 1, off);
4015  oappend (scratchbuf);
4016 }
#define PREFIX_DS
Definition: i386-dis.c:309
static char intel_syntax
Definition: i386-dis.c:2053
static int mode_64bit
Definition: i386-dis.c:273
static void append_seg(void)
Definition: i386-dis.c:3138
static char scratchbuf[100]
Definition: i386-dis.c:1284
static void oappend(const char *)
Definition: i386-dis.c:3131
#define es_reg
Definition: i386-dis.c:476
#define ds_reg
Definition: i386-dis.c:479
static const char ** names_seg
Definition: i386-dis.c:1304
static bfd_vma get64(void)
Definition: i386-dis.c:3560
#define PREFIX_CS
Definition: i386-dis.c:307
uintptr_t bfd_vma
Definition: i386-dis.c:25
static void print_operand_value(char *, int, bfd_vma)
Definition: i386-dis.c:3181
#define PREFIX_GS
Definition: i386-dis.c:312
#define PREFIX_SS
Definition: i386-dis.c:308
#define PREFIX_FS
Definition: i386-dis.c:311
#define PREFIX_ES
Definition: i386-dis.c:310
static int prefixes
Definition: i386-dis.c:277
static void OP_OFF(int, int)

◆ OP_Rd()

static void OP_Rd ( int  bytemode,
int  sizeflag 
)
static

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

4097 {
4098  if (mod == 3)
4099  OP_E (bytemode, sizeflag);
4100  else
4101  BadOp ();
4102 }
static void BadOp(void)
Definition: i386-dis.c:4449
static void OP_E(int, int)
Definition: i386-dis.c:3238
static int mod
Definition: i386-dis.c:1289

◆ OP_REG()

static void OP_REG ( int  code,
int  sizeflag 
)
static

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

3643 {
3644  const char *s;
3645  int add = 0;
3646  USED_REX (REX_EXTZ);
3647  if (rex & REX_EXTZ)
3648  add = 8;
3649 
3650  switch (code)
3651  {
3652  case indir_dx_reg:
3653  if (intel_syntax)
3654  s = "[dx]";
3655  else
3656  s = "(%dx)";
3657  break;
3658  case ax_reg: case cx_reg: case dx_reg: case bx_reg:
3659  case sp_reg: case bp_reg: case si_reg: case di_reg:
3660  s = names16[code - ax_reg + add];
3661  break;
3662  case es_reg: case ss_reg: case cs_reg:
3663  case ds_reg: case fs_reg: case gs_reg:
3664  s = names_seg[code - es_reg + add];
3665  break;
3666  case al_reg: case ah_reg: case cl_reg: case ch_reg:
3667  case dl_reg: case dh_reg: case bl_reg: case bh_reg:
3668  USED_REX (0);
3669  if (rex)
3670  s = names8rex[code - al_reg + add];
3671  else
3672  s = names8[code - al_reg];
3673  break;
3674  case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
3675  case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
3676  if (mode_64bit)
3677  {
3678  s = names64[code - rAX_reg + add];
3679  break;
3680  }
3681  code += eAX_reg - rAX_reg;
3682  /* Fall through. */
3683  case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
3684  case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
3685  USED_REX (REX_MODE64);
3686  if (rex & REX_MODE64)
3687  s = names64[code - eAX_reg + add];
3688  else if (sizeflag & DFLAG)
3689  s = names32[code - eAX_reg + add];
3690  else
3691  s = names16[code - eAX_reg + add];
3693  break;
3694  default:
3696  break;
3697  }
3698  oappend (s);
3699 }
#define bx_reg
Definition: i386-dis.c:504
static char intel_syntax
Definition: i386-dis.c:2053
static int mode_64bit
Definition: i386-dis.c:273
#define bh_reg
Definition: i386-dis.c:499
#define eAX_reg
Definition: i386-dis.c:483
#define rAX_reg
Definition: i386-dis.c:510
#define gs_reg
Definition: i386-dis.c:481
#define dx_reg
Definition: i386-dis.c:503
#define eSP_reg
Definition: i386-dis.c:487
#define rDI_reg
Definition: i386-dis.c:517
#define rBP_reg
Definition: i386-dis.c:515
#define ax_reg
Definition: i386-dis.c:501
#define eBP_reg
Definition: i386-dis.c:488
static void oappend(const char *)
Definition: i386-dis.c:3131
#define es_reg
Definition: i386-dis.c:476
#define eCX_reg
Definition: i386-dis.c:484
static const char ** names32
Definition: i386-dis.c:1300
static const char ** names8
Definition: i386-dis.c:1302
#define bp_reg
Definition: i386-dis.c:506
#define ss_reg
Definition: i386-dis.c:478
#define ds_reg
Definition: i386-dis.c:479
#define bl_reg
Definition: i386-dis.c:495
#define cx_reg
Definition: i386-dis.c:502
#define ah_reg
Definition: i386-dis.c:496
static const char ** names_seg
Definition: i386-dis.c:1304
#define rSP_reg
Definition: i386-dis.c:514
#define ch_reg
Definition: i386-dis.c:497
#define DFLAG
Definition: i386-dis.c:463
#define USED_REX(value)
Definition: i386-dis.c:291
#define di_reg
Definition: i386-dis.c:508
#define dl_reg
Definition: i386-dis.c:494
#define REX_EXTZ
Definition: i386-dis.c:286
#define cl_reg
Definition: i386-