32 #ifndef ZYDIS_DECODER_H
33 #define ZYDIS_DECODER_H
35 #include <Zycore/Types.h>
36 #include <Zycore/Defines.h>
Defines the basic ZydisDecodedInstruction and ZydisDecodedOperand structs.
struct ZydisDecoder_ ZydisDecoder
Defines the ZydisDecoder struct.
ZydisDecoderMode_
Defines the ZydisDecoderMode enum.
Definition: Decoder.h:56
@ ZYDIS_DECODER_MODE_WBNOINVD
Enables the WBNOINVD mode.
Definition: Decoder.h:130
@ ZYDIS_DECODER_MODE_KNC
Enables KNC compatibility-mode.
Definition: Decoder.h:89
@ ZYDIS_DECODER_MODE_REQUIRED_BITS
The minimum number of bits required to represent all values of this enum.
Definition: Decoder.h:147
@ ZYDIS_DECODER_MODE_LZCNT
Enables the LZCNT mode.
Definition: Decoder.h:113
@ ZYDIS_DECODER_MODE_MINIMAL
Enables minimal instruction decoding without semantic analysis.
Definition: Decoder.h:69
@ ZYDIS_DECODER_MODE_TZCNT
Enables the TZCNT mode.
Definition: Decoder.h:121
@ ZYDIS_DECODER_MODE_MAX_VALUE
Maximum value of this enum.
Definition: Decoder.h:143
@ ZYDIS_DECODER_MODE_AMD_BRANCHES
Enables the AMD-branch mode.
Definition: Decoder.h:80
@ ZYDIS_DECODER_MODE_MPX
Enables the MPX mode.
Definition: Decoder.h:97
@ ZYDIS_DECODER_MODE_CLDEMOTE
Enables the CLDEMOTE mode.
Definition: Decoder.h:138
@ ZYDIS_DECODER_MODE_CET
Enables the CET mode.
Definition: Decoder.h:105
enum ZydisDecoderMode_ ZydisDecoderMode
Defines the ZydisDecoderMode enum.
enum ZydisAddressWidth_ ZydisAddressWidth
Defines the ZydisAddressWidth enum.
enum ZydisMachineMode_ ZydisMachineMode
Defines the ZydisMachineMode enum.
Status code definitions and check macros.
ZYDIS_EXPORT ZyanStatus ZydisDecoderDecodeBuffer(const ZydisDecoder *decoder, const void *buffer, ZyanUSize length, ZydisDecodedInstruction *instruction)
Decodes the instruction in the given input buffer.
ZYDIS_EXPORT ZyanStatus ZydisDecoderEnableMode(ZydisDecoder *decoder, ZydisDecoderMode mode, ZyanBool enabled)
Enables or disables the specified decoder-mode.
ZYDIS_EXPORT ZyanStatus ZydisDecoderInit(ZydisDecoder *decoder, ZydisMachineMode machine_mode, ZydisAddressWidth address_width)
Initializes the given ZydisDecoder instance.
Information about a decoded instruction.
Definition: DecoderTypes.h:969
Defines the ZydisDecoder struct.
Definition: Decoder.h:161
ZydisMachineMode machine_mode
The machine mode.
Definition: Decoder.h:165
ZyanBool decoder_mode[ZYDIS_DECODER_MODE_MAX_VALUE+1]
The decoder mode array.
Definition: Decoder.h:173
ZydisAddressWidth address_width
The address width.
Definition: Decoder.h:169