Intel® X86 Encoder Decoder
|
There are several functions available that help with computation of addresses. Note the "big real" or "unreal" address calculation is not currently supported. Two callbacks are defined for providing register values or segment base values. For real mode, the selector value is usedin the address computation. In protected mode or long mode, the segment descriptor callbacks are used. More...
Typedefs | |
typedef xed_uint64_t(* | xed_register_callback_fn_t) (xed_reg_enum_t reg, void *context, xed_bool_t *error) |
A function for obtaining register values. More... | |
typedef xed_uint64_t(* | xed_segment_base_callback_fn_t) (xed_reg_enum_t reg, void *context, xed_bool_t *error) |
A function for obtaining the segment base values. More... | |
Functions | |
XED_DLL_EXPORT xed_error_enum_t | xed_agen (xed_decoded_inst_t *xedd, unsigned int memop_index, void *context, xed_uint64_t *out_address) |
Using the registered callbacks, compute the memory address for a specified memop in a decoded instruction. More... | |
XED_DLL_EXPORT void | xed_agen_register_callback (xed_register_callback_fn_t register_fn, xed_segment_base_callback_fn_t segment_fn) |
Initialize the callback functions. More... | |
There are several functions available that help with computation of addresses. Note the "big real" or "unreal" address calculation is not currently supported. Two callbacks are defined for providing register values or segment base values. For real mode, the selector value is usedin the address computation. In protected mode or long mode, the segment descriptor callbacks are used.
typedef xed_uint64_t(* xed_register_callback_fn_t) (xed_reg_enum_t reg, void *context, xed_bool_t *error) |
A function for obtaining register values.
32b return values should be zero extended to 64b. The error value is set to nonzero if the callback experiences some sort of problem.
typedef xed_uint64_t(* xed_segment_base_callback_fn_t) (xed_reg_enum_t reg, void *context, xed_bool_t *error) |
A function for obtaining the segment base values.
32b return values should be zero extended zero extended to 64b. The error value is set to nonzero if the callback experiences some sort of problem.
XED_DLL_EXPORT xed_error_enum_t xed_agen | ( | xed_decoded_inst_t * | xedd, |
unsigned int | memop_index, | ||
void * | context, | ||
xed_uint64_t * | out_address | ||
) |
Using the registered callbacks, compute the memory address for a specified memop in a decoded instruction.
memop_index can have the value 0 for XED_OPERAND_MEM0, XED_OPERAND_AGEN, or 1 for XED_OPERAND_MEM1. Any other value results in an error being returned. The context parameter which is passed to the registered callbacks can be used to identify which thread's state is being referenced. The context parameter can also be used to specify which element of a vector register should be returned for gather an scatter operations.
XED_DLL_EXPORT void xed_agen_register_callback | ( | xed_register_callback_fn_t | register_fn, |
xed_segment_base_callback_fn_t | segment_fn | ||
) |
Initialize the callback functions.
Tell XED what to call when using xed_agen.