Intel® X86 Encoder Decoder
xed-encoder-hl.h File Reference
#include "xed-types.h"
#include "xed-reg-enum.h"
#include "xed-state.h"
#include "xed-iclass-enum.h"
#include "xed-portability.h"
#include "xed-encode.h"
#include "xed-util.h"

Data Structures

struct  xed_enc_displacement_t
 
struct  xed_encoder_instruction_t
 
struct  xed_encoder_operand_t
 
union  xed_encoder_prefixes_t
 
struct  xed_memop_t
 

Functions

Branch Displacement
static XED_INLINE xed_encoder_operand_t xed_absbr (xed_int32_t brdisp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_relbr (xed_int32_t brdisp, xed_uint_t width_bits)
 
Pointer Displacement
static XED_INLINE xed_encoder_operand_t xed_ptr (xed_int32_t brdisp, xed_uint_t width_bits)
 
Register and Immediate Operands
static XED_INLINE xed_encoder_operand_t xed_imm0 (xed_uint64_t v, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_imm1 (xed_uint8_t v)
 
static XED_INLINE xed_encoder_operand_t xed_other (xed_operand_enum_t operand_name, xed_int32_t value)
 
static XED_INLINE xed_encoder_operand_t xed_reg (xed_reg_enum_t reg)
 
static XED_INLINE xed_encoder_operand_t xed_simm0 (xed_int32_t v, xed_uint_t width_bits)
 
Instruction Properties and prefixes
static XED_INLINE void xed_addr (xed_encoder_instruction_t *x, xed_uint_t width_bits)
 
XED_DLL_EXPORT xed_bool_t xed_convert_to_encoder_request (xed_encoder_request_t *out, xed_encoder_instruction_t *in)
 
static XED_INLINE void xed_rep (xed_encoder_instruction_t *x)
 
static XED_INLINE void xed_repne (xed_encoder_instruction_t *x)
 
Creating instructions from operands
static XED_INLINE void xed_inst (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_uint_t number_of_operands, const xed_encoder_operand_t *operand_array)
 
static XED_INLINE void xed_inst0 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width)
 
static XED_INLINE void xed_inst1 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_encoder_operand_t op0)
 
static XED_INLINE void xed_inst2 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_encoder_operand_t op0, xed_encoder_operand_t op1)
 
static XED_INLINE void xed_inst3 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_encoder_operand_t op0, xed_encoder_operand_t op1, xed_encoder_operand_t op2)
 
static XED_INLINE void xed_inst4 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_encoder_operand_t op0, xed_encoder_operand_t op1, xed_encoder_operand_t op2, xed_encoder_operand_t op3)
 
static XED_INLINE void xed_inst5 (xed_encoder_instruction_t *inst, xed_state_t mode, xed_iclass_enum_t iclass, xed_uint_t effective_operand_width, xed_encoder_operand_t op0, xed_encoder_operand_t op1, xed_encoder_operand_t op2, xed_encoder_operand_t op3, xed_encoder_operand_t op4)
 

Memory Displacement

static XED_INLINE xed_enc_displacement_t xed_disp (xed_int64_t displacement, xed_uint32_t displacement_bits)
 
enum  xed_encoder_operand_type_t {
  XED_ENCODER_OPERAND_TYPE_INVALID,
  XED_ENCODER_OPERAND_TYPE_REL_BRDISP,
  XED_ENCODER_OPERAND_TYPE_ABS_BRDISP,
  XED_ENCODER_OPERAND_TYPE_REG,
  XED_ENCODER_OPERAND_TYPE_IMM0,
  XED_ENCODER_OPERAND_TYPE_SIMM0,
  XED_ENCODER_OPERAND_TYPE_IMM1,
  XED_ENCODER_OPERAND_TYPE_MEM,
  XED_ENCODER_OPERAND_TYPE_PTR,
  XED_ENCODER_OPERAND_TYPE_SEG0,
  XED_ENCODER_OPERAND_TYPE_SEG1,
  XED_ENCODER_OPERAND_TYPE_OTHER
}
 

Memory and Segment-releated Operands

#define XED_ENCODER_OPERANDS_MAX   8 /* FIXME */
 
static XED_INLINE xed_encoder_operand_t xed_mem_b (xed_reg_enum_t base, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_bd (xed_reg_enum_t base, xed_enc_displacement_t disp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_bisd (xed_reg_enum_t base, xed_reg_enum_t index, xed_uint_t scale, xed_enc_displacement_t disp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_gb (xed_reg_enum_t seg, xed_reg_enum_t base, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_gbd (xed_reg_enum_t seg, xed_reg_enum_t base, xed_enc_displacement_t disp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_gbisd (xed_reg_enum_t seg, xed_reg_enum_t base, xed_reg_enum_t index, xed_uint_t scale, xed_enc_displacement_t disp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_mem_gd (xed_reg_enum_t seg, xed_enc_displacement_t disp, xed_uint_t width_bits)
 
static XED_INLINE xed_encoder_operand_t xed_seg0 (xed_reg_enum_t seg0)
 
static XED_INLINE xed_encoder_operand_t xed_seg1 (xed_reg_enum_t seg1)
 

Macro Definition Documentation

◆ XED_ENCODER_OPERANDS_MAX

#define XED_ENCODER_OPERANDS_MAX   8 /* FIXME */

Enumeration Type Documentation

◆ xed_encoder_operand_type_t

Enumerator
XED_ENCODER_OPERAND_TYPE_INVALID 
XED_ENCODER_OPERAND_TYPE_REL_BRDISP 
XED_ENCODER_OPERAND_TYPE_ABS_BRDISP 
XED_ENCODER_OPERAND_TYPE_REG 
XED_ENCODER_OPERAND_TYPE_IMM0 
XED_ENCODER_OPERAND_TYPE_SIMM0 
XED_ENCODER_OPERAND_TYPE_IMM1 
XED_ENCODER_OPERAND_TYPE_MEM 
XED_ENCODER_OPERAND_TYPE_PTR 
XED_ENCODER_OPERAND_TYPE_SEG0 
XED_ENCODER_OPERAND_TYPE_SEG1 
XED_ENCODER_OPERAND_TYPE_OTHER