27 #ifndef ZYDIS_INTERNAL_ENCODERDATA_H 28 #define ZYDIS_INTERNAL_ENCODERDATA_H 30 #include <Zycore/Defines.h> 37 typedef enum ZydisWidthFlag_
39 ZYDIS_WIDTH_INVALID = 0x00,
40 ZYDIS_WIDTH_16 = 0x01,
41 ZYDIS_WIDTH_32 = 0x02,
42 ZYDIS_WIDTH_64 = 0x04,
47 ZYDIS_WIDTH_MAX_VALUE = (ZYDIS_WIDTH_64 | (ZYDIS_WIDTH_64 - 1)),
51 ZYDIS_WIDTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_WIDTH_MAX_VALUE)
58 typedef enum ZydisMandatoryPrefix_
60 ZYDIS_MANDATORY_PREFIX_NONE,
61 ZYDIS_MANDATORY_PREFIX_66,
62 ZYDIS_MANDATORY_PREFIX_F2,
63 ZYDIS_MANDATORY_PREFIX_F3,
68 ZYDIS_MANDATORY_PREFIX_MAX_VALUE = ZYDIS_MANDATORY_PREFIX_F3,
72 ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_MANDATORY_PREFIX_MAX_VALUE)
73 } ZydisMandatoryPrefix;
78 typedef enum ZydisVectorLength_
80 ZYDIS_VECTOR_LENGTH_INVALID,
81 ZYDIS_VECTOR_LENGTH_128,
82 ZYDIS_VECTOR_LENGTH_256,
83 ZYDIS_VECTOR_LENGTH_512,
88 ZYDIS_VECTOR_LENGTH_MAX_VALUE = ZYDIS_VECTOR_LENGTH_512,
92 ZYDIS_VECTOR_LENGTH_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_VECTOR_LENGTH_MAX_VALUE)
98 typedef enum ZydisSizeHint_
100 ZYDIS_SIZE_HINT_NONE,
107 ZYDIS_SIZE_HINT_MAX_VALUE = ZYDIS_SIZE_HINT_OSZ,
111 ZYDIS_SIZE_HINT_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SIZE_HINT_MAX_VALUE)
130 #pragma pack(push, 1) 169 ZyanU8 address_sizes
ZYAN_BITFIELD(ZYDIS_WIDTH_REQUIRED_BITS);
173 ZyanU8 operand_sizes
ZYAN_BITFIELD(ZYDIS_WIDTH_REQUIRED_BITS);
177 ZyanU8 mandatory_prefix
ZYAN_BITFIELD(ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS);
185 ZyanU8 vector_length
ZYAN_BITFIELD(ZYDIS_MANDATORY_PREFIX_REQUIRED_BITS);
189 ZyanU8 accepts_hint
ZYAN_BITFIELD(ZYDIS_SIZE_HINT_REQUIRED_BITS);
236 ZyanU8 ZydisGetEncodableInstructions(ZydisMnemonic mnemonic,
ZyanU8 encoding ZYAN_BITFIELD(ZYDIS_INSTRUCTION_ENCODING_REQUIRED_BITS)
The instruction-encoding.
ZyanU8 opcode
The instruction-opcode.
Definition: EncoderData.h:149
Contains information used by instruction size prediction algorithm inside ZydisEncoderEncodeInstructi...
Definition: EncoderData.h:209
ZyanU8 instruction_count
The number of entries.
Definition: EncoderData.h:127
Used in encoder's primary lookup table which allows to access a set of instruction definitions for sp...
Definition: EncoderData.h:118
Defines decoder/encoder-shared macros and types.
The minimum number of bits required to represent all values of this enum.
Definition: SharedTypes.h:445
ZyanU16 instruction_reference
Index to one of decoder's instruction definition arrays.
Definition: EncoderData.h:140
ZyanU8 accepts_scaling_hints
See ZydisSizeHint.
Definition: EncoderData.h:219
This structure is encoder's internal representation of encodable instruction definition.
Definition: EncoderData.h:135
ZyanU16 operand_mask
Compressed information about operand count and types.
Definition: EncoderData.h:145
The minimum number of bits required to represent all values of this enum.
Definition: SharedTypes.h:478
ZyanBool accepts_branch_hints
True if instruction accepts branch hint prefixes.
Definition: EncoderData.h:223
ZyanU8 modrm
The mandatory ModR/M value.
Definition: EncoderData.h:153
ZyanU16 encoder_reference
Index to main array of ZydisEncodableInstruction.
Definition: EncoderData.h:123
Mnemonic constant definitions and helper functions.
ZyanU8 size[3][3]
Sizes of instruction variants.
Definition: EncoderData.h:215