27 #ifndef ZYDIS_INTERNAL_DECODERDATA_H
28 #define ZYDIS_INTERNAL_DECODERDATA_H
30 #include <Zycore/Defines.h>
43 # pragma warning(push)
44 # pragma warning(disable:4214)
201 # pragma warning(pop)
216 #define ZYDIS_INSTR_ENC_FLAG_HAS_MODRM 0x01
221 #define ZYDIS_INSTR_ENC_FLAG_HAS_DISP 0x02
226 #define ZYDIS_INSTR_ENC_FLAG_HAS_IMM0 0x04
231 #define ZYDIS_INSTR_ENC_FLAG_HAS_IMM1 0x08
239 #define ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM 0x10
struct ZydisDecoderTreeNode_ ZydisDecoderTreeNode
Defines the ZydisDecoderTreeNode struct.
ZYDIS_NO_EXPORT const ZydisDecoderTreeNode * ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeNode *parent, ZyanU16 index)
Returns the child node of parent specified by index.
ZyanU8 ZydisInstructionEncodingFlags
Defines the ZydisInstructionEncodingFlags data-type.
Definition: DecoderData.h:211
ZYDIS_NO_EXPORT const ZydisDecoderTreeNode * ZydisDecoderTreeGetRootNode(void)
Returns the root node of the instruction tree.
ZyanU8 ZydisDecoderTreeNodeType
Defines the ZydisDecoderTreeNodeType data-type.
Definition: DecoderData.h:56
ZyanU16 ZydisDecoderTreeNodeValue
Defines the ZydisDecoderTreeNodeValue data-type.
Definition: DecoderData.h:183
ZYDIS_NO_EXPORT void ZydisGetInstructionEncodingInfo(const ZydisDecoderTreeNode *node, const ZydisInstructionEncodingInfo **info)
Returns information about optional instruction parts (like modrm, displacement or immediates) for the...
ZydisDecoderTreeNodeTypes
Values that represent zydis decoder tree node types.
Definition: DecoderData.h:62
@ ZYDIS_NODETYPE_FILTER_MODRM_MOD_COMPACT
Reference to a compacted ModRM.mod filter.
Definition: DecoderData.h:99
@ ZYDIS_NODETYPE_DEFINITION_MASK
Reference to an instruction-definition.
Definition: DecoderData.h:67
@ ZYDIS_NODETYPE_FILTER_MVEX_E
Reference to an MVEX.E filter.
Definition: DecoderData.h:143
@ ZYDIS_NODETYPE_FILTER_EMVEX
Reference to an EVEX/MVEX-map filter.
Definition: DecoderData.h:79
@ ZYDIS_NODETYPE_FILTER_PREFIX_GROUP1
Reference to a PrefixGroup1 filter.
Definition: DecoderData.h:111
@ ZYDIS_NODETYPE_FILTER_MODRM_MOD
Reference to a ModRM.mod filter.
Definition: DecoderData.h:95
@ ZYDIS_NODETYPE_FILTER_MODE_WBNOINVD
Reference to a WBNOINVD-mode filter.
Definition: DecoderData.h:171
@ ZYDIS_NODETYPE_FILTER_MODE_CLDEMOTE
Reference to a CLDEMOTE-mode filter.
Definition: DecoderData.h:175
@ ZYDIS_NODETYPE_FILTER_MODRM_REG
Reference to a ModRM.reg filter.
Definition: DecoderData.h:103
@ ZYDIS_NODETYPE_FILTER_MODE_MPX
Reference to a MPX-mode filter.
Definition: DecoderData.h:155
@ ZYDIS_NODETYPE_FILTER_MODE_TZCNT
Reference to a TZCNT-mode filter.
Definition: DecoderData.h:167
@ ZYDIS_NODETYPE_FILTER_MODE_COMPACT
Reference to an compacted instruction-mode filter.
Definition: DecoderData.h:91
@ ZYDIS_NODETYPE_FILTER_REX_B
Reference to an REX/VEX/EVEX.B filter.
Definition: DecoderData.h:135
@ ZYDIS_NODETYPE_FILTER_OPCODE
Reference to an opcode filter.
Definition: DecoderData.h:83
@ ZYDIS_NODETYPE_FILTER_MODRM_RM
Reference to a ModRM.rm filter.
Definition: DecoderData.h:107
@ ZYDIS_NODETYPE_FILTER_VECTOR_LENGTH
Reference to a vector-length filter.
Definition: DecoderData.h:127
@ ZYDIS_NODETYPE_FILTER_MODE_KNC
Reference to a KNC-mode filter.
Definition: DecoderData.h:151
@ ZYDIS_NODETYPE_FILTER_ADDRESS_SIZE
Reference to an address-size filter.
Definition: DecoderData.h:123
@ ZYDIS_NODETYPE_FILTER_REX_W
Reference to an REX/VEX/EVEX.W filter.
Definition: DecoderData.h:131
@ ZYDIS_NODETYPE_FILTER_MODE
Reference to an instruction-mode filter.
Definition: DecoderData.h:87
@ ZYDIS_NODETYPE_FILTER_MODE_LZCNT
Reference to a LZCNT-mode filter.
Definition: DecoderData.h:163
@ ZYDIS_NODETYPE_FILTER_MODE_AMD
Reference to a AMD-mode filter.
Definition: DecoderData.h:147
@ ZYDIS_NODETYPE_INVALID
Definition: DecoderData.h:63
@ ZYDIS_NODETYPE_FILTER_EVEX_B
Reference to an EVEX.b filter.
Definition: DecoderData.h:139
@ ZYDIS_NODETYPE_FILTER_MANDATORY_PREFIX
Reference to a mandatory-prefix filter.
Definition: DecoderData.h:115
@ ZYDIS_NODETYPE_FILTER_OPERAND_SIZE
Reference to an operand-size filter.
Definition: DecoderData.h:119
@ ZYDIS_NODETYPE_FILTER_XOP
Reference to an XOP-map filter.
Definition: DecoderData.h:71
@ ZYDIS_NODETYPE_FILTER_MODE_CET
Reference to a CET-mode filter.
Definition: DecoderData.h:159
@ ZYDIS_NODETYPE_FILTER_VEX
Reference to an VEX-map filter.
Definition: DecoderData.h:75
struct ZydisInstructionEncodingInfo_ ZydisInstructionEncodingInfo
Defines the ZydisInstructionEncodingInfo struct.
Defines the basic ZydisDecodedInstruction and ZydisDecodedOperand structs.
Defines the ZydisDecoderTreeNode struct.
Definition: DecoderData.h:191
ZydisDecoderTreeNodeValue value
Definition: DecoderData.h:193
ZydisDecoderTreeNodeType type
Definition: DecoderData.h:192
Defines the ZydisInstructionEncodingInfo struct.
Definition: DecoderData.h:245
ZydisInstructionEncodingFlags flags
Contains flags with information about the physical instruction-encoding.
Definition: DecoderData.h:249
ZyanBool is_relative
Signals, if the value is a relative offset.
Definition: DecoderData.h:276
ZyanBool is_signed
Signals, if the value is signed.
Definition: DecoderData.h:272
ZyanU8 size[3]
The size of the displacement value.
Definition: DecoderData.h:258
struct ZydisInstructionEncodingInfo_::@1 disp
Displacement info.
struct ZydisInstructionEncodingInfo_::@2 imm[2]
Immediate info.