Zydis  v2.0.2
SharedTypes.h File Reference

Defines decoder/encoder-shared macros and types. More...

Include dependency graph for SharedTypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZYDIS_MAX_INSTRUCTION_LENGTH   15
 
#define ZYDIS_MAX_OPERAND_COUNT   10
 

Typedefs

typedef ZydisU8 ZydisMachineMode
 Defines the ZydisMachineMode datatype. More...
 
typedef ZydisU8 ZydisAddressWidth
 Defines the ZydisAddressWidth datatype. More...
 
typedef ZydisU8 ZydisElementType
 Defines the ZydisElementType datatype. More...
 
typedef ZydisU16 ZydisElementSize
 Defines the ZydisElementSize datatype. More...
 
typedef ZydisU8 ZydisOperandType
 Defines the ZydisOperandType datatype. More...
 
typedef ZydisU8 ZydisOperandEncoding
 Defines the ZydisOperandEncoding datatype. More...
 
typedef ZydisU8 ZydisOperandVisibility
 Defines the ZydisOperandVisibility datatype. More...
 
typedef ZydisU8 ZydisOperandAction
 Defines the ZydisOperandAction datatype. More...
 
typedef ZydisU8 ZydisInstructionEncoding
 Defines the ZydisInstructionEncoding datatype. More...
 
typedef ZydisU8 ZydisOpcodeMap
 Defines the ZydisOpcodeMap map. More...
 

Enumerations

enum  ZydisMachineModes {
  ZYDIS_MACHINE_MODE_INVALID , ZYDIS_MACHINE_MODE_LONG_64 , ZYDIS_MACHINE_MODE_LONG_COMPAT_32 , ZYDIS_MACHINE_MODE_LONG_COMPAT_16 ,
  ZYDIS_MACHINE_MODE_LEGACY_32 , ZYDIS_MACHINE_MODE_LEGACY_16 , ZYDIS_MACHINE_MODE_REAL_16 , ZYDIS_MACHINE_MODE_MAX_VALUE = ZYDIS_MACHINE_MODE_REAL_16
}
 Values that represent machine modes. More...
 
enum  ZydisAddressWidths {
  ZYDIS_ADDRESS_WIDTH_INVALID = 0 , ZYDIS_ADDRESS_WIDTH_16 = 16 , ZYDIS_ADDRESS_WIDTH_32 = 32 , ZYDIS_ADDRESS_WIDTH_64 = 64 ,
  ZYDIS_ADDRESS_WIDTH_MAX_VALUE = ZYDIS_ADDRESS_WIDTH_64
}
 Values that represent address widths. More...
 
enum  ZydisElementTypes {
  ZYDIS_ELEMENT_TYPE_INVALID , ZYDIS_ELEMENT_TYPE_STRUCT , ZYDIS_ELEMENT_TYPE_UINT , ZYDIS_ELEMENT_TYPE_INT ,
  ZYDIS_ELEMENT_TYPE_FLOAT16 , ZYDIS_ELEMENT_TYPE_FLOAT32 , ZYDIS_ELEMENT_TYPE_FLOAT64 , ZYDIS_ELEMENT_TYPE_FLOAT80 ,
  ZYDIS_ELEMENT_TYPE_LONGBCD , ZYDIS_ELEMENT_TYPE_MAX_VALUE = ZYDIS_ELEMENT_TYPE_LONGBCD
}
 Values that represent element-types. More...
 
enum  ZydisOperandTypes {
  ZYDIS_OPERAND_TYPE_UNUSED , ZYDIS_OPERAND_TYPE_REGISTER , ZYDIS_OPERAND_TYPE_MEMORY , ZYDIS_OPERAND_TYPE_POINTER ,
  ZYDIS_OPERAND_TYPE_IMMEDIATE , ZYDIS_OPERAND_TYPE_MAX_VALUE = ZYDIS_OPERAND_TYPE_IMMEDIATE
}
 Values that represent operand-types. More...
 
enum  ZydisOperandEncodings {
  ZYDIS_OPERAND_ENCODING_NONE , ZYDIS_OPERAND_ENCODING_MODRM_REG , ZYDIS_OPERAND_ENCODING_MODRM_RM , ZYDIS_OPERAND_ENCODING_OPCODE ,
  ZYDIS_OPERAND_ENCODING_NDSNDD , ZYDIS_OPERAND_ENCODING_IS4 , ZYDIS_OPERAND_ENCODING_MASK , ZYDIS_OPERAND_ENCODING_DISP8 ,
  ZYDIS_OPERAND_ENCODING_DISP16 , ZYDIS_OPERAND_ENCODING_DISP32 , ZYDIS_OPERAND_ENCODING_DISP64 , ZYDIS_OPERAND_ENCODING_DISP16_32_64 ,
  ZYDIS_OPERAND_ENCODING_DISP32_32_64 , ZYDIS_OPERAND_ENCODING_DISP16_32_32 , ZYDIS_OPERAND_ENCODING_UIMM8 , ZYDIS_OPERAND_ENCODING_UIMM16 ,
  ZYDIS_OPERAND_ENCODING_UIMM32 , ZYDIS_OPERAND_ENCODING_UIMM64 , ZYDIS_OPERAND_ENCODING_UIMM16_32_64 , ZYDIS_OPERAND_ENCODING_UIMM32_32_64 ,
  ZYDIS_OPERAND_ENCODING_UIMM16_32_32 , ZYDIS_OPERAND_ENCODING_SIMM8 , ZYDIS_OPERAND_ENCODING_SIMM16 , ZYDIS_OPERAND_ENCODING_SIMM32 ,
  ZYDIS_OPERAND_ENCODING_SIMM64 , ZYDIS_OPERAND_ENCODING_SIMM16_32_64 , ZYDIS_OPERAND_ENCODING_SIMM32_32_64 , ZYDIS_OPERAND_ENCODING_SIMM16_32_32 ,
  ZYDIS_OPERAND_ENCODING_JIMM8 , ZYDIS_OPERAND_ENCODING_JIMM16 , ZYDIS_OPERAND_ENCODING_JIMM32 , ZYDIS_OPERAND_ENCODING_JIMM64 ,
  ZYDIS_OPERAND_ENCODING_JIMM16_32_64 , ZYDIS_OPERAND_ENCODING_JIMM32_32_64 , ZYDIS_OPERAND_ENCODING_JIMM16_32_32 , ZYDIS_OPERAND_ENCODING_MAX_VALUE = ZYDIS_OPERAND_ENCODING_JIMM16_32_32
}
 Values that represent operand-encodings. More...
 
enum  ZydisOperandVisibilities {
  ZYDIS_OPERAND_VISIBILITY_INVALID , ZYDIS_OPERAND_VISIBILITY_EXPLICIT , ZYDIS_OPERAND_VISIBILITY_IMPLICIT , ZYDIS_OPERAND_VISIBILITY_HIDDEN ,
  ZYDIS_OPERAND_VISIBILITY_MAX_VALUE = ZYDIS_OPERAND_VISIBILITY_HIDDEN
}
 Values that represent operand-visibilities. More...
 
enum  ZydisOperandActions {
  ZYDIS_OPERAND_ACTION_INVALID , ZYDIS_OPERAND_ACTION_READ , ZYDIS_OPERAND_ACTION_WRITE , ZYDIS_OPERAND_ACTION_READWRITE ,
  ZYDIS_OPERAND_ACTION_CONDREAD , ZYDIS_OPERAND_ACTION_CONDWRITE , ZYDIS_OPERAND_ACTION_READ_CONDWRITE , ZYDIS_OPERAND_ACTION_CONDREAD_WRITE ,
  ZYDIS_OPERAND_ACTION_MASK_WRITE , ZYDIS_OPERAND_ACTION_MASK_READ , ZYDIS_OPERAND_ACTION_MAX_VALUE = ZYDIS_OPERAND_ACTION_CONDREAD_WRITE
}
 Values that represent operand-actions. More...
 
enum  ZydisInstructionEncodings {
  ZYDIS_INSTRUCTION_ENCODING_INVALID , ZYDIS_INSTRUCTION_ENCODING_DEFAULT , ZYDIS_INSTRUCTION_ENCODING_3DNOW , ZYDIS_INSTRUCTION_ENCODING_XOP ,
  ZYDIS_INSTRUCTION_ENCODING_VEX , ZYDIS_INSTRUCTION_ENCODING_EVEX , ZYDIS_INSTRUCTION_ENCODING_MVEX , ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE = ZYDIS_INSTRUCTION_ENCODING_MVEX
}
 Values that represent instruction-encodings. More...
 
enum  ZydisOpcodeMaps {
  ZYDIS_OPCODE_MAP_DEFAULT , ZYDIS_OPCODE_MAP_0F , ZYDIS_OPCODE_MAP_0F38 , ZYDIS_OPCODE_MAP_0F3A ,
  ZYDIS_OPCODE_MAP_0F0F , ZYDIS_OPCODE_MAP_XOP8 , ZYDIS_OPCODE_MAP_XOP9 , ZYDIS_OPCODE_MAP_XOPA ,
  ZYDIS_OPCODE_MAP_MAX_VALUE = ZYDIS_OPCODE_MAP_XOPA
}
 Values that represent opcode-maps. More...
 

Detailed Description

Defines decoder/encoder-shared macros and types.

Macro Definition Documentation

◆ ZYDIS_MAX_INSTRUCTION_LENGTH

#define ZYDIS_MAX_INSTRUCTION_LENGTH   15

◆ ZYDIS_MAX_OPERAND_COUNT

#define ZYDIS_MAX_OPERAND_COUNT   10

Typedef Documentation

◆ ZydisAddressWidth

Defines the ZydisAddressWidth datatype.

◆ ZydisElementSize

Defines the ZydisElementSize datatype.

◆ ZydisElementType

Defines the ZydisElementType datatype.

◆ ZydisInstructionEncoding

Defines the ZydisInstructionEncoding datatype.

◆ ZydisMachineMode

Defines the ZydisMachineMode datatype.

◆ ZydisOpcodeMap

Defines the ZydisOpcodeMap map.

◆ ZydisOperandAction

Defines the ZydisOperandAction datatype.

◆ ZydisOperandEncoding

Defines the ZydisOperandEncoding datatype.

◆ ZydisOperandType

Defines the ZydisOperandType datatype.

◆ ZydisOperandVisibility

Defines the ZydisOperandVisibility datatype.

Enumeration Type Documentation

◆ ZydisAddressWidths

Values that represent address widths.

Enumerator
ZYDIS_ADDRESS_WIDTH_INVALID 
ZYDIS_ADDRESS_WIDTH_16 
ZYDIS_ADDRESS_WIDTH_32 
ZYDIS_ADDRESS_WIDTH_64 
ZYDIS_ADDRESS_WIDTH_MAX_VALUE 

Maximum value of this enum.

◆ ZydisElementTypes

Values that represent element-types.

Enumerator
ZYDIS_ELEMENT_TYPE_INVALID 
ZYDIS_ELEMENT_TYPE_STRUCT 
ZYDIS_ELEMENT_TYPE_UINT 
ZYDIS_ELEMENT_TYPE_INT 
ZYDIS_ELEMENT_TYPE_FLOAT16 
ZYDIS_ELEMENT_TYPE_FLOAT32 
ZYDIS_ELEMENT_TYPE_FLOAT64 
ZYDIS_ELEMENT_TYPE_FLOAT80 
ZYDIS_ELEMENT_TYPE_LONGBCD 
ZYDIS_ELEMENT_TYPE_MAX_VALUE 

Maximum value of this enum.

◆ ZydisInstructionEncodings

Values that represent instruction-encodings.

Enumerator
ZYDIS_INSTRUCTION_ENCODING_INVALID 
ZYDIS_INSTRUCTION_ENCODING_DEFAULT 

The instruction uses the default encoding.

ZYDIS_INSTRUCTION_ENCODING_3DNOW 

The instruction uses the AMD 3DNow-encoding.

ZYDIS_INSTRUCTION_ENCODING_XOP 

The instruction uses the AMD XOP-encoding.

ZYDIS_INSTRUCTION_ENCODING_VEX 

The instruction uses the VEX-encoding.

ZYDIS_INSTRUCTION_ENCODING_EVEX 

The instruction uses the EVEX-encoding.

ZYDIS_INSTRUCTION_ENCODING_MVEX 

The instruction uses the MVEX-encoding.

ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE 

Maximum value of this enum.

◆ ZydisMachineModes

Values that represent machine modes.

Enumerator
ZYDIS_MACHINE_MODE_INVALID 
ZYDIS_MACHINE_MODE_LONG_64 

64 bit mode.

ZYDIS_MACHINE_MODE_LONG_COMPAT_32 

32 bit protected mode.

ZYDIS_MACHINE_MODE_LONG_COMPAT_16 

16 bit protected mode.

ZYDIS_MACHINE_MODE_LEGACY_32 

32 bit protected mode.

ZYDIS_MACHINE_MODE_LEGACY_16 

16 bit protected mode.

ZYDIS_MACHINE_MODE_REAL_16 

16 bit real mode.

ZYDIS_MACHINE_MODE_MAX_VALUE 

Maximum value of this enum.

◆ ZydisOpcodeMaps

Values that represent opcode-maps.

Enumerator
ZYDIS_OPCODE_MAP_DEFAULT 
ZYDIS_OPCODE_MAP_0F 
ZYDIS_OPCODE_MAP_0F38 
ZYDIS_OPCODE_MAP_0F3A 
ZYDIS_OPCODE_MAP_0F0F 
ZYDIS_OPCODE_MAP_XOP8 
ZYDIS_OPCODE_MAP_XOP9 
ZYDIS_OPCODE_MAP_XOPA 
ZYDIS_OPCODE_MAP_MAX_VALUE 

Maximum value of this enum.

◆ ZydisOperandActions

Values that represent operand-actions.

Enumerator
ZYDIS_OPERAND_ACTION_INVALID 
ZYDIS_OPERAND_ACTION_READ 

The operand is read by the instruction.

ZYDIS_OPERAND_ACTION_WRITE 

The operand is written by the instruction (must write).

ZYDIS_OPERAND_ACTION_READWRITE 

The operand is read and written by the instruction (must write).

ZYDIS_OPERAND_ACTION_CONDREAD 

The operand is conditionally read by the instruction.

ZYDIS_OPERAND_ACTION_CONDWRITE 

The operand is conditionally written by the instruction (may write).

ZYDIS_OPERAND_ACTION_READ_CONDWRITE 

The operand is read and conditionally written by the instruction (may write).

ZYDIS_OPERAND_ACTION_CONDREAD_WRITE 

The operand is written and conditionally read by the instruction (must write).

ZYDIS_OPERAND_ACTION_MASK_WRITE 

Mask combining all writing access flags.

ZYDIS_OPERAND_ACTION_MASK_READ 

Mask combining all reading access flags.

ZYDIS_OPERAND_ACTION_MAX_VALUE 

Maximum value of this enum.

◆ ZydisOperandEncodings

Values that represent operand-encodings.

Enumerator
ZYDIS_OPERAND_ENCODING_NONE 
ZYDIS_OPERAND_ENCODING_MODRM_REG 
ZYDIS_OPERAND_ENCODING_MODRM_RM 
ZYDIS_OPERAND_ENCODING_OPCODE 
ZYDIS_OPERAND_ENCODING_NDSNDD 
ZYDIS_OPERAND_ENCODING_IS4 
ZYDIS_OPERAND_ENCODING_MASK 
ZYDIS_OPERAND_ENCODING_DISP8 
ZYDIS_OPERAND_ENCODING_DISP16 
ZYDIS_OPERAND_ENCODING_DISP32 
ZYDIS_OPERAND_ENCODING_DISP64 
ZYDIS_OPERAND_ENCODING_DISP16_32_64 
ZYDIS_OPERAND_ENCODING_DISP32_32_64 
ZYDIS_OPERAND_ENCODING_DISP16_32_32 
ZYDIS_OPERAND_ENCODING_UIMM8 
ZYDIS_OPERAND_ENCODING_UIMM16 
ZYDIS_OPERAND_ENCODING_UIMM32 
ZYDIS_OPERAND_ENCODING_UIMM64 
ZYDIS_OPERAND_ENCODING_UIMM16_32_64 
ZYDIS_OPERAND_ENCODING_UIMM32_32_64 
ZYDIS_OPERAND_ENCODING_UIMM16_32_32 
ZYDIS_OPERAND_ENCODING_SIMM8 
ZYDIS_OPERAND_ENCODING_SIMM16 
ZYDIS_OPERAND_ENCODING_SIMM32 
ZYDIS_OPERAND_ENCODING_SIMM64 
ZYDIS_OPERAND_ENCODING_SIMM16_32_64 
ZYDIS_OPERAND_ENCODING_SIMM32_32_64 
ZYDIS_OPERAND_ENCODING_SIMM16_32_32 
ZYDIS_OPERAND_ENCODING_JIMM8 
ZYDIS_OPERAND_ENCODING_JIMM16 
ZYDIS_OPERAND_ENCODING_JIMM32 
ZYDIS_OPERAND_ENCODING_JIMM64 
ZYDIS_OPERAND_ENCODING_JIMM16_32_64 
ZYDIS_OPERAND_ENCODING_JIMM32_32_64 
ZYDIS_OPERAND_ENCODING_JIMM16_32_32 
ZYDIS_OPERAND_ENCODING_MAX_VALUE 

Maximum value of this enum.

◆ ZydisOperandTypes

Values that represent operand-types.

Enumerator
ZYDIS_OPERAND_TYPE_UNUSED 

The operand is not used.

ZYDIS_OPERAND_TYPE_REGISTER 

The operand is a register operand.

ZYDIS_OPERAND_TYPE_MEMORY 

The operand is a memory operand.

ZYDIS_OPERAND_TYPE_POINTER 

The operand is a pointer operand with a segment:offset lvalue.

ZYDIS_OPERAND_TYPE_IMMEDIATE 

The operand is an immediate operand.

ZYDIS_OPERAND_TYPE_MAX_VALUE 

Maximum value of this enum.

◆ ZydisOperandVisibilities

Values that represent operand-visibilities.

Enumerator
ZYDIS_OPERAND_VISIBILITY_INVALID 
ZYDIS_OPERAND_VISIBILITY_EXPLICIT 

The operand is explicitly encoded in the instruction.

ZYDIS_OPERAND_VISIBILITY_IMPLICIT 

The operand is part of the opcode, but listed as an operand.

ZYDIS_OPERAND_VISIBILITY_HIDDEN 

The operand is part of the opcode, and not typically listed as an operand.

ZYDIS_OPERAND_VISIBILITY_MAX_VALUE 

Maximum value of this enum.