Zydis  v4.1.0
Status.h File Reference

Status code definitions and check macros. More...

#include <Zycore/Status.h>
Include dependency graph for Status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZYAN_MODULE_ZYDIS   0x002u
 The zydis module id. More...
 
#define ZYDIS_STATUS_NO_MORE_DATA    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
 An attempt was made to read data from an input data-source that has no more data available. More...
 
#define ZYDIS_STATUS_DECODING_ERROR    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
 An general error occured while decoding the current instruction. More...
 
#define ZYDIS_STATUS_INSTRUCTION_TOO_LONG    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
 The instruction exceeded the maximum length of 15 bytes. More...
 
#define ZYDIS_STATUS_BAD_REGISTER    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
 The instruction encoded an invalid register. More...
 
#define ZYDIS_STATUS_ILLEGAL_LOCK    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
 A lock-prefix (F0) was found while decoding an instruction that does not support locking. More...
 
#define ZYDIS_STATUS_ILLEGAL_LEGACY_PFX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x05u)
 A legacy-prefix (F2, F3, 66) was found while decoding a XOP/VEX/EVEX/MVEX instruction. More...
 
#define ZYDIS_STATUS_ILLEGAL_REX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)
 A rex-prefix was found while decoding a XOP/VEX/EVEX/MVEX instruction. More...
 
#define ZYDIS_STATUS_INVALID_MAP    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
 An invalid opcode-map value was found while decoding a XOP/VEX/EVEX/MVEX-prefix. More...
 
#define ZYDIS_STATUS_MALFORMED_EVEX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x08u)
 An error occured while decoding the EVEX-prefix. More...
 
#define ZYDIS_STATUS_MALFORMED_MVEX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)
 An error occured while decoding the MVEX-prefix. More...
 
#define ZYDIS_STATUS_INVALID_MASK    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Au)
 An invalid write-mask was specified for an EVEX/MVEX instruction. More...
 
#define ZYDIS_STATUS_SKIP_TOKEN    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYDIS, 0x0Bu)
 Returning this status code in some specified formatter callbacks will cause the formatter to omit the corresponding token. More...
 
#define ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Cu)
 

Detailed Description

Status code definitions and check macros.

Macro Definition Documentation

◆ ZYAN_MODULE_ZYDIS

#define ZYAN_MODULE_ZYDIS   0x002u

The zydis module id.

◆ ZYDIS_STATUS_BAD_REGISTER

#define ZYDIS_STATUS_BAD_REGISTER    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)

The instruction encoded an invalid register.

◆ ZYDIS_STATUS_DECODING_ERROR

#define ZYDIS_STATUS_DECODING_ERROR    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)

An general error occured while decoding the current instruction.

The instruction might be undefined.

◆ ZYDIS_STATUS_ILLEGAL_LEGACY_PFX

#define ZYDIS_STATUS_ILLEGAL_LEGACY_PFX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x05u)

A legacy-prefix (F2, F3, 66) was found while decoding a XOP/VEX/EVEX/MVEX instruction.

◆ ZYDIS_STATUS_ILLEGAL_LOCK

#define ZYDIS_STATUS_ILLEGAL_LOCK    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)

A lock-prefix (F0) was found while decoding an instruction that does not support locking.

◆ ZYDIS_STATUS_ILLEGAL_REX

#define ZYDIS_STATUS_ILLEGAL_REX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)

A rex-prefix was found while decoding a XOP/VEX/EVEX/MVEX instruction.

◆ ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION

#define ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Cu)

◆ ZYDIS_STATUS_INSTRUCTION_TOO_LONG

#define ZYDIS_STATUS_INSTRUCTION_TOO_LONG    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)

The instruction exceeded the maximum length of 15 bytes.

◆ ZYDIS_STATUS_INVALID_MAP

#define ZYDIS_STATUS_INVALID_MAP    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)

An invalid opcode-map value was found while decoding a XOP/VEX/EVEX/MVEX-prefix.

◆ ZYDIS_STATUS_INVALID_MASK

#define ZYDIS_STATUS_INVALID_MASK    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Au)

An invalid write-mask was specified for an EVEX/MVEX instruction.

◆ ZYDIS_STATUS_MALFORMED_EVEX

#define ZYDIS_STATUS_MALFORMED_EVEX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x08u)

An error occured while decoding the EVEX-prefix.

◆ ZYDIS_STATUS_MALFORMED_MVEX

#define ZYDIS_STATUS_MALFORMED_MVEX    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)

An error occured while decoding the MVEX-prefix.

◆ ZYDIS_STATUS_NO_MORE_DATA

#define ZYDIS_STATUS_NO_MORE_DATA    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)

An attempt was made to read data from an input data-source that has no more data available.

◆ ZYDIS_STATUS_SKIP_TOKEN

#define ZYDIS_STATUS_SKIP_TOKEN    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYDIS, 0x0Bu)

Returning this status code in some specified formatter callbacks will cause the formatter to omit the corresponding token.

Valid callbacks:

  • ZYDIS_FORMATTER_FUNC_PRE_OPERAND
  • ZYDIS_FORMATTER_FUNC_POST_OPERAND
  • ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG
  • ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM
  • ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR
  • ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM