27 #ifndef ZYDIS_ENCODER_H
28 #define ZYDIS_ENCODER_H
33 #ifdef ZYDIS_ENABLE_FEATURE_DECODER
48 #define ZYDIS_USER_ENCODABLE_ATTRIB_MASK ( \
49 ZYDIS_ATTRIB_HAS_LOCK | \
50 ZYDIS_ATTRIB_HAS_REP | \
51 ZYDIS_ATTRIB_HAS_REPE | \
52 ZYDIS_ATTRIB_HAS_REPNE | \
53 ZYDIS_ATTRIB_HAS_BOUND | \
54 ZYDIS_ATTRIB_HAS_XACQUIRE | \
55 ZYDIS_ATTRIB_HAS_XRELEASE | \
56 ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
57 ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN \
64 #define ZYDIS_ENCODER_MAX_OPERANDS (5)
109 #ifdef ZYDIS_ENABLE_FEATURE_DECODER
110 ZYDIS_EXPORT
ZydisStatus ZydisEncoderDecodedInstructionToRequest(
Defines the basic ZydisDecodedInstruction and ZydisDecodedOperand structs.
uint64_t ZydisInstructionAttributes
Defines the ZydisInstructionAttributes datatype.
Definition: DecoderTypes.h:177
ZYDIS_EXPORT ZydisStatus ZydisEncoderEncodeInstruction(void *buffer, size_t *bufferLen, const ZydisEncoderRequest *request)
Encodes the given instruction info to byte-code.
#define ZYDIS_ENCODER_MAX_OPERANDS
Definition: Encoder.h:64
struct ZydisEncoderOperand_ ZydisEncoderOperand
struct ZydisEncoderRequest_ ZydisEncoderRequest
uint16_t ZydisMnemonic
Defines the ZydisMnemonic datatype.
Definition: Mnemonic.h:44
uint8_t ZydisRegister
Defines the ZydisRegister datatype.
Definition: Register.h:49
Defines decoder/encoder-shared macros and types.
uint8_t ZydisMachineMode
Defines the ZydisMachineMode datatype.
Definition: SharedTypes.h:65
uint8_t ZydisInstructionEncoding
Defines the ZydisInstructionEncoding datatype.
Definition: SharedTypes.h:317
uint8_t ZydisOperandType
Defines the ZydisOperandType datatype.
Definition: SharedTypes.h:156
uint32_t ZydisStatus
Defines the ZydisStatus datatype.
Definition: Status.h:43
Defines the ZydisDecodedInstruction struct.
Definition: DecoderTypes.h:676
int64_t s
Definition: Encoder.h:88
ZydisRegister reg
Definition: Encoder.h:69
union ZydisEncoderOperand_::@23 imm
ZydisRegister segment
Definition: Encoder.h:72
ZydisRegister base
Definition: Encoder.h:73
uint8_t scale
Definition: Encoder.h:75
uint8_t dispSize
Definition: Encoder.h:76
uint8_t immSize
Definition: Encoder.h:84
struct ZydisEncoderOperand_::@21 mem
struct ZydisEncoderOperand_::@22 ptr
uint32_t offset
Definition: Encoder.h:82
uint16_t segment
Definition: Encoder.h:81
int64_t disp
Definition: Encoder.h:77
uint64_t u
Definition: Encoder.h:87
ZydisRegister index
Definition: Encoder.h:74
ZydisOperandType type
Definition: Encoder.h:68
ZydisMnemonic mnemonic
Definition: Encoder.h:95
uint8_t operandCount
Definition: Encoder.h:98
ZydisInstructionEncoding encoding
Definition: Encoder.h:97
ZydisInstructionAttributes attributes
Definition: Encoder.h:96
ZydisEncoderOperand operands[ZYDIS_ENCODER_MAX_OPERANDS]
Definition: Encoder.h:99
ZydisMachineMode machineMode
Definition: Encoder.h:94