Zydis  v2.0.2
ZydisDecodedInstruction_ Struct Reference

Defines the ZydisDecodedInstruction struct. More...

#include <DecoderTypes.h>

Collaboration diagram for ZydisDecodedInstruction_:

Data Fields

ZydisMachineMode machineMode
 The machine mode used to decode this instruction.
 
ZydisMnemonic mnemonic
 The instruction-mnemonic.
 
ZydisU8 length
 The length of the decoded instruction.
 
ZydisU8 data [ZYDIS_MAX_INSTRUCTION_LENGTH]
 The raw bytes of the decoded instruction. More...
 
ZydisInstructionEncoding encoding
 The instruction-encoding (default, 3DNow, VEX, EVEX, XOP).
 
ZydisOpcodeMap opcodeMap
 The opcode-map.
 
ZydisU8 opcode
 The instruction-opcode.
 
ZydisU8 stackWidth
 The stack width.
 
ZydisU8 operandWidth
 The effective operand width.
 
ZydisU8 addressWidth
 The effective address width.
 
ZydisU8 operandCount
 The number of instruction-operands.
 
ZydisDecodedOperand operands [ZYDIS_MAX_OPERAND_COUNT]
 Detailed info for all instruction operands.
 
ZydisInstructionAttributes attributes
 Instruction attributes.
 
ZydisU64 instrAddress
 The instruction address points at the current instruction (based on the initial instruction pointer).
 
struct {
   ZydisCPUFlagAction   action
 The CPU-flag action. More...
 
accessedFlags [ZYDIS_CPUFLAG_MAX_VALUE+1]
 Information about accessed CPU flags.
 
struct {
   ZydisVectorLength   vectorLength
 The AVX vector-length.
 
   struct {
      ZydisMaskMode   mode
 The masking mode.
 
      ZydisRegister   reg
 The mask register.
 
      ZydisBool   isControlMask
 Signals, if the mask-register is used as a control mask.
 
   }   mask
 Info about the embedded writemask-register (AVX-512 and KNC only).
 
   struct {
      ZydisBool   isStatic
 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).
 
   ZydisBool   hasSAE
 Signals, if the sae functionality is enabled for the instruction.
 
   ZydisBool   hasEvictionHint
 Signals, if the instruction has a memory eviction-hint (KNC only).
 
avx
 Extended info for AVX instructions.
 
struct {
   ZydisInstructionCategory   category
 The instruction category.
 
   ZydisISASet   isaSet
 The ISA-set.
 
   ZydisISAExt   isaExt
 The ISA-set extension.
 
   ZydisExceptionClass   exceptionClass
 The exception class.
 
meta
 Meta info.
 
struct {
   struct {
      ZydisU8   data [ZYDIS_MAX_INSTRUCTION_LENGTH - 1]
 
      ZydisU8   count
 
      ZydisU8   hasF0
 
      ZydisU8   hasF3
 
      ZydisU8   hasF2
 
      ZydisU8   has2E
 
      ZydisU8   has36
 
      ZydisU8   has3E
 
      ZydisU8   has26
 
      ZydisU8   has64
 
      ZydisU8   has65
 
      ZydisU8   has66
 
      ZydisU8   has67
 
   }   prefixes
 Detailed info about the legacy prefixes.
 
   struct {
      ZydisBool   isDecoded
 TRUE if the prefix got already decoded.
 
      ZydisU8   data [1]
 The raw bytes of the prefix.
 
      ZydisU8   W
 64-bit operand-size promotion.
 
      ZydisU8   R
 Extension of the ModRM.reg field.
 
      ZydisU8   X
 Extension of the SIB.index field.
 
      ZydisU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field.
 
   }   rex
 Detailed info about the REX-prefix.
 
   struct {
      ZydisBool   isDecoded
 TRUE if the prefix got already decoded.
 
      ZydisU8   data [3]
 The raw bytes of the prefix.
 
      ZydisU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZydisU8   X
 Extension of the SIB.index field (inverted).
 
      ZydisU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
 
      ZydisU8   m_mmmm
 Opcode-map specifier.
 
      ZydisU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZydisU8   vvvv
 NDS register specifier (inverted).
 
      ZydisU8   L
 Vector-length specifier.
 
      ZydisU8   pp
 Compressed legacy prefix.
 
   }   xop
 Detailed info about the XOP-prefix.
 
   struct {
      ZydisBool   isDecoded
 TRUE if the prefix got already decoded.
 
      ZydisU8   data [3]
 The raw bytes of the prefix.
 
      ZydisU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZydisU8   X
 Extension of the SIB.index field (inverted).
 
      ZydisU8   B
 Extension of the ModRM.rm, SIB.base, or opcode.reg field (inverted).
 
      ZydisU8   m_mmmm
 Opcode-map specifier.
 
      ZydisU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZydisU8   vvvv
 NDS register specifier (inverted).
 
      ZydisU8   L
 Vector-length specifier.
 
      ZydisU8   pp
 Compressed legacy prefix.
 
   }   vex
 Detailed info about the VEX-prefix.
 
   struct {
      ZydisBool   isDecoded
 TRUE if the prefix got already decoded.
 
      ZydisU8   data [4]
 The raw bytes of the prefix.
 
      ZydisU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZydisU8   X
 Extension of the SIB.index/vidx field (inverted).
 
      ZydisU8   B
 Extension of the ModRM.rm or SIB.base field (inverted).
 
      ZydisU8   R2
 High-16 register specifier modifier (inverted).
 
      ZydisU8   mm
 Opcode-map specifier.
 
      ZydisU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZydisU8   vvvv
 NDS register specifier (inverted).
 
      ZydisU8   pp
 Compressed legacy prefix.
 
      ZydisU8   z
 Zeroing/Merging.
 
      ZydisU8   L2
 Vector-length specifier or rounding-control (most significant bit).
 
      ZydisU8   L
 Vector-length specifier or rounding-control (least significant bit).
 
      ZydisU8   b
 Broadcast/RC/SAE Context.
 
      ZydisU8   V2
 High-16 NDS/VIDX register specifier.
 
      ZydisU8   aaa
 Embedded opmask register specifier.
 
   }   evex
 Detailed info about the EVEX-prefix.
 
   struct {
      ZydisBool   isDecoded
 TRUE if the prefix got already decoded.
 
      ZydisU8   data [4]
 The raw bytes of the prefix.
 
      ZydisU8   R
 Extension of the ModRM.reg field (inverted).
 
      ZydisU8   X
 Extension of the SIB.index/vidx field (inverted).
 
      ZydisU8   B
 Extension of the ModRM.rm or SIB.base field (inverted).
 
      ZydisU8   R2
 High-16 register specifier modifier (inverted).
 
      ZydisU8   mmmm
 Opcode-map specifier.
 
      ZydisU8   W
 64-bit operand-size promotion or opcode-extension.
 
      ZydisU8   vvvv
 NDS register specifier (inverted).
 
      ZydisU8   pp
 Compressed legacy prefix.
 
      ZydisU8   E
 Non-temporal/eviction hint.
 
      ZydisU8   SSS
 Swizzle/broadcast/up-convert/down-convert/static-rounding controls.
 
      ZydisU8   V2
 High-16 NDS/VIDX register specifier.
 
      ZydisU8   kkk
 Embedded opmask register specifier.
 
   }   mvex
 Detailed info about the MVEX-prefix.
 
   struct {
      ZydisBool   isDecoded
 
      ZydisU8   data [1]
 
      ZydisU8   mod
 
      ZydisU8   reg
 
      ZydisU8   rm
 
   }   modrm
 Detailed info about the ModRM-byte.
 
   struct {
      ZydisBool   isDecoded
 
      ZydisU8   data [1]
 
      ZydisU8   scale
 
      ZydisU8   index
 
      ZydisU8   base
 
   }   sib
 Detailed info about the SIB-byte.
 
   struct {
      ZydisI64   value
 The displacement value.
 
      ZydisU8   size
 The physical displacement size, in bits.
 
      ZydisU8   offset
 The offset of the displacement data, relative to the beginning of the instruction, in bytes.
 
   }   disp
 Detailed info about displacement-bytes.
 
   struct {
      ZydisBool   isSigned
 Signals, if the immediate value is signed.
 
      ZydisBool   isRelative
 Signals, if the immediate value contains a relative offset. More...
 
      union {
         ZydisU64   u
 
         ZydisI64   s
 
      }   value
 The immediate value.
 
      ZydisU8   size
 The physical immediate size, in bits.
 
      ZydisU8   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

ZydisU8 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

ZydisU8 data[1]

The raw bytes of the decoded instruction.

The raw bytes of the prefix.

◆ isRelative

ZydisBool isRelative

Signals, if the immediate value contains a relative offset.

You can use ZydisCalcAbsoluteAddress to determine the absolute address value.

◆ isStatic

ZydisBool isStatic

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

ZydisU8 L

Vector-length specifier.

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

◆ offset

ZydisU8 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

ZydisU8 R

Extension of the ModRM.reg field.

Extension of the ModRM.reg field (inverted).

◆ size

ZydisU8 size

The physical displacement size, in bits.

The physical immediate size, in bits.

◆ W

ZydisU8 W

64-bit operand-size promotion.

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

◆ X

ZydisU8 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: