Zydis  v2.0
Data Fields
ZydisDecodedInstruction_ Struct Reference

Defines the ZydisDecodedInstruction struct. More...

#include <DecoderTypes.h>

Data Fields

ZydisMachineMode machine_mode
 The machine mode used to decode this instruction.
 
ZydisMnemonic mnemonic
 The instruction-mnemonic.
 
ZyanU8 length
 The length of the decoded instruction.
 
ZyanU8 data [ZYDIS_MAX_INSTRUCTION_LENGTH]
 The raw bytes of the decoded instruction. More...
 
ZydisInstructionEncoding encoding
 The instruction-encoding (default, 3DNow, VEX, EVEX, XOP).
 
ZydisOpcodeMap opcode_map
 The opcode-map.
 
ZyanU8 opcode
 The instruction-opcode.
 
ZyanU8 stack_width
 The stack width.
 
ZyanU8 operand_width
 The effective operand width.
 
ZyanU8 address_width
 The effective address width.
 
ZyanU8 operand_count
 The number of instruction-operands.
 
ZydisDecodedOperand operands [ZYDIS_MAX_OPERAND_COUNT]
 Detailed info for all instruction operands.
 
ZydisInstructionAttributes attributes
 Instruction attributes.
 
struct {
   ZydisCPUFlagAction   action
 The CPU-flag action. More...
 
accessedFlags [ZYDIS_CPUFLAG_MAX_VALUE+1]
 Information about accessed CPU flags.
 
struct {
   ZyanU16   vector_length
 The AVX vector-length.
 
   struct {
      ZydisMaskMode   mode
 The masking mode.
 
      ZydisRegister   reg
 The mask register.
 
   }   mask
 Info about the embedded writemask-register (AVX-512 and KNC only).
 
   struct {
      ZyanBool   is_static
 Signals, if the broadcast is a static broadcast. More...
 
      ZydisBroadcastMode   mode
 The AVX broadcast-mode.
 
   }   broadcast
 Contains info about the AVX broadcast.
 
   struct {
      ZydisRoundingMode   mode
 The AVX rounding-mode.
 
   }   rounding
 Contains info about the AVX rounding.
 
   struct {
      ZydisSwizzleMode   mode
 The AVX register-swizzle mode.
 
   }   swizzle
 Contains info about the AVX register-swizzle (KNC only).
 
   struct {
      ZydisConversionMode   mode
 The AVX data-conversion mode.
 
   }   conversion
 Contains info about the AVX data-conversion (KNC only).
 
   ZyanBool   has_SAE
 Signals, if the sae functionality is enabled for the instruction.
 
   ZyanBool   has_eviction_hint
 Signals, if the instruction has a memory eviction-hint (KNC only).
 
avx
 Extended info for AVX instructions.
 
struct {
   ZydisInstructionCategory   category
 The instruction category.
 
   ZydisISASet   isa_set
 The ISA-set.
 
   ZydisISAExt   isa_ext
 The ISA-set extension.
 
   ZydisExceptionClass   exception_class
 The exception class.
 
meta
 Meta info.
 
struct {
   struct {
      ZyanU8   data [ZYDIS_MAX_INSTRUCTION_LENGTH - 1]
 
      ZyanU8   count
 
      ZyanU8   hasF0
 
      ZyanU8   hasF3
 
      ZyanU8   hasF2
 
      ZyanU8   has2E
 
      ZyanU8   has36
 
      ZyanU8   has3E
 
      ZyanU8   has26
 
      ZyanU8   has64
 
      ZyanU8   has65
 
      ZyanU8   has66
 
      ZyanU8   has67
 
   }   prefixes
 Detailed info about the legacy prefixes.
 
   struct {
      ZyanBool   is_decoded
 ZYAN_TRUE if the prefix got already decoded.
 
      ZyanU8   data [1]
 The raw bytes of the prefix.
 
      ZyanU8   W
 64-bit operand-size promotion.
 
      ZyanU8   R
 Extension of the ModRM.reg field.
 
      ZyanU8   X
 Extension of the SIB.index field.
 
      ZyanU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field.
 
   }   rex
 Detailed info about the REX-prefix.
 
   struct {
      ZyanBool   is_decoded
 ZYAN_TRUE if the prefix got already decoded.
 
      ZyanU8   data [3]
 The raw bytes of the prefix.
 
      ZyanU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZyanU8   X
 Extension of the SIB.index field (inverted).
 
      ZyanU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
 
      ZyanU8   m_mmmm
 Opcode-map specifier.
 
      ZyanU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZyanU8   vvvv
 NDS register specifier (inverted).
 
      ZyanU8   L
 Vector-length specifier.
 
      ZyanU8   pp
 Compressed legacy prefix.
 
   }   xop
 Detailed info about the XOP-prefix.
 
   struct {
      ZyanBool   is_decoded
 ZYAN_TRUE if the prefix got already decoded.
 
      ZyanU8   data [3]
 The raw bytes of the prefix.
 
      ZyanU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZyanU8   X
 Extension of the SIB.index field (inverted).
 
      ZyanU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
 
      ZyanU8   m_mmmm
 Opcode-map specifier.
 
      ZyanU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZyanU8   vvvv
 NDS register specifier (inverted).
 
      ZyanU8   L
 Vector-length specifier.
 
      ZyanU8   pp
 Compressed legacy prefix.
 
   }   vex
 Detailed info about the VEX-prefix.
 
   struct {
      ZyanBool   is_decoded
 ZYAN_TRUE if the prefix got already decoded.
 
      ZyanU8   data [4]
 The raw bytes of the prefix.
 
      ZyanU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZyanU8   X
 Extension of the SIB.index/vidx field (inverted).
 
      ZyanU8   B
 Extension of the ModRM.rm or SIB.base field (inverted).
 
      ZyanU8   R2
 High-16 register specifier modifier (inverted).
 
      ZyanU8   mm
 Opcode-map specifier.
 
      ZyanU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZyanU8   vvvv
 NDS register specifier (inverted).
 
      ZyanU8   pp
 Compressed legacy prefix.
 
      ZyanU8   z
 Zeroing/Merging.
 
      ZyanU8   L2
 Vector-length specifier or rounding-control (most significant bit).
 
      ZyanU8   L
 Vector-length specifier or rounding-control (least significant bit).
 
      ZyanU8   b
 Broadcast/RC/SAE Context.
 
      ZyanU8   V2
 High-16 NDS/VIDX register specifier.
 
      ZyanU8   aaa
 Embedded opmask register specifier.
 
   }   evex
 Detailed info about the EVEX-prefix.
 
   struct {
      ZyanBool   is_decoded
 ZYAN_TRUE if the prefix got already decoded.
 
      ZyanU8   data [4]
 The raw bytes of the prefix.
 
      ZyanU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZyanU8   X
 Extension of the SIB.index/vidx field (inverted).
 
      ZyanU8   B
 Extension of the ModRM.rm or SIB.base field (inverted).
 
      ZyanU8   R2
 High-16 register specifier modifier (inverted).
 
      ZyanU8   mmmm
 Opcode-map specifier.
 
      ZyanU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZyanU8   vvvv
 NDS register specifier (inverted).
 
      ZyanU8   pp
 Compressed legacy prefix.
 
      ZyanU8   E
 Non-temporal/eviction hint.
 
      ZyanU8   SSS
 Swizzle/broadcast/up-convert/down-convert/static-rounding controls.
 
      ZyanU8   V2
 High-16 NDS/VIDX register specifier.
 
      ZyanU8   kkk
 Embedded opmask register specifier.
 
   }   mvex
 Detailed info about the MVEX-prefix.
 
   struct {
      ZyanBool   is_decoded
 
      ZyanU8   data [1]
 
      ZyanU8   mod
 
      ZyanU8   reg
 
      ZyanU8   rm
 
   }   modrm
 Detailed info about the ModRM-byte.
 
   struct {
      ZyanBool   is_decoded
 
      ZyanU8   data [1]
 
      ZyanU8   scale
 
      ZyanU8   index
 
      ZyanU8   base
 
   }   sib
 Detailed info about the SIB-byte.
 
   struct {
      ZyanI64   value
 The displacement value.
 
      ZyanU8   size
 The physical displacement size, in bits.
 
      ZyanU8   offset
 The offset of the displacement data, relative to the beginning of the instruction, in bytes.
 
   }   disp
 Detailed info about displacement-bytes.
 
   struct {
      ZyanBool   is_signed
 Signals, if the immediate value is signed.
 
      ZyanBool   is_relative
 Signals, if the immediate value contains a relative offset. You can use ZydisCalcAbsoluteAddress to determine the absolute address value.
 
      union {
         ZyanU64   u
 
         ZyanI64   s
 
      }   value
 The immediate value.
 
      ZyanU8   size
 The physical immediate size, in bits.
 
      ZyanU8   offset
 The offset of the immediate data, relative to the beginning of the instruction, in bytes.
 
   }   imm [2]
 Detailed info about immediate-bytes.
 
raw
 Extended info about different instruction-parts like ModRM, SIB or encoding-prefixes.
 

Detailed Description

Defines the ZydisDecodedInstruction struct.

Field Documentation

◆ action

The CPU-flag action.

You can call ZydisGetAccessedFlagsByAction to get a mask with all flags matching a specific action.

◆ B

ZyanU8 B

Extension of the ModRM.rm, SIB.base, or opcode.reg field.

Extension of the ModRM.rm or SIB.base field (inverted).

Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).

◆ data

ZyanU8 data[1]

The raw bytes of the decoded instruction.

The raw bytes of the prefix.

◆ is_static

ZyanBool is_static

Signals, if the broadcast is a static broadcast.

This is the case for instructions with inbuild broadcast functionality, that is always active controlled by the EVEX/MVEX.RC bits.

◆ L

ZyanU8 L

Vector-length specifier.

Vector-length specifier or rounding-control (least significant bit).

◆ offset

ZyanU8 offset

The offset of the displacement data, relative to the beginning of the instruction, in bytes.

The offset of the immediate data, relative to the beginning of the instruction, in bytes.

◆ R

ZyanU8 R

Extension of the ModRM.reg field.

Extension of the ModRM.reg field (inverted).

◆ size

ZyanU8 size

The physical displacement size, in bits.

The physical immediate size, in bits.

◆ W

ZyanU8 W

64-bit operand-size promotion.

64-bit operand-size promotion or opcode-extension.

◆ X

ZyanU8 X

Extension of the SIB.index field.

Extension of the SIB.index/vidx field (inverted).

Extension of the SIB.index field (inverted).


The documentation for this struct was generated from the following file: