Zydis  v2.0.0-alpha1
Encoder.h File Reference
#include <Zydis/Defines.h>
#include <Zydis/Status.h>
#include <Zydis/SharedTypes.h>
Include dependency graph for Encoder.h:

Go to the source code of this file.

Data Structures

struct  ZydisEncoderOperand_
 
struct  ZydisEncoderRequest_
 

Macros

#define ZYDIS_USER_ENCODABLE_ATTRIB_MASK
 Defines a mask of attributes users may excplicitly ask for. More...
 
#define ZYDIS_ENCODER_MAX_OPERANDS   (5)
 

Typedefs

typedef struct ZydisEncoderOperand_ ZydisEncoderOperand
 
typedef struct ZydisEncoderRequest_ ZydisEncoderRequest
 

Functions

ZYDIS_EXPORT ZydisStatus ZydisEncoderEncodeInstruction (void *buffer, size_t *bufferLen, const ZydisEncoderRequest *request)
 Encodes the given instruction info to byte-code. More...
 

Macro Definition Documentation

◆ ZYDIS_ENCODER_MAX_OPERANDS

#define ZYDIS_ENCODER_MAX_OPERANDS   (5)

◆ ZYDIS_USER_ENCODABLE_ATTRIB_MASK

#define ZYDIS_USER_ENCODABLE_ATTRIB_MASK
Value:
( \
ZYDIS_ATTRIB_HAS_LOCK | \
ZYDIS_ATTRIB_HAS_REP | \
ZYDIS_ATTRIB_HAS_REPE | \
ZYDIS_ATTRIB_HAS_REPNE | \
ZYDIS_ATTRIB_HAS_BOUND | \
ZYDIS_ATTRIB_HAS_XACQUIRE | \
ZYDIS_ATTRIB_HAS_XRELEASE | \
ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN \
)

Defines a mask of attributes users may excplicitly ask for.

Typedef Documentation

◆ ZydisEncoderOperand

◆ ZydisEncoderRequest

Function Documentation

◆ ZydisEncoderEncodeInstruction()

ZYDIS_EXPORT ZydisStatus ZydisEncoderEncodeInstruction ( void *  buffer,
size_t *  bufferLen,
const ZydisEncoderRequest request 
)

Encodes the given instruction info to byte-code.

Parameters
bufferA pointer to the output buffer.
bufferLenThe length of the output buffer.
requestA pointer to the ZydisEncoderRequest encode.
Returns
A zydis status code.