This section describes the base class used for initializing the encoder / decoder requests and the Intel® XED library initialization function.
More...
This section describes the base class used for initializing the encoder / decoder requests and the Intel® XED library initialization function.
To use Intel® XED, you must include "xed-interface.h"
If you are calling Intel® XED from C++, you must wrap this include:
Once, before using Intel® XED, you must call xed_tables_init() to initialize the tables Intel® XED uses for encoding and decoding:
Once initialized, Intel® XED is reentrant (multithread safe). All values used for encoding and decoding live on the caller's stack or in the passed-in parameters.
If your program is multithreaded, initialize Intel® XED once (and only once) using the above call before you attempt to decode or encode from any thread. Each thread does NOT need to initialize Intel® XED. The idea is to initialize Intel® XED before creating your threads.
◆ xed_state_t
Encapsulates machine modes for decoder/encoder requests.
It specifies the machine operating mode as a xed_machine_mode_enum_t for decoding and encoding. The machine mode corresponds to the default data operand width for that mode. For all modes other than the 64b long mode (XED_MACHINE_MODE_LONG_64), a default addressing width, and a stack addressing width must be supplied of type xed_address_width_enum_t .
◆ xed_get_copyright()
Returns a copyright string.
◆ xed_get_version()
Returns a string representing XED svn commit revision and time stamp.
◆ xed_register_abort_function()
This is for registering a function to be called during XED's assert processing. If you do not register an abort function, then the system's abort function will be called. If your supplied function returns, then abort() will still be called.
- Parameters
-
fn | This is a function pointer for a function that should handle the assertion reporting. The function pointer points to a function that takes 4 arguments: (1) msg, the assertion message, (2) file, the file name, (3) line, the line number (as an integer), and (4) other, a void pointer that is supplied as thei 2nd argument to this registration. |
other | This is a void* that is passed back to your supplied function fn as its 4th argument. It can be zero if you don't need this feature. You can used this to convey whatever additional context to your assertion handler (like FILE* pointers etc.). |
◆ xed_state_get_address_width()
◆ xed_state_get_machine_mode()
◆ xed_state_get_stack_address_width()
Return the STACK address width.
◆ xed_state_init()
Constructor.
DEPRECATED: use xed_state_init2(). The mode, and addresses widths are enumerations that specify the number of bits. In 64b mode (XED_MACHINE_MODE_LONG_64) the address width and stack address widths are 64b (XED_ADDRESS_WIDTH_64b). In other machine modes, you must specify valid addressing widths.
- Parameters
-
◆ xed_state_init2()
Constructor.
The mode, and addresses widths are enumerations that specify the number of bits. In 64b mode (XED_MACHINE_MODE_LONG_64) the address width and stack address widths are 64b (XED_ADDRESS_WIDTH_64b). In other machine modes, you must specify valid addressing widths.
- Parameters
-
◆ xed_state_long64_mode()
true iff the machine is in LONG_64 mode
◆ xed_state_mode_width_16()
◆ xed_state_mode_width_32()
◆ xed_state_print()
◆ xed_state_real_mode()
◆ xed_state_set_machine_mode()
Set the machine mode which corresponds to the default data operand size.
◆ xed_state_set_stack_address_width()
set the STACK address width
◆ xed_state_zero()
◆ xed_tables_init()
This is the call to initialize the XED encode and decode tables. It must be called once before using XED.