Zydis: ZydisEncoderRequest_ Struct Reference

Zydis v4.0.0

Loading...
Searching...
No Matches
Data Structures | Data Fields
ZydisEncoderRequest_ Struct Reference

Main structure consumed by the encoder. More...

`#include <Encoder.h>`

## 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.
ZydisEncodableEncoding | allowed_encodings
| This optional field can be used to restrict allowed physical encodings for desired instruction.
ZydisMnemonic | mnemonic
| The instruction-mnemonic.
ZydisInstructionAttributes | prefixes
| A combination of requested encodable prefixes (`ZYDIS_ATTRIB_HAS_*` flags) for desired instruction.
ZydisBranchType | branch_type
| Branch type (required for branching instructions only).
ZydisBranchWidth | branch_width
| Specifies physical size for relative immediate operands.
ZydisAddressSizeHint | address_size_hint
| Optional address size hint used to resolve ambiguities for some instructions.
ZydisOperandSizeHint | operand_size_hint
| Optional operand size hint used to resolve ambiguities for some instructions.
ZyanU8 | operand_count
| The number of instruction-operands.
ZydisEncoderOperand | operands [ZYDIS_ENCODER_MAX_OPERANDS]
| Detailed info for all explicit and implicit instruction operands.
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.

## ◆ 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.

## ◆ prefixes

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

- include/Zydis/Encoder.h