Zydis
master
|
This structure is encoder's internal representation of encodable instruction definition. More...
#include <EncoderData.h>
Public Member Functions | |
ZyanU8 encoding | ZYAN_BITFIELD (ZYDIS_INSTRUCTION_ENCODING_REQUIRED_BITS) |
The instruction-encoding. More... | |
ZyanU8 opcode_map | ZYAN_BITFIELD (ZYDIS_OPCODE_MAP_REQUIRED_BITS) |
The opcode map. More... | |
ZyanU8 modes | ZYAN_BITFIELD (ZYDIS_WIDTH_REQUIRED_BITS) |
The combination of allowed processor modes. More... | |
ZyanU8 address_sizes | ZYAN_BITFIELD (ZYDIS_WIDTH_REQUIRED_BITS) |
The combination of allowed address sizes. More... | |
ZyanU8 operand_sizes | ZYAN_BITFIELD (ZYDIS_WIDTH_REQUIRED_BITS) |
The combination of allowed operand sizes. More... | |
ZyanU8 mandatory_prefix | ZYAN_BITFIELD (ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS) |
The mandatory prefix. More... | |
ZyanU8 rex_w | ZYAN_BITFIELD (1) |
True if REX.W is required for this definition. More... | |
ZyanU8 vector_length | ZYAN_BITFIELD (ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS) |
The vector length. More... | |
ZyanU8 accepts_hint | ZYAN_BITFIELD (ZYDIS_SIZE_HINT_REQUIRED_BITS) |
The accepted sizing hint. More... | |
ZyanU8 swappable | ZYAN_BITFIELD (1) |
Indicates that next instruction definition can be safely used instead of current one. More... | |
Data Fields | |
ZyanU16 | instruction_reference |
Index to one of decoder's instruction definition arrays. More... | |
ZyanU16 | operand_mask |
Compressed information about operand count and types. More... | |
ZyanU8 | opcode |
The instruction-opcode. More... | |
ZyanU8 | modrm |
The mandatory ModR/M value. More... | |
This structure is encoder's internal representation of encodable instruction definition.
ZyanU8 rex_w ZYAN_BITFIELD | ( | 1 | ) |
True if REX.W
is required for this definition.
ZyanU8 swappable ZYAN_BITFIELD | ( | 1 | ) |
Indicates that next instruction definition can be safely used instead of current one.
This is used with some VEX
instructions to take advantage of 2-byte VEX
prefix when possible. 2-byte VEX
allows to use high registers only when operand is encoded in modrm_reg
(high bit in REX.R
). Encoder uses swappable definitions to take advantage of this optimization opportunity.
Second use of this field is to handle special case for mov
instruction. This particular conflict is described in detail inside ZydisHandleSwappableDefinition
.
ZyanU8 encoding ZYAN_BITFIELD | ( | ZYDIS_INSTRUCTION_ENCODING_REQUIRED_BITS | ) |
The instruction-encoding.
ZyanU8 mandatory_prefix ZYAN_BITFIELD | ( | ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS | ) |
The mandatory prefix.
ZyanU8 vector_length ZYAN_BITFIELD | ( | ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS | ) |
The vector length.
ZyanU8 opcode_map ZYAN_BITFIELD | ( | ZYDIS_OPCODE_MAP_REQUIRED_BITS | ) |
The opcode map.
ZyanU8 accepts_hint ZYAN_BITFIELD | ( | ZYDIS_SIZE_HINT_REQUIRED_BITS | ) |
The accepted sizing hint.
ZyanU8 modes ZYAN_BITFIELD | ( | ZYDIS_WIDTH_REQUIRED_BITS | ) |
The combination of allowed processor modes.
ZyanU8 address_sizes ZYAN_BITFIELD | ( | ZYDIS_WIDTH_REQUIRED_BITS | ) |
The combination of allowed address sizes.
ZyanU8 operand_sizes ZYAN_BITFIELD | ( | ZYDIS_WIDTH_REQUIRED_BITS | ) |
The combination of allowed operand sizes.
ZyanU16 instruction_reference |
Index to one of decoder's instruction definition arrays.
ZyanU8 modrm |
The mandatory ModR/M value.
ZyanU8 opcode |
The instruction-opcode.
ZyanU16 operand_mask |
Compressed information about operand count and types.
Operand count is stored in lowest bits. Types of subsequent operands are stored in higher bits.