Zydis  v3.2.1
Register

Functions allowing retrieval of information about registers. More...

Functions

ZYDIS_EXPORT ZydisRegister ZydisRegisterEncode (ZydisRegisterClass register_class, ZyanU8 id)
 Returns the register specified by the register_class and id tuple. More...
 
ZYDIS_EXPORT ZyanI8 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 (ZydisMachineMode mode, ZydisRegister reg)
 Returns the width of the specified register. More...
 
ZYDIS_EXPORT ZydisRegister ZydisRegisterGetLargestEnclosing (ZydisMachineMode mode, ZydisRegister reg)
 Returns the largest enclosing register of the given register. More...
 
ZYDIS_EXPORT const char * ZydisRegisterGetString (ZydisRegister reg)
 Returns the specified register string. More...
 
ZYDIS_EXPORT const ZydisShortStringZydisRegisterGetStringWrapped (ZydisRegister reg)
 Returns the specified register string as ZydisShortString. More...
 
ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterClassGetWidth (ZydisMachineMode mode, ZydisRegisterClass register_class)
 Returns the width of the specified register-class. More...
 

Detailed Description

Functions allowing retrieval of information about registers.

Function Documentation

◆ ZydisRegisterClassGetWidth()

ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterClassGetWidth ( ZydisMachineMode  mode,
ZydisRegisterClass  register_class 
)

Returns the width of the specified register-class.

Parameters
modeThe active machine mode.
register_classThe register class.
Returns
The width of the specified register.

◆ ZydisRegisterEncode()

ZYDIS_EXPORT ZydisRegister ZydisRegisterEncode ( ZydisRegisterClass  register_class,
ZyanU8  id 
)

Returns the register specified by the register_class and id tuple.

Parameters
register_classThe register class.
idThe register id.
Returns
The register specified by the register_class and id tuple or ZYDIS_REGISTER_NONE, if an invalid parameter was passed.

◆ ZydisRegisterGetClass()

ZYDIS_EXPORT ZydisRegisterClass ZydisRegisterGetClass ( ZydisRegister  reg)

Returns the register-class of the specified register.

Parameters
regThe register.
Returns
The register-class of the specified register.

◆ ZydisRegisterGetId()

ZYDIS_EXPORT ZyanI8 ZydisRegisterGetId ( ZydisRegister  reg)

Returns the id of the specified register.

Parameters
regThe register.
Returns
The id of the specified register, or -1 if an invalid parameter was passed.

◆ ZydisRegisterGetLargestEnclosing()

ZYDIS_EXPORT ZydisRegister ZydisRegisterGetLargestEnclosing ( ZydisMachineMode  mode,
ZydisRegister  reg 
)

Returns the largest enclosing register of the given register.

Parameters
modeThe active machine mode.
regThe register.
Returns
The largest enclosing register of the given register, or ZYDIS_REGISTER_NONE if the register is invalid for the active machine-mode or does not have an enclosing-register.

◆ ZydisRegisterGetString()

ZYDIS_EXPORT const char* ZydisRegisterGetString ( ZydisRegister  reg)

Returns the specified register string.

Parameters
regThe register.
Returns
The register string or ZYAN_NULL, if an invalid register was passed.

◆ ZydisRegisterGetStringWrapped()

ZYDIS_EXPORT const ZydisShortString* ZydisRegisterGetStringWrapped ( ZydisRegister  reg)

Returns the specified register string as ZydisShortString.

Parameters
regThe register.
Returns
The register string or ZYAN_NULL, if an invalid register was passed.

The buffer of the returned struct is guaranteed to be zero-terminated in this special case.

◆ ZydisRegisterGetWidth()

ZYDIS_EXPORT ZydisRegisterWidth ZydisRegisterGetWidth ( ZydisMachineMode  mode,
ZydisRegister  reg 
)

Returns the width of the specified register.

Parameters
modeThe active machine mode.
regThe register.
Returns
The width of the specified register, or ZYDIS_REGISTER_NONE if the register is invalid for the active machine-mode.