Zydis  v4.0.0
ZydisEncoderRequest_ Struct Reference

Main structure consumed by the encoder. More...

#include <Encoder.h>

Collaboration diagram for ZydisEncoderRequest_:

Data Structures

struct  ZydisEncoderRequestEvexFeatures_
 Extended info for EVEX instructions. More...
 
struct  ZydisEncoderRequestMvexFeatures_
 Extended info for MVEX instructions. More...
 

Data Fields

ZydisMachineMode machine_mode
 The machine mode used to encode this instruction. More...
 
ZydisEncodableEncoding allowed_encodings
 This optional field can be used to restrict allowed physical encodings for desired instruction. More...
 
ZydisMnemonic mnemonic
 The instruction-mnemonic. More...
 
ZydisInstructionAttributes prefixes
 A combination of requested encodable prefixes (ZYDIS_ATTRIB_HAS_* flags) for desired instruction. More...
 
ZydisBranchType branch_type
 Branch type (required for branching instructions only). More...
 
ZydisBranchWidth branch_width
 Specifies physical size for relative immediate operands. More...
 
ZydisAddressSizeHint address_size_hint
 Optional address size hint used to resolve ambiguities for some instructions. More...
 
ZydisOperandSizeHint operand_size_hint
 Optional operand size hint used to resolve ambiguities for some instructions. More...
 
ZyanU8 operand_count
 The number of instruction-operands. More...
 
ZydisEncoderOperand operands [ZYDIS_ENCODER_MAX_OPERANDS]
 Detailed info for all explicit and implicit instruction operands. More...
 
struct ZydisEncoderRequest_::ZydisEncoderRequestEvexFeatures_ evex
 
struct ZydisEncoderRequest_::ZydisEncoderRequestMvexFeatures_ mvex
 

Detailed Description

Main structure consumed by the encoder.

It represents full semantics of an instruction.

Field Documentation

◆ address_size_hint

ZydisAddressSizeHint address_size_hint

Optional address size hint used to resolve ambiguities for some instructions.

Generally encoder deduces address size from ZydisEncoderOperand structures that represent explicit and implicit operands. This hint resolves conflicts when instruction's hidden operands scale with address size attribute.

◆ allowed_encodings

ZydisEncodableEncoding allowed_encodings

This optional field can be used to restrict allowed physical encodings for desired instruction.

Some mnemonics can be supported by more than one encoding, so this field can resolve ambiguities e.g. you can disable AVX-512 extensions by prohibiting usage of EVEX prefix and allow only VEX variants.

◆ branch_type

ZydisBranchType branch_type

Branch type (required for branching instructions only).

Use ZYDIS_BRANCH_TYPE_NONE to let encoder pick size-optimal branch type automatically (short and near are prioritized over far).

◆ branch_width

ZydisBranchWidth branch_width

Specifies physical size for relative immediate operands.

Use ZYDIS_BRANCH_WIDTH_NONE to let encoder pick size-optimal branch width automatically. For segment:offset far branches this field applies to physical size of the offset part. For branching instructions without relative operands this field affects effective operand size attribute.

◆ evex

◆ machine_mode

ZydisMachineMode machine_mode

The machine mode used to encode this instruction.

◆ mnemonic

ZydisMnemonic mnemonic

The instruction-mnemonic.

◆ mvex

◆ operand_count

ZyanU8 operand_count

The number of instruction-operands.

◆ operand_size_hint

ZydisOperandSizeHint operand_size_hint

Optional operand size hint used to resolve ambiguities for some instructions.

Generally encoder deduces operand size from ZydisEncoderOperand structures that represent explicit and implicit operands. This hint resolves conflicts when instruction's hidden operands scale with operand size attribute.

◆ operands

Detailed info for all explicit and implicit instruction operands.

◆ prefixes

A combination of requested encodable prefixes (ZYDIS_ATTRIB_HAS_* flags) for desired instruction.

See ZYDIS_ENCODABLE_PREFIXES for list of available prefixes.


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