Zydis  v2.0.0-alpha1
Utils.h File Reference
#include <stdint.h>
#include <Zydis/Defines.h>
#include <Zydis/Status.h>
#include <Zydis/DecoderTypes.h>
Include dependency graph for Utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ZYDIS_EXPORT ZydisStatus ZydisUtilsCalcAbsoluteTargetAddress (const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operand, uint64_t *address)
 Calculates the absolute target-address of an relative instruction operand. More...
 
ZYDIS_EXPORT ZydisStatus ZydisGetCPUFlagsByAction (const ZydisDecodedInstruction *instruction, ZydisCPUFlagAction action, ZydisCPUFlagMask *flags)
 Returns a mask of CPU-flags matching the given action. More...
 

Function Documentation

◆ ZydisGetCPUFlagsByAction()

ZYDIS_EXPORT ZydisStatus ZydisGetCPUFlagsByAction ( const ZydisDecodedInstruction instruction,
ZydisCPUFlagAction  action,
ZydisCPUFlagMask flags 
)

Returns a mask of CPU-flags matching the given action.

Parameters
instructionA pointer to the ZydisDecodedInstruction struct.
actionThe CPU-flag action.
flagsA pointer to the variable that receives the flag mask.
Returns
A zydis status code

◆ ZydisUtilsCalcAbsoluteTargetAddress()

ZYDIS_EXPORT ZydisStatus ZydisUtilsCalcAbsoluteTargetAddress ( const ZydisDecodedInstruction instruction,
const ZydisDecodedOperand operand,
uint64_t *  address 
)

Calculates the absolute target-address of an relative instruction operand.

Parameters
instructionA pointer to the ZydisDecodedInstruction struct.
operandA pointer to the ZydisDecodedOperand struct.
addressA pointer to the memory that receives the absolute target-address.
Returns
A zydis status code