Zydis
v2.0.2
|
Utility functions and constants for registers. More...
#include <Zydis/Defines.h>
#include <Zydis/CommonTypes.h>
#include <Zydis/String.h>
#include <Zydis/Generated/EnumRegister.h>
Go to the source code of this file.
Typedefs | |
typedef ZydisU8 | ZydisRegisterClass |
Defines the ZydisRegisterClass datatype. More... | |
typedef ZydisU16 | ZydisRegisterWidth |
Defines the ZydisRegisterWidth datatype. More... | |
Enumerations | |
enum | ZydisRegisterClasses { ZYDIS_REGCLASS_INVALID , ZYDIS_REGCLASS_GPR8 , ZYDIS_REGCLASS_GPR16 , ZYDIS_REGCLASS_GPR32 , ZYDIS_REGCLASS_GPR64 , ZYDIS_REGCLASS_X87 , ZYDIS_REGCLASS_MMX , ZYDIS_REGCLASS_XMM , ZYDIS_REGCLASS_YMM , ZYDIS_REGCLASS_ZMM , ZYDIS_REGCLASS_FLAGS , ZYDIS_REGCLASS_IP , ZYDIS_REGCLASS_SEGMENT , ZYDIS_REGCLASS_TEST , ZYDIS_REGCLASS_CONTROL , ZYDIS_REGCLASS_DEBUG , ZYDIS_REGCLASS_MASK , ZYDIS_REGCLASS_BOUND , ZYDIS_REGCLASS_MAX_VALUE = ZYDIS_REGCLASS_BOUND } |
Values that represent zydis register-classes. More... | |
Functions | |
ZYDIS_EXPORT ZydisRegister | ZydisRegisterEncode (ZydisRegisterClass registerClass, ZydisU8 id) |
Returns the register specified by the registerClass and the id . More... | |
ZYDIS_EXPORT ZydisI16 | ZydisRegisterGetId (ZydisRegister reg) |
Returns the id of the specified register. More... | |
ZYDIS_EXPORT ZydisRegisterClass | ZydisRegisterGetClass (ZydisRegister reg) |
Returns the register-class of the specified register. More... | |
ZYDIS_EXPORT ZydisRegisterWidth | ZydisRegisterGetWidth (ZydisRegister reg) |
Returns the width of the specified register. More... | |
ZYDIS_EXPORT ZydisRegisterWidth | ZydisRegisterGetWidth64 (ZydisRegister reg) |
Returns the width of the specified register in 64-bit mode. More... | |
ZYDIS_EXPORT const char * | ZydisRegisterGetString (ZydisRegister reg) |
Returns the specified register string. More... | |
ZYDIS_EXPORT const ZydisStaticString * | ZydisRegisterGetStaticString (ZydisRegister reg) |
Returns the specified register string as ZydisStaticString . More... | |
Utility functions and constants for registers.
typedef ZydisU8 ZydisRegisterClass |
Defines the ZydisRegisterClass
datatype.
typedef ZydisU16 ZydisRegisterWidth |
Defines the ZydisRegisterWidth
datatype.
enum ZydisRegisterClasses |
Values that represent zydis register-classes.
ZYDIS_EXPORT ZydisRegister ZydisRegisterEncode | ( | ZydisRegisterClass | registerClass, |
ZydisU8 | id | ||
) |
Returns the register specified by the registerClass
and the id
.
registerClass | The register class. |
id | The register id. |
registerClass
and the id
or ZYDIS_REGISTER_NONE
, if an invalid parameter was passed. ZYDIS_EXPORT ZydisRegisterClass ZydisRegisterGetClass | ( | ZydisRegister | reg | ) |
Returns the register-class of the specified register.
reg | The register. |
ZYDIS_EXPORT ZydisI16 ZydisRegisterGetId | ( | ZydisRegister | reg | ) |
Returns the id of the specified register.
reg | The register. |
ZYDIS_EXPORT const ZydisStaticString* ZydisRegisterGetStaticString | ( | ZydisRegister | reg | ) |
Returns the specified register string as ZydisStaticString
.
reg | The register. |
NULL
, if an invalid register was passed.The buffer
of the returned struct is guaranteed to be zero-terminated in this special case.
ZYDIS_EXPORT const char* ZydisRegisterGetString | ( | ZydisRegister | reg | ) |
Returns the specified register string.
reg | The register. |
NULL
, if an invalid register was passed. ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterGetWidth | ( | ZydisRegister | reg | ) |
Returns the width of the specified register.
reg | The register. |
ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterGetWidth64 | ( | ZydisRegister | reg | ) |
Returns the width of the specified register in 64-bit mode.
reg | The register. |