Zydis v4.1.1

Loading...
Searching...
No Matches
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.
ZYDIS_EXPORT ZyanI8 | ZydisRegisterGetId (ZydisRegister reg)
| Returns the id of the specified register.
ZYDIS_EXPORT ZydisRegisterClass | ZydisRegisterGetClass (ZydisRegister reg)
| Returns the register-class of the specified register.
ZYDIS_EXPORT ZydisRegisterWidth | ZydisRegisterGetWidth (ZydisMachineMode mode, ZydisRegister reg)
| Returns the width of the specified register.
ZYDIS_EXPORT ZydisRegister | ZydisRegisterGetLargestEnclosing (ZydisMachineMode mode, ZydisRegister reg)
| Returns the largest enclosing register of the given register.
ZYDIS_EXPORT const char * | ZydisRegisterGetString (ZydisRegister reg)
| Returns the specified register string.
ZYDIS_EXPORT const ZydisShortString * | ZydisRegisterGetStringWrapped (ZydisRegister reg)
| Returns the specified register string as ZydisShortString.
ZYDIS_EXPORT ZydisRegisterWidth | ZydisRegisterClassGetWidth (ZydisMachineMode mode, ZydisRegisterClass register_class)
| Returns the width of the specified register-class.

## 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

  mode | The active machine mode.
  register_class | The 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_class | The register class.
  id | The 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

  reg | The register.

Returns
  The register-class of the specified register.

## ◆ ZydisRegisterGetId()

ZYDIS_EXPORT ZyanI8 ZydisRegisterGetId | ( | ZydisRegister | reg | ) |

Returns the id of the specified register.

Parameters

  reg | The 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

  mode | The active machine mode.
  reg | The register.

Returns
  The largest enclosing register of the given register, or ZYDIS_REGISTER_NONE if the register is invalid for the active machine-mode.

## ◆ ZydisRegisterGetString()

ZYDIS_EXPORT const char * ZydisRegisterGetString | ( | ZydisRegister | reg | ) |

Returns the specified register string.

Parameters

  reg | The 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

  reg | The 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

  mode | The active machine mode.
  reg | The register.

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