Expand description
Intel XED Bindings.
For the real docs see: https://intelxed.github.io
Note that xed_tables_init()
must be called before using the library.
§Features
bindgen
- Don’t use the bundled bindings files and instead regenerate rust bindings from scratch at compile time. You should never need to enable this manually but it will be enabled by other features.
Structs§
- @ingroup ISASET
- @ingroup CPUID @brief a data structure representing a CPUID record
- @ingroup DEC The main container for instructions. After decode, it holds an array of operands with derived information from decode and also valid #xed_inst_t pointer which describes the operand templates and the operand order. See @ref DEC for API documentation.
- @ingroup FLAGS Associated with each flag field there can be one action.
- Options for the disasembly formatting functions. Set once during initialization by a calling #xed_format_set_options @ingroup PRINT
- @ingroup IFORM Statically available information about iforms. Values are returned by #xed_iform_map().
- @ingroup DEC constant information about a decoded instruction form, including the pointer to the constant operand properties #xed_operand_t for this instruction form.
- @ingroup DEC Constant information about an individual generic operand, like an operand template, describing the operand properties. See @ref DEC for API information.
- @ingroup PRINT This contains the information used by the various disassembly printers. Call xed_init_print_info to initialize the fields. Then change the required and optional fields when required.
- @ingroup FLAGS A collection of #xed_flag_action_t’s and unions of read and written flags
- 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 . @ingroup INIT
Constants§
- < 16b addressing
- < 32b addressing
- < 64b addressing
- < EVEX.LL must not ==3 unless using embedded rounding
- < EVEX.V’=0 was detected in a non-64b mode instruction.
- < EVEX.Z!=0 when EVEX.aaa==0
- < A 66, F2 or F3 prefix was found where none is allowed.
- < A lock prefix was found where none is allowed.
- < An illegal value for the MAP field was detected in the instruction.
- < Memop indices must be 0 or 1.
- < XED could not decode the given instruction because an invalid register encoding was used.
- < Some registers must not match for this instruction (e.g. source with dest or dest with dest).
- < An F2 or F3 prefix was found where none is allowed.
- < A REX prefix was found where none is allowed.
- < There were not enough bytes in the given buffer
- < The register or segment callback for xed_agen experienced a problem
- < The index, dest and mask regs for AVX2 gathers must be different.
- < XED could not decode the given instruction
- < Full decode of instruction would exeed 15B.
- < The instruciton is not valid for the specified chip
- < The instruction was not valid for the specified mode
- < There was no error
- < One or both of the callbacks for xed_agen were missing.
- < The output pointer for xed_agen was zero
- < value will be zero (write)
- < value will be 1 (write)
- < value comes from AH (write)
- < modification (write)
- < value comes from the stack (write)
- < test (read)
- < undefined (treated as a write)
- < alignment check
- < auxiliary flag
- < carry flag
- < direction flag
- < x87 FC0 flag
- < x87 FC1 flag
- < x87 FC2 flag
- < x87 FC3 flag
- < ID flag
- < interrupt flag
- < I/O privilege level
- < nested task
- << overflow flag
- < parity flag
- < resume flag
- < sign flag
- < traf flag
- < virtual interrupt flag
- < virtual interrupt pending
- < virtual-8086 mode
- < zero flag
- < 16b protected mode
- < 32b protected mode
- < 64b operating mode
- < 16b protected mode
- < 32b protected mode
- < 16b real mode
- < 32b real mode (CS.D bit = 1)
- < Conditional read
- < Conditionlly read, always written (must write)
- < Conditionlly written (may write)
- < Read-only
- < Read and conditionlly written (may write)
- < Read and written (must write)
- < Write-only (must write)
- < bfloat16 floating point
- < 64b FP double precision
- < 16b floating point
- < Signed integer
- < 8 bit integer
- < 80b decimal BCD
- < 80b FP x87
- < 32b FP single precision
- < a structure of various fields
- < Unsigned integer
- < 8 bit unsigned integer
- < depends on other fields in the instruction
- < Shows up in operand encoding
- < Part of the opcode, but listed as an operand
- < Part of the opcode, but not typically listed as an operand
- < ATT SYSV disassembly syntax
- < Intel disassembly syntax
- < XED disassembly syntax
Statics§
Functions§
- This converts strings to #xed_address_width_enum_t types. @param s A C-string. @return #xed_address_width_enum_t @ingroup ENUM
- This converts strings to #xed_attribute_enum_t types. @param s A C-string. @return #xed_attribute_enum_t @ingroup ENUM
- This converts strings to #xed_category_enum_t types. @param s A C-string. @return #xed_category_enum_t @ingroup ENUM
- This converts strings to #xed_chip_enum_t types. @param s A C-string. @return #xed_chip_enum_t @ingroup ENUM
- This converts strings to #xed_cpuid_group_enum_t types. @param s A C-string. @return #xed_cpuid_group_enum_t @ingroup ENUM
- This converts strings to #xed_cpuid_rec_enum_t types. @param s A C-string. @return #xed_cpuid_rec_enum_t @ingroup ENUM
- This converts strings to #xed_error_enum_t types. @param s A C-string. @return #xed_error_enum_t @ingroup ENUM
- This converts strings to #xed_exception_enum_t types. @param s A C-string. @return #xed_exception_enum_t @ingroup ENUM
- This converts strings to #xed_extension_enum_t types. @param s A C-string. @return #xed_extension_enum_t @ingroup ENUM
- This converts strings to #xed_flag_action_enum_t types. @param s A C-string. @return #xed_flag_action_enum_t @ingroup ENUM
- This converts strings to #xed_flag_enum_t types. @param s A C-string. @return #xed_flag_enum_t @ingroup ENUM
- This converts strings to #xed_iclass_enum_t types. @param s A C-string. @return #xed_iclass_enum_t @ingroup ENUM
- This converts strings to #xed_iform_enum_t types. @param s A C-string. @return #xed_iform_enum_t @ingroup ENUM
- This converts strings to #xed_isa_set_enum_t types. @param s A C-string. @return #xed_isa_set_enum_t @ingroup ENUM
- This converts strings to #xed_machine_mode_enum_t types. @param s A C-string. @return #xed_machine_mode_enum_t @ingroup ENUM
- This converts strings to #xed_nonterminal_enum_t types. @param s A C-string. @return #xed_nonterminal_enum_t @ingroup ENUM
- This converts strings to #xed_operand_action_enum_t types. @param s A C-string. @return #xed_operand_action_enum_t @ingroup ENUM
- This converts strings to #xed_operand_convert_enum_t types. @param s A C-string. @return #xed_operand_convert_enum_t @ingroup ENUM
- This converts strings to #xed_operand_element_type_enum_t types. @param s A C-string. @return #xed_operand_element_type_enum_t @ingroup ENUM
- This converts strings to #xed_operand_element_xtype_enum_t types. @param s A C-string. @return #xed_operand_element_xtype_enum_t @ingroup ENUM
- This converts strings to #xed_operand_enum_t types. @param s A C-string. @return #xed_operand_enum_t @ingroup ENUM
- This converts strings to #xed_operand_type_enum_t types. @param s A C-string. @return #xed_operand_type_enum_t @ingroup ENUM
- This converts strings to #xed_operand_visibility_enum_t types. @param s A C-string. @return #xed_operand_visibility_enum_t @ingroup ENUM
- This converts strings to #xed_operand_width_enum_t types. @param s A C-string. @return #xed_operand_width_enum_t @ingroup ENUM
- This converts strings to #xed_reg_class_enum_t types. @param s A C-string. @return #xed_reg_class_enum_t @ingroup ENUM
- This converts strings to #xed_reg_enum_t types. @param s A C-string. @return #xed_reg_enum_t @ingroup ENUM
- This converts strings to #xed_syntax_enum_t types. @param s A C-string. @return #xed_syntax_enum_t @ingroup ENUM
- @ingroup ENCHL an absolute branch displacement operand @param brdisp The branch displacement @param width_bits The width of the displacement in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL This is to specify effective address size different than the default. For things with base or index regs, XED picks it up from the registers. But for things that have implicit memops, or no base or index reg, we must allow the user to set the address width directly. @param x The #xed_encoder_instruction_t being filled in. @param width_bits The intended effective address size in bits. Values: 16, 32 or 64.
- This converts strings to #xed_address_width_enum_t types. @param p An enumeration element of type xed_address_width_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_address_width_enum_t The last element of the enumeration. @ingroup ENUM
- 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. @ingroup AGEN
- Initialize the callback functions. Tell XED what to call when using #xed_agen. @ingroup AGEN
- @ingroup DEC Return the i’th global attribute in a linear sequence, independent of any instruction. This is used for scanning and printing all attributes.
- This converts strings to #xed_attribute_enum_t types. @param p An enumeration element of type xed_attribute_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_attribute_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC Return the maximum number of defined attributes, independent of any instruction.
- This converts strings to #xed_category_enum_t types. @param p An enumeration element of type xed_category_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_category_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_chip_enum_t types. @param p An enumeration element of type xed_chip_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_chip_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC True for AMX instructions
- @ingroup DEC @brief True for APX instructions. includes instructions with EGPRs, REX2 and encodings that are treated as illegal on non-APX systems
- @ingroup DEC True for AVX/AVX2 SIMD VEX-encoded operations. Does not include BMI/BMI2 instructions.
- @ingroup DEC True for AVX512 (EVEX-encoded) SIMD and (VEX encoded) K-mask instructions
- @ingroup DEC True for AVX512 (VEX-encoded) K-mask operations
- @ingroup DEC True for SSE/SSE2/etc. SIMD operations. Includes AES and PCLMULQDQ
- @ingroup ENCHL convert a #xed_encoder_instruction_t to a #xed_encoder_request_t for encoding
- This converts strings to #xed_cpuid_group_enum_t types. @param p An enumeration element of type xed_cpuid_group_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_cpuid_group_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_cpuid_rec_enum_t types. @param p An enumeration element of type xed_cpuid_rec_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_cpuid_rec_enum_t The last element of the enumeration. @ingroup ENUM
- This is the main interface to the decoder. @param xedd the decoded instruction of type #xed_decoded_inst_t . Mode/state sent in via xedd; See the #xed_state_t @param itext the pointer to the array of instruction text bytes @param bytes the length of the itext input array. 1 to 15 bytes, anything more is ignored. @return #xed_error_enum_t indicating success (#XED_ERROR_NONE) or failure. Note failure can be due to not enough bytes in the input array.
- @ingroup DEC See #xed_decode(). This version of the decode API adds a CPUID feature vector to support restricting decode based on both a specified chip via #xed_decoded_inst_set_input_chip() and a modify-able cpuid feature vector obtained from #xed_get_chip_features().
- Returns the maximum number elements processed for an AVX512 vector instruction. Scalars report 1 element. @ingroup DEC
- @ingroup DEC
- @ingroup PRINT Print out all the information about the decoded instruction to the buffer buf whose length is maximally buflen. This is for debugging.
- @ingroup PRINT Print the instruction information in a verbose format. This is for debugging. @param p a #xed_decoded_inst_t for a decoded instruction @param buf a buffer to write the disassembly in to. @param buflen maximum length of the disassembly buffer @param runtime_address the address of the instruction being disassembled. If zero, the offset is printed for relative branches. If nonzero, XED attempts to print the target address for relative branches. @return Returns 0 if the disassembly fails, 1 otherwise.
- @ingroup DEC Returns 1 if the attribute is defined for this instruction.
- @ingroup DEC Returns the attribute bitvector
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC Result in BYTES
- @ingroup DEC Result in BITS
- @ingroup DEC Read itext byte.
- @ingroup DEC Return the instruction #xed_category_enum_t enumeration
- @ingroup DEC Return DFV register enumeration if one of the instruction’s operands is a “default flags values” pseudo-register and invalid register enumeration otherwise
- @ingroup DEC Return the instruction #xed_extension_enum_t enumeration
- @ingroup DEC Return the instruction #xed_iclass_enum_t enumeration.
- @ingroup DEC Return the instruction iform enum of type #xed_iform_enum_t .
- @ingroup DEC Return the instruction zero-based iform number based on masking the corresponding #xed_iform_enum_t. This value is suitable for dispatching. The maximum value for a particular iclass is provided by #xed_iform_max_per_iclass() .
- @ingroup DEC Return true if the first immediate (IMM0) is signed
- @ingroup DEC Return the immediate width in BYTES.
- @ingroup DEC Return the immediate width in BITS.
- Return the user-specified #xed_chip_enum_t chip name, or XED_CHIP_INVALID if not set. @ingroup DEC
- @ingroup DEC Return the instruction #xed_isa_set_enum_t enumeration
- @ingroup DEC Return the length of the decoded instruction in bytes.
- @ingroup DEC Returns 16/32/64 indicating the machine mode with in bits. This is derived from the input mode information.
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC Result in BYTES
- @ingroup DEC Result in BITS
- returns bytes @ingroup DEC
- @ingroup DEC Returns the modrm byte
- @ingroup DEC Returns the number of legacy prefixes.
- Returns the operand width in bits: 8/16/32/64. This is different than the #xed_operand_values_get_effective_operand_width() which only returns 16/32/64. This factors in the BYTEOP attribute when computing its return value. This function provides a information for that is only useful for (scalable) GPR-operations. Individual operands have more specific information available from #xed_decoded_inst_operand_element_size_bits() @ingroup DEC
- @ingroup DEC Return the specified register operand. The specifier is of type #xed_operand_enum_t .
- See the comment on xed_decoded_inst_uses_rflags(). This can return 0 if the flags are really not used by this instruction. @ingroup DEC
- @ingroup DEC
- @ingroup DEC Return the second immediate.
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC Returns 16/32/64 indicating the stack addressing mode with in bits. This is derived from the input mode information.
- @ingroup DEC
- @ingroup DEC Return a user data field for arbitrary use by the user after decoding.
- @ingroup DEC Returns 1 if the instruction has mpx prefix.
- @ingroup DEC Return the #xed_inst_t structure for this instruction. This is the route to the basic operands form information.
- @ingroup DEC @brief Return non-zero value for APX-Promtoed zero-upper instructions (ZU).
- @ingroup DEC Return 1 for broadcast instructions or AVX512 load-op instructions using the broadcast feature 0 otherwise. Logical OR of #xed_decoded_inst_is_broadcast_instruction() and #xed_decoded_inst_uses_embedded_broadcast().
- @ingroup DEC Return 1 for broadcast instruction. (NOT including AVX512 load-op instructions) 0 otherwise. Just a category check.
- @ingroup DEC Returns true if the instruction is a prefetch
- @ingroup DEC Returns 1 if the instruction is xacquire.
- @ingroup DEC Returns 1 if the instruction is xrelease.
- @ingroup DEC Returns 1 iff the instruction uses destination-masking. This is 0 for blend operations that use their mask field as a control.
- Returns true if the instruction uses write-masking @ingroup DEC
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC
- Returns true if the instruction uses write-masking with merging @ingroup DEC
- Return the number of operands @ingroup DEC
- @ingroup DEC
- Interpret the operand action in light of AVX512 masking and zeroing/merging. If masking and merging are used together, the dest operand may also be read. If masking and merging are used together, the elemnents of dest operand register may be conditionally written (so that input values live on in the output register). @ingroup DEC
- Return the size of an element in bits (for SSE and AVX operands) @ingroup DEC
- Return the type of an element of type #xed_operand_element_type_enum_t (for SSE and AVX operands) @ingroup DEC
- Return the number of element in the operand (for SSE and AVX operands) @ingroup DEC
- Deprecated – returns the length in bytes of the operand_index’th operand. Use #xed_decoded_inst_operand_length_bits() instead. @ingroup DEC
- Return the length in bits of the operand_index’th operand. @ingroup DEC
- @ingroup DEC Obtain a non-constant pointer to the operands
- @ingroup DEC Obtain a constant pointer to the operands
- @ingroup DEC Set the branch displacement using a BYTE length
- @ingroup DEC Set the branch displacement a BITS length
- @ingroup DEC Set the signed immediate a BYTE length
- @ingroup DEC Set the signed immediate a BITS length
- @ingroup DEC Set the unsigned immediate a BYTE length
- @ingroup DEC Set the unsigned immediate a BITS length
- Set a user-specified #xed_chip_enum_t chip name for restricting decode @ingroup DEC
- @ingroup DEC Set the memory displacement using a BYTE length
- @ingroup DEC Set the memory displacement a BITS length
- @ingroup DEC Set the machine mode and stack addressing width directly. This is NOT a full initialization; Call #xed_decoded_inst_zero() before using this if you want a clean slate.
- @ingroup DEC
- @ingroup DEC Modify the user data field.
- @ingroup DEC Return 1 for AVX512 load-op instructions using the broadcast feature, 0 otherwise.
- This returns 1 if the flags are read or written. This will return 0 otherwise. This will return 0 if the flags are really not used by this instruction. For some shifts/rotates, XED puts a flags operand in the operand array before it knows if the flags are used because of mode-dependent masking effects on the immediate. @ingroup DEC
- @ingroup DEC Return true if the instruction is valid
- Indicate if this decoded instruction is valid for the specified #xed_chip_enum_t chip @ingroup DEC
- @ingroup DEC Returns 128, 256 or 512 for operations in the VEX, EVEX (or XOP) encoding space and returns 0 for (most) nonvector operations. This usually the content of the VEX.L or EVEX.LL field, reinterpreted. Some GPR instructions (like the BMI1/BMI2) are encoded in the VEX space and return non-zero values from this API.
- @ingroup DEC Zero the decode structure completely. Re-initializes all operands.
- @ingroup DEC Zero the decode structure, but preserve the existing machine state/mode information. Re-initializes all operands.
- @ingroup DEC Zero the decode structure, but copy the existing machine state/mode information from the supplied operands pointer. Same as #xed_decoded_inst_zero_keep_mode.
- @ingroup DEC Zero the decode structure, but set the machine state/mode information. Re-initializes all operands.
- Returns true if the instruction uses write-masking with zeroing @ingroup DEC
- @ingroup ENCHL a memory displacement (not for branches) @param displacement The value of the displacement @param displacement_bits The width of the displacement in bits. Typically 8 or 32. @returns #xed_enc_displacement_t
- This is the main interface to the encoder. The array should be at most 15 bytes long. The ilen parameter should indicate this length. If the array is too short, the encoder may fail to encode the request. Failure is indicated by a return value of type #xed_error_enum_t that is not equal to #XED_ERROR_NONE. Otherwise, #XED_ERROR_NONE is returned and the length of the encoded instruction is returned in olen.
- This function will attempt to encode a NOP of exactly ilen bytes. If such a NOP is not encodeable, then false will be returned.
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC Retrieve the name of the n’th operand in the operand order.
- @ingroup ENC Converts an decoder request to a valid encoder request.
- @ingroup ENC Retrieve the number of entries in the encoder operand order array @return The number of entries in the encoder operand order array
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC Specify the name as the n’th operand in the operand order.
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC same storage as uimm0
- @ingroup ENC Set the uimm0 using a BYTE width.
- @ingroup ENC Set the uimm0 using a BIT width.
- @ingroup ENC
- @ingroup ENC
- @ingroup ENC clear the operand order array @param[in] p xed_encoder_request_t
- @ingroup ENC
- This converts strings to #xed_error_enum_t types. @param p An enumeration element of type xed_error_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_error_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_exception_enum_t types. @param p An enumeration element of type xed_exception_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_exception_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_extension_enum_t types. @param p An enumeration element of type xed_extension_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_extension_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup FLAGS returns true if the specified action is invalid. Only the 2nd flag might be invalid.
- This converts strings to #xed_flag_action_enum_t types. @param p An enumeration element of type xed_flag_action_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_flag_action_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup FLAGS return the action
- @ingroup FLAGS get the name of the flag
- @ingroup FLAGS print the flag & actions
- @ingroup FLAGS test to see if the specific action is a read
- @ingroup FLAGS returns true if either action is a read
- @ingroup FLAGS test to see if a specific action is a write
- @ingroup FLAGS returns true if either action is a write
- @ingroup FLAGS extracts the default flags values from XED DFV pseudo-register to a given xed_flag_dfv_t pointer If the given DFV enumeration is invalid, the function returns 0
- This converts strings to #xed_flag_enum_t types. @param p An enumeration element of type xed_flag_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_flag_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup FLAGS returns true if this object has a subset of the flags of the “other” object.
- @ingroup FLAGS Return the flags as a mask
- @ingroup FLAGS print the flag set in the supplied buffer
- Disassemble the decoded instruction using the specified syntax. The output buffer must be at least 25 bytes long. Returns true if disassembly proceeded without errors. @param syntax a #xed_syntax_enum_t the specifies the disassembly format @param xedd a #xed_decoded_inst_t for a decoded instruction @param out_buffer a buffer to write the disassembly in to. @param buffer_len maximum length of the disassembly buffer @param runtime_instruction_address the address of the instruction being disassembled. If zero, the offset is printed for relative branches. If nonzero, XED attempts to print the target address for relative branches. @param context A void* used only for the call back routine for symbolic disassembly if one is provided. Can be zero. @param symbolic_callback A function pointer for obtaining symbolic disassembly. Can be zero. @return Returns 0 if the disassembly fails, 1 otherwise. @ingroup PRINT
- @ingroup PRINT Disassemble the instruction information to a buffer. See the #xed_print_info_t for the required public fields of the argument. This is the preferred method of doing disassembly. The output buffer must be at least 25 bytes long. @param pi a #xed_print_info_t @return Returns 0 if the disassembly fails, 1 otherwise.
- Optionally, customize the disassembly formatting options by passing in a #xed_format_options_t structure. @ingroup PRINT
- fill in the contents of p with the vector of chip features.
- @ingroup INIT Returns a copyright string.
- @ingroup CPUID @brief Returns the name of the i’th cpuid group associated with the given isa-set. This function is called repeatedly, with i = 0 until reaching XED_MAX_CPUID_GROUPS_PER_ISA_SET or when the return value is XED_CPUID_GROUP_INVALID. An ISA-SET is supported by a chip if CPUID match is found for a single CPUID group (OR relationship between groups).
- @ingroup CPUID @brief provides the details of the CPUID specification, if the enumeration value is not sufficient. stores the values of the CPUID record in the given pointer p @returns xed_bool_t 1=success , 0=failure
- @ingroup CPUID @brief Returns the name of the i’th cpuid record associated with the given cpuid group. This function is called repeatedly, with i = 0 until reaching XED_MAX_CPUID_RECS_PER_GROUP or when the return value is XED_CPUID_REC_INVALID. A cpuid group is satisfied if all of its cpuid records are set (AND relationship between records).
- Returns the largest enclosing register for any kind of register; This is mostly useful for GPRs. (64b mode assumed) @ingroup REGINTFC
- Returns the largest enclosing register for any kind of register; This is mostly useful for GPRs in 32b mode. @ingroup REGINTFC
- Returns the width, in bits, of the named register. 32b mode @ingroup REGINTFC
- Returns the width, in bits, of the named register. 64b mode. @ingroup REGINTFC
- @ingroup INIT Returns a string representing XED svn commit revision and time stamp.
- Returns the specific width GPR reg class (like XED_REG_CLASS_GPR32 or XED_REG_CLASS_GPR64) for a given GPR register. Or XED_REG_INVALID if not a GPR. @ingroup REGINTFC
- This converts strings to #xed_iclass_enum_t types. @param p An enumeration element of type xed_iclass_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_iclass_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_iform_enum_t types. @param p An enumeration element of type xed_iform_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_iform_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup IFORM Return the first of the iforms for a particular iclass. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- @ingroup IFORM Map the #xed_iform_enum_t to a pointer to a #xed_iform_info_t which indicates the #xed_iclass_enum_t, the #xed_category_enum_t and the #xed_extension_enum_t for the iform. Returns 0 if the iform is not a valid iform.
- @ingroup IFORM Return the maximum number of iforms for a particular iclass. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- @ingroup IFORM Return the category for a given iform. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- @ingroup IFORM Return the extension for a given iform. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- @ingroup IFORM Return the iclass for a given iform. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- @ingroup IFORM Return a pointer to a character string of the iclass. This translates the internal disambiguated names to the more ambiguous names that people like to see. This returns the ATT SYSV-syntax name.
- @ingroup IFORM Return a pointer to a character string of the iclass. This translates the internal disambiguated names to the more ambiguous names that people like to see. This returns the Intel-syntax name.
- @ingroup IFORM Return the isa_set for a given iform. This function returns valid data as soon as global data is initialized. (This function does not require a decoded instruction as input).
- Returns the last element of the enumeration @return xed_iformfl_enum_t The last element of the enumeration. @ingroup ENUM
- This function just does instruction length decoding. It does not return a fully decoded instruction. @param xedd the decoded instruction of type #xed_decoded_inst_t . Mode/state sent in via xedd; See the #xed_state_t . @param itext the pointer to the array of instruction text bytes @param bytes the length of the itext input array. 1 to 15 bytes, anything more is ignored. @return #xed_error_enum_t indicating success (#XED_ERROR_NONE) or failure. Only two failure codes are valid for this function: #XED_ERROR_BUFFER_TOO_SHORT and #XED_ERROR_GENERAL_ERROR. In general this function cannot tell if the instruction is valid or not. For valid instructions, XED can figure out if enough bytes were provided to decode the instruction. If not enough were provided, XED returns #XED_ERROR_BUFFER_TOO_SHORT. From this function, the #XED_ERROR_GENERAL_ERROR is an indication that XED could not decode the instruction’s length because the instruction was so invalid that even its length may across implmentations.
- @ingroup ENCHL a first immediate operand (known as IMM0) @param v An immdediate operand. @param width_bits The immediate width in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL The 2nd immediate operand (known as IMM1) for rare instructions that require it. @param v The 2nd immdediate (byte-width) operand @returns xed_encoder_operand_t An operand.
- @ingroup PRINT
- @ingroup ENCHL instruction with an array of operands. The maximum number is XED_ENCODER_OPERANDS_MAX. The array’s contents are copied. @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param number_of_operands length of the subsequent array @param operand_array An array of #xed_encoder_operand_t objects
- @ingroup ENCHL instruction with no operands @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits
- @ingroup ENCHL instruction with one operand @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param op0 the operand
- @ingroup ENCHL instruction with two operands @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param op0 the 1st operand @param op1 the 2nd operand
- @ingroup ENCHL instruction with three operands @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param op0 the 1st operand @param op1 the 2nd operand @param op2 the 3rd operand
- @ingroup ENCHL instruction with four operands @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param op0 the 1st operand @param op1 the 2nd operand @param op2 the 3rd operand @param op3 the 4th operand
- @ingroup ENCHL instruction with five operands @param inst The #xed_encoder_instruction_t to be filled in @param mode The xed_state_t including the machine mode and stack address width. @param iclass The #xed_iclass_enum_t @param effective_operand_width in bits @param op0 the 1st operand @param op1 the 2nd operand @param op2 the 3rd operand @param op3 the 4th operand @param op4 the 5th operand
- @ingroup DEC xed_inst_cpl() is DEPRECATED. Please use “xed_decoded_inst_get_attribute(xedd, XED_ATTRIBUTE_RING0)” instead. Return the current privilege level (CPL) required for execution, 0 or 3. If the value is zero, then the instruction can only execute in ring 0.
- @ingroup DEC Return #xed_exception_enum_t if present for the specified instruction. This is currently only used for SSE and AVX instructions.
- @ingroup DEC Scan for the attribute attr and return 1 if it is found, 0 otherwise.
- @ingroup DEC Return the attributes bit vector
- @ingroup DEC Number of instruction operands
- @ingroup DEC Obtain a pointer to an individual operand
- @ingroup DEC Return the base of instruction table.
- This converts strings to #xed_isa_set_enum_t types. @param p An enumeration element of type xed_isa_set_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_isa_set_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup ISASET return 1 if the isa_set is part included in the specified chip, 0 otherwise.
- Convert the input value
f
into its binary representation as a string and store it inbuf
. @param buf Pointer to the character array where the binary representation will be stored. @param f Input value to be converted. @param bits_to_print Number of bits to print (limited to 64 bits). @param buflen Length of thebuf
array. @return The number of characters actually copied (excluding the null terminator). - defaults to lowercase
- defaults to lowercase
- This converts strings to #xed_machine_mode_enum_t types. @param p An enumeration element of type xed_machine_mode_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_machine_mode_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup ENCHL memory operand - base only @param base The base register @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - base and displacement only @param base The base register @param disp The displacement @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - base, index, scale, displacement @param base The base register @param index The index register @param scale The scale for the index register value @param disp The displacement @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - segment and base only @param seg The segment override register @param base The base register @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - segment, base and displacement only @param seg The segment override register @param base The base register @param disp The displacement @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - segment, base, index, scale, and displacement @param seg The segment override register @param base The base register @param index The index register @param scale The scale for the index register value @param disp The displacement @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL memory operand - segment and displacement only @param seg The segment override register @param disp The displacement @param width_bits The length of the memory reference in bits. @returns xed_encoder_operand_t An operand.
- present = 1 to turn the feature on. present=0 to remove the feature.
- This converts strings to #xed_nonterminal_enum_t types. @param p An enumeration element of type xed_nonterminal_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_nonterminal_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC Take an #xed_iclass_enum_t value for an instruction with a REP/REPNE/REPE prefix and return the corresponding #xed_iclass_enum_t without that prefix. If the input instruction does not have a REP/REPNE/REPE prefix, this function returns XED_ICLASS_INVALID.
- This converts strings to #xed_operand_action_enum_t types. @param p An enumeration element of type xed_operand_action_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_action_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC If the operand has a conditional read (may also write)
- @ingroup DEC If the operand has a conditional write (may also read)
- This converts strings to #xed_operand_convert_enum_t types. @param p An enumeration element of type xed_operand_convert_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_convert_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_operand_element_type_enum_t types. @param p An enumeration element of type xed_operand_element_type_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_element_type_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_operand_element_xtype_enum_t types. @param p An enumeration element of type xed_operand_element_xtype_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_element_xtype_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_operand_enum_t types. @param p An enumeration element of type xed_operand_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC @param p an operand template, #xed_operand_t. These operands represent branch displacements, memory displacements and various immediates
- @ingroup DEC Tests the enum for inclusion in XED_OPERAND_{BASE0,BASE1,INDEX,SEG0,SEG1} @param name the operand name, type #xed_operand_enum_t @return 1 if the operand name is for a memory addressing register operand, 0 otherwise. See also #xed_operand_is_register .
- @ingroup DEC Tests the enum for inclusion in XED_OPERAND_REG0 through XED_OPERAND_REG9. @param name the operand name, type #xed_operand_enum_t @return 1 if the operand name is REG0…REG9, 0 otherwise.
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC
- @ingroup DEC Print the operand p into the buffer buf, of length buflen. @param p an operand template, #xed_operand_t. @param buf buffer that gets filled in @param buflen maximum buffer length
- @ingroup DEC If the operand is read, including conditional reads
- @ingroup DEC If the operand is read-and-written, conditional reads and conditional writes
- @ingroup DEC If the operand is read-only, including conditional reads
- @ingroup DEC Careful with this one – use #xed_decoded_inst_get_reg()! This one is probably not what you think it is. It is only used for hard-coded registers implicit in the instruction encoding. Most likely you want to get the #xed_operand_enum_t and then look up the instruction using #xed_decoded_inst_get_reg(). The hard-coded registers are also available that way. @param p an operand template, #xed_operand_t. @return the implicit or suppressed registers, type #xed_reg_enum_t
- @ingroup DEC DEPRECATED: Returns the raw R/W action. There are many cases for conditional reads and writes. See #xed_decoded_inst_operand_action().
- @ingroup DEC Careful with this one; See #xed_operand_is_register(). @param p an operand template, #xed_operand_t. @return 1 if the operand template represents are register-type operand.
- @ingroup DEC @return The #xed_operand_type_enum_t of the operand template. This is probably not what you want.
- This converts strings to #xed_operand_type_enum_t types. @param p An enumeration element of type xed_operand_type_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_type_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup OPERANDS
- @ingroup OPERANDS Returns true if 0x2E prefix on Jcc
- @ingroup OPERANDS Returns true if 0x3E prefix on Jcc
- @ingroup OPERANDS Returns true for indirect call/jmp with 0x3E prefix (if the legacy prefix rules are obeyed)
- @ingroup OPERANDS DO NOT USE - DEPRECATED. The correct way to do remove a rep prefix is by changing the iclass
- @ingroup OPERANDS Dump all the information about the operands to buf.
- @ingroup OPERANDS Returns true if the memory operation has atomic read-modify-write semantics. An XCHG accessing memory is atomic with or without a LOCK prefix.
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS Return the branch displacement width in bytes
- @ingroup OPERANDS Return the branch displacement width in bits
- @ingroup OPERANDS Deprecated. Compatibility function for XED0. See has_memory_displacement().
- @ingroup OPERANDS Returns The effective address width in bits: 16/32/64.
- @ingroup OPERANDS Returns The effective operand width in bits: 16/32/64. Note this is not the same as the width of the operand which can vary! For 8 bit operations, the effective operand width is the machine mode’s default width. If you also want to identify byte operations use the higher level function #xed_decoded_inst_get_operand_width() .
- @ingroup OPERANDS
- @ingroup OPERANDS Return the i’th byte of the immediate
- @ingroup OPERANDS
- @ingroup OPERANDS Return true if the first immediate (IMM0) is signed
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- Returns the potentially scaled value of the memory displacement. Certain AVX512 memory displacements are scaled before they are used. @ingroup OPERANDS
- Returns the unscaled (raw) memory displacement. Certain AVX512 memory displacements are scaled before they are used. @ingroup OPERANDS
- @ingroup OPERANDS Return the memory displacement width in BYTES
- @ingroup OPERANDS Return the memory displacement width in BITS
- @ingroup OPERANDS Return the raw memory displacement width in BITS(ignores scaling)
- return bytes @ingroup OPERANDS
- @ingroup OPERANDS Return the [VEX,EVEX].PP encoding value (2 bits)
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS Returns The stack address width in bits: 16/32/64.
- @ingroup OPERANDS This includes any 66 prefix that shows up even if it is ignored.
- @ingroup OPERANDS This indicates the presence of a 67 prefix.
- @ingroup OPERANDS True if there is a branch displacement
- @ingroup OPERANDS ALIAS for has_displacement(). Deprecated. See has_memory_displacement() and has_branch_displacement().
- @ingroup OPERANDS True if there is a memory or branch displacement
- @ingroup OPERANDS Return true if there is an immediate operand
- @ingroup OPERANDS Returns true if the memory operation has a valid lock prefix.
- @ingroup OPERANDS True if there is a memory displacement
- @ingroup OPERANDS Returns true if the instruction has a MODRM byte.
- @ingroup OPERANDS This does not include the cases when the 66 prefix is used an opcode-refining prefix for multibyte opcodes.
- @ingroup OPERANDS True if the instruction has a real REP prefix. This returns false if there is no F2/F3 prefix or the F2/F3 prefix is used to refine the opcode as in some SSE operations.
- @ingroup OPERANDS True if the instruction as a F3 REP prefix (used for opcode refining, for rep for string operations, or ignored).
- @ingroup OPERANDS True if the instruction as a F2 REP prefix (used for opcode refining, for rep for string operations, or ignored).
- @ingroup OPERANDS This instruction has a REX prefix with the W bit set.
- @ingroup OPERANDS
- @ingroup OPERANDS Returns true if the instruction has a SIB byte.
- @ingroup OPERANDS Initializes operand structure
- @ingroup OPERANDS Initializes dst operand structure but preserves the existing MODE/SMODE values from the src operand structure.
- @ingroup OPERANDS Initializes the operand storage and sets mode values.
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS Returns true if the instruction could be re-encoded to have a lock prefix but does not have one currently.
- @ingroup OPERANDS This is exclusive to cases whereby the 66 prefix is mandatory.
- @ingroup OPERANDS Returns true if the instruction access memory but without using a MODRM byte limiting its addressing modes.
- @ingroup OPERANDS
- @ingroup OPERANDS More tersely dump all the information about the operands to buf.
- @ingroup OPERANDS Return the segment prefix, if any, as a #xed_reg_enum_t value.
- @ingroup OPERANDS Indicate that we have an absolute branch.
- @ingroup OPERANDS
- @ingroup OPERANDS Set the branch displacement using a BYTES length
- @ingroup OPERANDS Set the branch displacement using a BITS length
- @ingroup OPERANDS width is bits 16, 32, 64
- @ingroup OPERANDS width is bits 8, 16, 32, 64
- @ingroup OPERANDS
- @ingroup OPERANDS Set the signed immediate using a BYTES length
- @ingroup OPERANDS Set the signed immediate using a BITS length
- @ingroup OPERANDS Set the unsigned immediate using a BYTE length.
- @ingroup OPERANDS Set the unsigned immediate using a BIT length.
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS Set the memory displacement using a BYTES length
- @ingroup OPERANDS Set the memory displacement using a BITS length
- takes bytes, not bits, as an argument @ingroup OPERANDS
- @ingroup OPERANDS Set the mode values
- @ingroup OPERANDS Set the operand storage field entry named ‘operand_name’ to the register value specified by ‘reg_name’.
- @ingroup OPERANDS Indicate that we have a relative branch.
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS Indicates if the default segment is being used. @param[in] p the pointer to the #xed_operand_values_t structure. @param[in] i 0 or 1, indicating which memory operation. @return true if the memory operation is using the default segment for the associated addressing mode base register.
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- @ingroup OPERANDS
- This converts strings to #xed_operand_visibility_enum_t types. @param p An enumeration element of type xed_operand_visibility_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_visibility_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC
- @ingroup DEC @param p an operand template, #xed_operand_t. @param eosz effective operand size of the instruction, 1 | 2 | 3 for 16 | 32 | 64 bits respectively. 0 is invalid. @return the actual width of operand in bits. See xed_decoded_inst_operand_length_bits() for a more general solution.
- This converts strings to #xed_operand_width_enum_t types. @param p An enumeration element of type xed_operand_width_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_operand_width_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup DEC If the operand is written, including conditional writes
- @ingroup DEC If the operand is written-only, including conditional writes
- @ingroup DEC @return The #xed_operand_element_xtype_enum_t of the operand template. This is probably not what you want.
- @ingroup ENCHL an operand storage field name and value
- Replace a relative/absolute branch displacement. The widths of original displacement and replacement must match. @param xedd A decoded instruction. @param itext The corresponding encoder output, byte array. @param disp A xed_encoder_operand_t object describing the new displacement. @returns xed_bool_t 1=success, 0=failure @ingroup ENCHLPATCH
- Replace a memory displacement. The widths of original displacement and replacement must match. @param xedd A decoded instruction. @param itext The corresponding encoder output, byte array. @param disp A xed_enc_displacement_t object describing the new displacement. @returns xed_bool_t 1=success, 0=failure @ingroup ENCHLPATCH
- Replace an imm0 immediate value. The widths of original immediate and replacement must match. @param xedd A decoded instruction. @param itext The corresponding encoder output, byte array. @param imm0 A xed_encoder_operand_t object describing the new immediate. @returns xed_bool_t 1=success, 0=failure @ingroup ENCHLPATCH
- @ingroup ENCHL a relative displacement for a PTR operand – the subsequent imm0 holds the 16b selector @param brdisp The displacement for a far pointer operand @param width_bits The width of the far pointr displacement in bits. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL a register operand @param reg A #xed_reg_enum_t register operand @returns xed_encoder_operand_t An operand.
- Returns the register class of the given input register. @ingroup REGINTFC
- This converts strings to #xed_reg_class_enum_t types. @param p An enumeration element of type xed_reg_class_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_reg_class_enum_t The last element of the enumeration. @ingroup ENUM
- This converts strings to #xed_reg_enum_t types. @param p An enumeration element of type xed_reg_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_reg_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup INIT 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.
- @ingroup ENCHL a relative branch displacement operand @param brdisp The branch displacement @param width_bits The width of the displacement in bits. Typically 8 or 32. @returns xed_encoder_operand_t An operand.
- @ingroup ENCHL To add a REP (0xF3) prefix. @param x The #xed_encoder_instruction_t being filled in.
- @ingroup DEC Take an #xed_iclass_enum_t value without a REP prefix and return the corresponding #xed_iclass_enum_t with a REP prefix. If the input instruction cannot have a REP prefix, this function returns XED_ICLASS_INVALID.
- @ingroup DEC Take an instruction with a REP/REPE/REPNE prefix and return the corresponding xed_iclass_enum_t without that prefix. The return value differs from the other functions in this group: If the input iclass does not have REP/REPNE/REPE prefix, the function returns the original instruction.
- @ingroup DEC Take an #xed_iclass_enum_t value without a REPE prefix and return the corresponding #xed_iclass_enum_t with a REPE prefix. If the input instruction cannot have have a REPE prefix, this function returns XED_ICLASS_INVALID.
- @ingroup ENCHL To add a REPNE (0xF2) prefix. @param x The #xed_encoder_instruction_t being filled in.
- @ingroup DEC Take an #xed_iclass_enum_t value without a REPNE prefix and return the corresponding #xed_iclass_enum_t with a REPNE prefix. If the input instruction cannot have a REPNE prefix, this function returns XED_ICLASS_INVALID.
- @ingroup ENCHL seg reg override for implicit suppressed memory ops
- @ingroup ENCHL seg reg override for implicit suppressed memory ops
- Set the FILE* for XED’s log msgs. This takes a FILE* as a void* because some software defines their own FILE* types creating conflicts.
- Set the verbosity level for XED
- returns the number of bytes required to store the SIGNED number x given a mask of legal lengths. For the legal_widths argument, bit 0 implies 1 byte is a legal return width, bit 1 implies that 2 bytes is a legal return width, bit 2 implies that 4 bytes is a legal return width. This returns 8 (indicating 8B) if none of the provided legal widths applies.
- returns the number of bytes required to store the UNSIGNED number x given a mask of legal lengths. For the legal_widths argument, bit 0 implies 1 byte is a legal return width, bit 1 implies that 2 bytes is a legal return width, bit 2 implies that 4 bytes is a legal return width. This returns 8 (indicating 8B) if none of the provided legal widths applies.
- arbitrary sign extension from a qty of “bits” length to 32b
- arbitrary sign extension from a qty of “bits” length to 64b
- @ingroup ENCHL an 32b signed immediate operand @param v An signed immdediate operand. @param width_bits The immediate width in bits. @returns xed_encoder_operand_t An operand.
- @ingroup FLAGS return the specific flag-action. Very detailed low level information
- @ingroup FLAGS Indicates the flags are only conditionally written. Usually MAY-writes of the flags instructions that are dependent on a REP count.
- @ingroup FLAGS the flags always written
- @ingroup FLAGS returns the number of flag-actions
- @ingroup FLAGS return union of bits for read flags
- @ingroup FLAGS return union of bits for undefined flags
- @ingroup FLAGS return union of bits for written flags
- @ingroup FLAGS print the flags
- @ingroup FLAGS boolean test to see if flags are read, scans the flags
- @ingroup FLAGS boolean test to see if flags are written, scans the flags
- return the address width @ingroup INIT
- return the machine mode @ingroup INIT
- Return the STACK address width @ingroup 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.
- 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.
- true iff the machine is in LONG_64 mode @ingroup INIT
- @ingroup INIT
- @ingroup INIT
- @ingroup INIT
- @ingroup INIT
- Set the machine mode which corresponds to the default data operand size @ingroup INIT
- set the STACK address width @ingroup INIT
- clear the xed_state_t @ingroup INIT
- returns the number of bytes remaining for the next use of #xed_strncpy() or #xed_strncat() .
- returns the number of bytes remaining for the next use of #xed_strncpy() or #xed_strncat() .
- This converts strings to #xed_syntax_enum_t types. @param p An enumeration element of type xed_syntax_enum_t. @return string @ingroup ENUM
- Returns the last element of the enumeration @return xed_syntax_enum_t The last element of the enumeration. @ingroup ENUM
- @ingroup INIT This is the call to initialize the XED encode and decode tables. It must be called once before using XED.
Type Aliases§
- @ingroup DEC The main container for instructions. After decode, it holds an array of operands with derived information from decode and also valid #xed_inst_t pointer which describes the operand templates and the operand order. See @ref DEC for API documentation.
- @param address The input address for which we want symbolic name and offset @param symbol_buffer A buffer to hold the symbol name. The callback function should fill this in and terminate with a null byte. @param buffer_length The maximum length of the symbol_buffer including then null @param offset A pointer to a xed_uint64_t to hold the offset from the provided symbol. @param context This void* pointer passed to the disassembler’s new interface so that the caller can identify the proper context against which to resolve the symbols. The disassembler passes this value to the callback. The legacy formatters that do not have context will pass zero for this parameter. @return 0 on failure, 1 on success.
- @ingroup ENC
- @ingroup ENC
- @ingroup FLAGS Associated with each flag field there can be one action.
- @ingroup FLAGS a struct representing an instruction’s default flags values
- @ingroup FLAGS a union of flags bits
- @ingroup IFORM Statically available information about iforms. Values are returned by #xed_iform_map().
- @ingroup DEC constant information about a decoded instruction form, including the pointer to the constant operand properties #xed_operand_t for this instruction form.
- @ingroup DEC Constant information about an individual generic operand, like an operand template, describing the operand properties. See @ref DEC for API information.
- @ingroup DEC The main container for instructions. After decode, it holds an array of operands with derived information from decode and also valid #xed_inst_t pointer which describes the operand templates and the operand order. See @ref DEC for API documentation.
- 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. @ingroup AGEN
- 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. @ingroup AGEN
- @ingroup FLAGS A collection of #xed_flag_action_t’s and unions of read and written flags
- 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 . @ingroup INIT
Unions§
- @ingroup FLAGS a struct representing an instruction’s default flags values
- @ingroup FLAGS a union of flags bits