Intel® X86 Encoder Decoder
xed-decoded-inst-api.h File Reference

Functions

xed_decoded_inst_t High-level accessors

API

static XED_INLINE xed_category_enum_t xed_decoded_inst_get_category (const xed_decoded_inst_t *p)
 
static XED_INLINE xed_extension_enum_t xed_decoded_inst_get_extension (const xed_decoded_inst_t *p)
 
static XED_INLINE xed_iclass_enum_t xed_decoded_inst_get_iclass (const xed_decoded_inst_t *p)
 
static XED_INLINE xed_isa_set_enum_t xed_decoded_inst_get_isa_set (xed_decoded_inst_t const *const p)
 
static const XED_INLINE xed_inst_txed_decoded_inst_inst (const xed_decoded_inst_t *p)
 
static XED_INLINE xed_bool_t xed_decoded_inst_valid (const xed_decoded_inst_t *p)
 
xed_decoded_inst_t Attributes and properties
XED_DLL_EXPORT xed_uint32_t xed_decoded_inst_get_attribute (const xed_decoded_inst_t *p, xed_attribute_enum_t attr)
 
XED_DLL_EXPORT xed_attributes_t xed_decoded_inst_get_attributes (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint8_t xed_decoded_inst_get_modrm (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_nprefixes (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint32_t xed_decoded_inst_has_mpx_prefix (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_is_apx_zu (const xed_decoded_inst_t *p)
 Return non-zero value for APX-Promtoed zero-upper instructions (ZU). More...
 
XED_DLL_EXPORT xed_uint32_t xed_decoded_inst_is_xacquire (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint32_t xed_decoded_inst_is_xrelease (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_masked_vector_operation (xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_vector_length_bits (xed_decoded_inst_t const *const p)
 
xed_decoded_inst_t Operands
static XED_INLINE unsigned int xed_decoded_inst_noperands (const xed_decoded_inst_t *p)
 Return the number of operands. More...
 
XED_DLL_EXPORT xed_operand_action_enum_t xed_decoded_inst_operand_action (const xed_decoded_inst_t *p, unsigned int operand_index)
 Interpret the operand action in light of AVX512 masking and zeroing/merging. More...
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_operand_element_size_bits (const xed_decoded_inst_t *p, unsigned int operand_index)
 Return the size of an element in bits (for SSE and AVX operands) More...
 
XED_DLL_EXPORT xed_operand_element_type_enum_t xed_decoded_inst_operand_element_type (const xed_decoded_inst_t *p, unsigned int operand_index)
 Return the type of an element of type xed_operand_element_type_enum_t (for SSE and AVX operands) More...
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_operand_elements (const xed_decoded_inst_t *p, unsigned int operand_index)
 Return the number of element in the operand (for SSE and AVX operands) More...
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_operand_length (const xed_decoded_inst_t *p, unsigned int operand_index)
 Deprecated – returns the length in bytes of the operand_index'th operand. More...
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_operand_length_bits (const xed_decoded_inst_t *p, unsigned int operand_index)
 Return the length in bits of the operand_index'th operand. More...
 
static XED_INLINE xed_operand_values_txed_decoded_inst_operands (xed_decoded_inst_t *p)
 
static const XED_INLINE xed_operand_values_txed_decoded_inst_operands_const (const xed_decoded_inst_t *p)
 
xed_decoded_inst_t AVX512 Masking
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_avx512_dest_elements (const xed_decoded_inst_t *p)
 Returns the maximum number elements processed for an AVX512 vector instruction. More...
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_masking (const xed_decoded_inst_t *p)
 Returns true if the instruction uses write-masking. More...
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_merging (const xed_decoded_inst_t *p)
 Returns true if the instruction uses write-masking with merging. More...
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_zeroing (const xed_decoded_inst_t *p)
 Returns true if the instruction uses write-masking with zeroing. More...
 
xed_decoded_inst_t Initialization
static XED_INLINE void xed_decoded_inst_set_mode (xed_decoded_inst_t *p, xed_machine_mode_enum_t mmode, xed_address_width_enum_t stack_addr_width)
 
XED_DLL_EXPORT void xed_decoded_inst_zero (xed_decoded_inst_t *p)
 
XED_DLL_EXPORT void xed_decoded_inst_zero_keep_mode (xed_decoded_inst_t *p)
 
XED_DLL_EXPORT void xed_decoded_inst_zero_keep_mode_from_operands (xed_decoded_inst_t *p, const xed_operand_values_t *operands)
 
XED_DLL_EXPORT void xed_decoded_inst_zero_set_mode (xed_decoded_inst_t *p, const xed_state_t *dstate)
 
xed_decoded_inst_t Length
static XED_INLINE xed_uint_t xed_decoded_inst_get_length (const xed_decoded_inst_t *p)
 
xed_decoded_inst_t get Byte
static XED_INLINE xed_uint8_t xed_decoded_inst_get_byte (const xed_decoded_inst_t *p, xed_uint_t byte_index)
 
Modes
static XED_INLINE xed_chip_enum_t xed_decoded_inst_get_input_chip (const xed_decoded_inst_t *p)
 Return the user-specified xed_chip_enum_t chip name, or XED_CHIP_INVALID if not set. More...
 
static XED_INLINE xed_uint_t xed_decoded_inst_get_machine_mode_bits (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint32_t xed_decoded_inst_get_operand_width (const xed_decoded_inst_t *p)
 Returns the operand width in bits: 8/16/32/64. More...
 
static XED_INLINE xed_uint_t xed_decoded_inst_get_stack_address_mode_bits (const xed_decoded_inst_t *p)
 
static XED_INLINE void xed_decoded_inst_set_input_chip (xed_decoded_inst_t *p, xed_chip_enum_t chip)
 Set a user-specified xed_chip_enum_t chip name for restricting decode. More...
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_valid_for_chip (xed_decoded_inst_t const *const p, xed_chip_enum_t chip)
 Indicate if this decoded instruction is valid for the specified xed_chip_enum_t chip. More...
 
IFORM handling
static XED_INLINE xed_iform_enum_t xed_decoded_inst_get_iform_enum (const xed_decoded_inst_t *p)
 
static XED_INLINE unsigned int xed_decoded_inst_get_iform_enum_dispatch (const xed_decoded_inst_t *p)
 
xed_decoded_inst_t Printers
XED_DLL_EXPORT void xed_decoded_inst_dump (const xed_decoded_inst_t *p, char *buf, int buflen)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_dump_xed_format (const xed_decoded_inst_t *p, char *buf, int buflen, xed_uint64_t runtime_address)
 
XED_DLL_EXPORT xed_bool_t xed_format_context (xed_syntax_enum_t syntax, const xed_decoded_inst_t *xedd, char *out_buffer, int buffer_len, xed_uint64_t runtime_instruction_address, void *context, xed_disassembly_callback_fn_t symbolic_callback)
 Disassemble the decoded instruction using the specified syntax. More...
 
XED_DLL_EXPORT xed_bool_t xed_format_generic (xed_print_info_t *pi)
 
xed_decoded_inst_t Operand Field Details
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_conditionally_writes_registers (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_reg_enum_t xed_decoded_inst_get_base_reg (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_int64_t xed_decoded_inst_get_branch_displacement (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_branch_displacement_width (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_branch_displacement_width_bits (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_reg_enum_t xed_decoded_inst_get_dfv_reg (const xed_decoded_inst_t *xedd)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_immediate_is_signed (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_immediate_width (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_immediate_width_bits (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_reg_enum_t xed_decoded_inst_get_index_reg (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_get_memop_address_width (const xed_decoded_inst_t *p, xed_uint_t memop_idx)
 Returns the addressing width in bits (16,32,64) for MEM0 (memop_idx==0) or MEM1 (memop_idx==1). More...
 
XED_DLL_EXPORT xed_int64_t xed_decoded_inst_get_memory_displacement (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_memory_displacement_width (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_memory_displacement_width_bits (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT unsigned int xed_decoded_inst_get_memory_operand_length (const xed_decoded_inst_t *p, unsigned int memop_idx)
 returns bytes More...
 
XED_DLL_EXPORT xed_reg_enum_t xed_decoded_inst_get_reg (const xed_decoded_inst_t *p, xed_operand_enum_t reg_operand)
 
const XED_DLL_EXPORT xed_simple_flag_txed_decoded_inst_get_rflags_info (const xed_decoded_inst_t *p)
 See the comment on xed_decoded_inst_uses_rflags(). More...
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_get_scale (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
static XED_INLINE xed_uint8_t xed_decoded_inst_get_second_immediate (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_reg_enum_t xed_decoded_inst_get_seg_reg (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_int32_t xed_decoded_inst_get_signed_immediate (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_uint64_t xed_decoded_inst_get_unsigned_immediate (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_is_broadcast (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_is_broadcast_instruction (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_is_prefetch (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_mem_read (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_mem_written (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_mem_written_only (const xed_decoded_inst_t *p, unsigned int mem_idx)
 
XED_DLL_EXPORT xed_uint_t xed_decoded_inst_number_of_memory_operands (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_uses_embedded_broadcast (const xed_decoded_inst_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_decoded_inst_uses_rflags (const xed_decoded_inst_t *p)
 This returns 1 if the flags are read or written. More...
 
xed_decoded_inst_t Modification
XED_DLL_EXPORT void xed_decoded_inst_set_branch_displacement (xed_decoded_inst_t *p, xed_int64_t disp, xed_uint_t length_bytes)
 
XED_DLL_EXPORT void xed_decoded_inst_set_branch_displacement_bits (xed_decoded_inst_t *p, xed_int64_t disp, xed_uint_t length_bits)
 
XED_DLL_EXPORT void xed_decoded_inst_set_immediate_signed (xed_decoded_inst_t *p, xed_int32_t x, xed_uint_t length_bytes)
 
XED_DLL_EXPORT void xed_decoded_inst_set_immediate_signed_bits (xed_decoded_inst_t *p, xed_int32_t x, xed_uint_t length_bits)
 
XED_DLL_EXPORT void xed_decoded_inst_set_immediate_unsigned (xed_decoded_inst_t *p, xed_uint64_t x, xed_uint_t length_bytes)
 
XED_DLL_EXPORT void xed_decoded_inst_set_immediate_unsigned_bits (xed_decoded_inst_t *p, xed_uint64_t x, xed_uint_t length_bits)
 
XED_DLL_EXPORT void xed_decoded_inst_set_memory_displacement (xed_decoded_inst_t *p, xed_int64_t disp, xed_uint_t length_bytes)
 
XED_DLL_EXPORT void xed_decoded_inst_set_memory_displacement_bits (xed_decoded_inst_t *p, xed_int64_t disp, xed_uint_t length_bits)
 
XED_DLL_EXPORT void xed_decoded_inst_set_scale (xed_decoded_inst_t *p, xed_uint_t scale)
 
xed_decoded_inst_t User Data Field
static XED_INLINE xed_uint64_t xed_decoded_inst_get_user_data (xed_decoded_inst_t *p)
 
static XED_INLINE void xed_decoded_inst_set_user_data (xed_decoded_inst_t *p, xed_uint64_t new_value)
 
xed_decoded_inst_t Classifiers
XED_DLL_EXPORT xed_bool_t xed_classify_amx (const xed_decoded_inst_t *d)
 
XED_DLL_EXPORT xed_bool_t xed_classify_apx (const xed_decoded_inst_t *d)
 True for APX instructions. includes instructions with EGPRs, REX2 and encodings that are treated as illegal on non-APX systems. More...
 
XED_DLL_EXPORT xed_bool_t xed_classify_avx (const xed_decoded_inst_t *d)
 
XED_DLL_EXPORT xed_bool_t xed_classify_avx512 (const xed_decoded_inst_t *d)
 
XED_DLL_EXPORT xed_bool_t xed_classify_avx512_maskop (const xed_decoded_inst_t *d)
 
XED_DLL_EXPORT xed_bool_t xed_classify_sse (const xed_decoded_inst_t *d)