Zydis v4.1.1

Loading...
Searching...
No Matches
EncoderData.h File Reference
`#include <Zycore/Defines.h>`
`#include <Zydis/Mnemonic.h>`
`#include <Zydis/SharedTypes.h>`

Go to the source code of this file.

## Data Structures
struct | ZydisEncoderLookupEntry_
| Used in encoder's primary lookup table which allows to access a set of instruction definitions for specified mnemonic in constant time. More...
struct | ZydisEncodableInstruction_
| This structure is encoder's internal representation of encodable instruction definition. More...
struct | ZydisEncoderRelInfo_
| Contains information used by instruction size prediction algorithm inside ZydisEncoderEncodeInstructionAbsolute. More...

## Typedefs
typedef enum ZydisWidthFlag_ | ZydisWidthFlag
| Used in encoder's table to represent standard ISA sizes in form of bit flags.
typedef enum ZydisMandatoryPrefix_ | ZydisMandatoryPrefix
| Used in encoder's table to represent mandatory instruction prefix.
typedef enum ZydisVectorLength_ | ZydisVectorLength
| Used in encoder's table to represent vector size supported by instruction definition.
typedef enum ZydisSizeHint_ | ZydisSizeHint
| Used in encoder's table to represent hint type supported by instruction definition.
typedef struct ZydisEncoderLookupEntry_ | ZydisEncoderLookupEntry
| Used in encoder's primary lookup table which allows to access a set of instruction definitions for specified mnemonic in constant time.
typedef struct ZydisEncodableInstruction_ | ZydisEncodableInstruction
| This structure is encoder's internal representation of encodable instruction definition.
typedef struct ZydisEncoderRelInfo_ | ZydisEncoderRelInfo
| Contains information used by instruction size prediction algorithm inside ZydisEncoderEncodeInstructionAbsolute.

## Enumerations
enum | ZydisWidthFlag_ { ZYDIS_WIDTH_INVALID = 0x00 , ZYDIS_WIDTH_16 = 0x01 , ZYDIS_WIDTH_32 = 0x02 , ZYDIS_WIDTH_64 = 0x04 , ZYDIS_WIDTH_MAX_VALUE = (ZYDIS_WIDTH_64 | (ZYDIS_WIDTH_64 - 1)) , ZYDIS_WIDTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_WIDTH_MAX_VALUE) }
| Used in encoder's table to represent standard ISA sizes in form of bit flags. More...
enum | ZydisMandatoryPrefix_ { ZYDIS_MANDATORY_PREFIX_NONE , ZYDIS_MANDATORY_PREFIX_66 , ZYDIS_MANDATORY_PREFIX_F2 , ZYDIS_MANDATORY_PREFIX_F3 , ZYDIS_MANDATORY_PREFIX_MAX_VALUE = ZYDIS_MANDATORY_PREFIX_F3 , ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MANDATORY_PREFIX_MAX_VALUE) }
| Used in encoder's table to represent mandatory instruction prefix. More...
enum | ZydisVectorLength_ { ZYDIS_VECTOR_LENGTH_INVALID , ZYDIS_VECTOR_LENGTH_128 , ZYDIS_VECTOR_LENGTH_256 , ZYDIS_VECTOR_LENGTH_512 , ZYDIS_VECTOR_LENGTH_MAX_VALUE = ZYDIS_VECTOR_LENGTH_512 , ZYDIS_VECTOR_LENGTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_VECTOR_LENGTH_MAX_VALUE) }
| Used in encoder's table to represent vector size supported by instruction definition. More...
enum | ZydisSizeHint_ { ZYDIS_SIZE_HINT_NONE , ZYDIS_SIZE_HINT_ASZ , ZYDIS_SIZE_HINT_OSZ , ZYDIS_SIZE_HINT_MAX_VALUE = ZYDIS_SIZE_HINT_OSZ , ZYDIS_SIZE_HINT_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SIZE_HINT_MAX_VALUE) }
| Used in encoder's table to represent hint type supported by instruction definition. More...

## Functions
ZyanU8 | ZydisGetEncodableInstructions (ZydisMnemonic mnemonic, const ZydisEncodableInstruction **instruction)
| Fetches array of ZydisEncodableInstruction structures and its size for given instruction mnemonic.
const ZydisEncoderRelInfo * | ZydisGetRelInfo (ZydisMnemonic mnemonic)
| Fetches ZydisEncoderRelInfo record for given instruction mnemonic.

## Typedef Documentation

## ◆ ZydisEncodableInstruction

typedef struct ZydisEncodableInstruction_ ZydisEncodableInstruction

This structure is encoder's internal representation of encodable instruction definition.

## ◆ ZydisEncoderLookupEntry

typedef struct ZydisEncoderLookupEntry_ ZydisEncoderLookupEntry

Used in encoder's primary lookup table which allows to access a set of instruction definitions for specified mnemonic in constant time.

## ◆ ZydisEncoderRelInfo

typedef struct ZydisEncoderRelInfo_ ZydisEncoderRelInfo

Contains information used by instruction size prediction algorithm inside ZydisEncoderEncodeInstructionAbsolute.

## ◆ ZydisMandatoryPrefix

typedef enum ZydisMandatoryPrefix_ ZydisMandatoryPrefix

Used in encoder's table to represent mandatory instruction prefix.

Using this enum instead of actual prefix value saves space.

## ◆ ZydisSizeHint

typedef enum ZydisSizeHint_ ZydisSizeHint

Used in encoder's table to represent hint type supported by instruction definition.

## ◆ ZydisVectorLength

typedef enum ZydisVectorLength_ ZydisVectorLength

Used in encoder's table to represent vector size supported by instruction definition.

## ◆ ZydisWidthFlag

typedef enum ZydisWidthFlag_ ZydisWidthFlag

Used in encoder's table to represent standard ISA sizes in form of bit flags.

## Enumeration Type Documentation

## ◆ ZydisMandatoryPrefix_

enum ZydisMandatoryPrefix_

Used in encoder's table to represent mandatory instruction prefix.

Using this enum instead of actual prefix value saves space.

Enumerator
ZYDIS_MANDATORY_PREFIX_NONE |
ZYDIS_MANDATORY_PREFIX_66 |
ZYDIS_MANDATORY_PREFIX_F2 |
ZYDIS_MANDATORY_PREFIX_F3 |
ZYDIS_MANDATORY_PREFIX_MAX_VALUE | Maximum value of this enum.
ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS | The minimum number of bits required to represent all values of this enum.

## ◆ ZydisSizeHint_

enum ZydisSizeHint_

Used in encoder's table to represent hint type supported by instruction definition.

Enumerator
ZYDIS_SIZE_HINT_NONE |
ZYDIS_SIZE_HINT_ASZ |
ZYDIS_SIZE_HINT_OSZ |
ZYDIS_SIZE_HINT_MAX_VALUE | Maximum value of this enum.
ZYDIS_SIZE_HINT_REQUIRED_BITS | The minimum number of bits required to represent all values of this enum.

## ◆ ZydisVectorLength_

enum ZydisVectorLength_

Used in encoder's table to represent vector size supported by instruction definition.

Enumerator
ZYDIS_VECTOR_LENGTH_INVALID |
ZYDIS_VECTOR_LENGTH_128 |
ZYDIS_VECTOR_LENGTH_256 |
ZYDIS_VECTOR_LENGTH_512 |
ZYDIS_VECTOR_LENGTH_MAX_VALUE | Maximum value of this enum.
ZYDIS_VECTOR_LENGTH_REQUIRED_BITS | The minimum number of bits required to represent all values of this enum.

## ◆ ZydisWidthFlag_

enum ZydisWidthFlag_

Used in encoder's table to represent standard ISA sizes in form of bit flags.

Enumerator
ZYDIS_WIDTH_INVALID |
ZYDIS_WIDTH_16 |
ZYDIS_WIDTH_32 |
ZYDIS_WIDTH_64 |
ZYDIS_WIDTH_MAX_VALUE | Maximum value of this enum.
ZYDIS_WIDTH_REQUIRED_BITS | The minimum number of bits required to represent all values of this enum.

## Function Documentation

## ◆ ZydisGetEncodableInstructions()

ZyanU8 ZydisGetEncodableInstructions | ( | ZydisMnemonic | mnemonic,
|  | const ZydisEncodableInstruction ** | instruction )

Fetches array of ZydisEncodableInstruction structures and its size for given instruction mnemonic.

Parameters

  mnemonic | Instruction mnemonic.
  instruction | This variable will receive a pointer to the array of ZydisEncodableInstruction structures.

Returns
  Entry count (0 if function failed).

## ◆ ZydisGetRelInfo()

const ZydisEncoderRelInfo * ZydisGetRelInfo | ( | ZydisMnemonic | mnemonic | ) |

Fetches ZydisEncoderRelInfo record for given instruction mnemonic.

Parameters

  mnemonic | Instruction mnemonic.

Returns
  Pointer to ZydisEncoderRelInfo structure or ZYAN_NULL if instruction doesn't have relative operands.