Zydis  v4.0.0
Instruction attributes

Constants describing various properties of an instruction. More...

Macros

#define ZYDIS_ATTRIB_HAS_MODRM   (1ULL << 0)
 The instruction has the ModRM byte. More...
 
#define ZYDIS_ATTRIB_HAS_SIB   (1ULL << 1)
 The instruction has the SIB byte. More...
 
#define ZYDIS_ATTRIB_HAS_REX   (1ULL << 2)
 The instruction has the REX prefix. More...
 
#define ZYDIS_ATTRIB_HAS_XOP   (1ULL << 3)
 The instruction has the XOP prefix. More...
 
#define ZYDIS_ATTRIB_HAS_VEX   (1ULL << 4)
 The instruction has the VEX prefix. More...
 
#define ZYDIS_ATTRIB_HAS_EVEX   (1ULL << 5)
 The instruction has the EVEX prefix. More...
 
#define ZYDIS_ATTRIB_HAS_MVEX   (1ULL << 6)
 The instruction has the MVEX prefix. More...
 
#define ZYDIS_ATTRIB_IS_RELATIVE   (1ULL << 7)
 The instruction has one or more operands with position-relative offsets. More...
 
#define ZYDIS_ATTRIB_IS_PRIVILEGED   (1ULL << 8)
 The instruction is privileged. More...
 
#define ZYDIS_ATTRIB_CPUFLAG_ACCESS   (1ULL << 9)
 The instruction accesses one or more CPU-flags. More...
 
#define ZYDIS_ATTRIB_CPU_STATE_CR   (1ULL << 10)
 The instruction may conditionally read the general CPU state. More...
 
#define ZYDIS_ATTRIB_CPU_STATE_CW   (1ULL << 11)
 The instruction may conditionally write the general CPU state. More...
 
#define ZYDIS_ATTRIB_FPU_STATE_CR   (1ULL << 12)
 The instruction may conditionally read the FPU state (X87, MMX). More...
 
#define ZYDIS_ATTRIB_FPU_STATE_CW   (1ULL << 13)
 The instruction may conditionally write the FPU state (X87, MMX). More...
 
#define ZYDIS_ATTRIB_XMM_STATE_CR   (1ULL << 14)
 The instruction may conditionally read the XMM state (AVX, AVX2, AVX-512). More...
 
#define ZYDIS_ATTRIB_XMM_STATE_CW   (1ULL << 15)
 The instruction may conditionally write the XMM state (AVX, AVX2, AVX-512). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_LOCK   (1ULL << 16)
 The instruction accepts the LOCK prefix (0xF0). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_REP   (1ULL << 17)
 The instruction accepts the REP prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_REPE   (1ULL << 18)
 The instruction accepts the REPE/REPZ prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_REPZ   ZYDIS_ATTRIB_ACCEPTS_REPE
 The instruction accepts the REPE/REPZ prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_REPNE   (1ULL << 19)
 The instruction accepts the REPNE/REPNZ prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_REPNZ   ZYDIS_ATTRIB_ACCEPTS_REPNE
 The instruction accepts the REPNE/REPNZ prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_BND   (1ULL << 20)
 The instruction accepts the BND prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_XACQUIRE   (1ULL << 21)
 The instruction accepts the XACQUIRE prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_XRELEASE   (1ULL << 22)
 The instruction accepts the XRELEASE prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_HLE_WITHOUT_LOCK   (1ULL << 23)
 The instruction accepts the XACQUIRE/XRELEASE prefixes (0xF2, 0xF3) without the LOCK prefix (0x0F). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_BRANCH_HINTS   (1ULL << 24)
 The instruction accepts branch hints (0x2E, 0x3E). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_NOTRACK   (1ULL << 25)
 The instruction accepts the CET no-track prefix (0x3E). More...
 
#define ZYDIS_ATTRIB_ACCEPTS_SEGMENT   (1ULL << 26)
 The instruction accepts segment prefixes (0x2E, 0x36, 0x3E, 0x26, 0x64, 0x65). More...
 
#define ZYDIS_ATTRIB_HAS_LOCK   (1ULL << 27)
 The instruction has the LOCK prefix (0xF0). More...
 
#define ZYDIS_ATTRIB_HAS_REP   (1ULL << 28)
 The instruction has the REP prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_HAS_REPE   (1ULL << 29)
 The instruction has the REPE/REPZ prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_HAS_REPZ   ZYDIS_ATTRIB_HAS_REPE
 The instruction has the REPE/REPZ prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_HAS_REPNE   (1ULL << 30)
 The instruction has the REPNE/REPNZ prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_HAS_REPNZ   ZYDIS_ATTRIB_HAS_REPNE
 The instruction has the REPNE/REPNZ prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_HAS_BND   (1ULL << 31)
 The instruction has the BND prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_HAS_XACQUIRE   (1ULL << 32)
 The instruction has the XACQUIRE prefix (0xF2). More...
 
#define ZYDIS_ATTRIB_HAS_XRELEASE   (1ULL << 33)
 The instruction has the XRELEASE prefix (0xF3). More...
 
#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN   (1ULL << 34)
 The instruction has the branch-not-taken hint (0x2E). More...
 
#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN   (1ULL << 35)
 The instruction has the branch-taken hint (0x3E). More...
 
#define ZYDIS_ATTRIB_HAS_NOTRACK   (1ULL << 36)
 The instruction has the CET no-track prefix (0x3E). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_CS   (1ULL << 37)
 The instruction has the CS segment modifier (0x2E). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_SS   (1ULL << 38)
 The instruction has the SS segment modifier (0x36). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_DS   (1ULL << 39)
 The instruction has the DS segment modifier (0x3E). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_ES   (1ULL << 40)
 The instruction has the ES segment modifier (0x26). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_FS   (1ULL << 41)
 The instruction has the FS segment modifier (0x64). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT_GS   (1ULL << 42)
 The instruction has the GS segment modifier (0x65). More...
 
#define ZYDIS_ATTRIB_HAS_SEGMENT
 The instruction has a segment modifier. More...
 
#define ZYDIS_ATTRIB_HAS_OPERANDSIZE   (1ULL << 43)
 The instruction has the operand-size override prefix (0x66). More...
 
#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE   (1ULL << 44)
 The instruction has the address-size override prefix (0x67). More...
 
#define ZYDIS_ATTRIB_HAS_EVEX_B   (1ULL << 45)
 The instruction has the EVEX.b bit set. More...
 

Typedefs

typedef ZyanU64 ZydisInstructionAttributes
 Defines the ZydisInstructionAttributes data-type. More...
 

Detailed Description

Constants describing various properties of an instruction.

Used in the ZydisDecodedInstruction::attributes and ZydisEncoderRequest::prefixes fields.

Macro Definition Documentation

◆ ZYDIS_ATTRIB_ACCEPTS_BND

#define ZYDIS_ATTRIB_ACCEPTS_BND   (1ULL << 20)

The instruction accepts the BND prefix (0xF2).

◆ ZYDIS_ATTRIB_ACCEPTS_BRANCH_HINTS

#define ZYDIS_ATTRIB_ACCEPTS_BRANCH_HINTS   (1ULL << 24)

The instruction accepts branch hints (0x2E, 0x3E).

◆ ZYDIS_ATTRIB_ACCEPTS_HLE_WITHOUT_LOCK

#define ZYDIS_ATTRIB_ACCEPTS_HLE_WITHOUT_LOCK   (1ULL << 23)

The instruction accepts the XACQUIRE/XRELEASE prefixes (0xF2, 0xF3) without the LOCK prefix (0x0F).

◆ ZYDIS_ATTRIB_ACCEPTS_LOCK

#define ZYDIS_ATTRIB_ACCEPTS_LOCK   (1ULL << 16)

The instruction accepts the LOCK prefix (0xF0).

◆ ZYDIS_ATTRIB_ACCEPTS_NOTRACK

#define ZYDIS_ATTRIB_ACCEPTS_NOTRACK   (1ULL << 25)

The instruction accepts the CET no-track prefix (0x3E).

◆ ZYDIS_ATTRIB_ACCEPTS_REP

#define ZYDIS_ATTRIB_ACCEPTS_REP   (1ULL << 17)

The instruction accepts the REP prefix (0xF3).

◆ ZYDIS_ATTRIB_ACCEPTS_REPE

#define ZYDIS_ATTRIB_ACCEPTS_REPE   (1ULL << 18)

The instruction accepts the REPE/REPZ prefix (0xF3).

◆ ZYDIS_ATTRIB_ACCEPTS_REPNE

#define ZYDIS_ATTRIB_ACCEPTS_REPNE   (1ULL << 19)

The instruction accepts the REPNE/REPNZ prefix (0xF2).

◆ ZYDIS_ATTRIB_ACCEPTS_REPNZ

#define ZYDIS_ATTRIB_ACCEPTS_REPNZ   ZYDIS_ATTRIB_ACCEPTS_REPNE

The instruction accepts the REPNE/REPNZ prefix (0xF2).

◆ ZYDIS_ATTRIB_ACCEPTS_REPZ

#define ZYDIS_ATTRIB_ACCEPTS_REPZ   ZYDIS_ATTRIB_ACCEPTS_REPE

The instruction accepts the REPE/REPZ prefix (0xF3).

◆ ZYDIS_ATTRIB_ACCEPTS_SEGMENT

#define ZYDIS_ATTRIB_ACCEPTS_SEGMENT   (1ULL << 26)

The instruction accepts segment prefixes (0x2E, 0x36, 0x3E, 0x26, 0x64, 0x65).

◆ ZYDIS_ATTRIB_ACCEPTS_XACQUIRE

#define ZYDIS_ATTRIB_ACCEPTS_XACQUIRE   (1ULL << 21)

The instruction accepts the XACQUIRE prefix (0xF2).

◆ ZYDIS_ATTRIB_ACCEPTS_XRELEASE

#define ZYDIS_ATTRIB_ACCEPTS_XRELEASE   (1ULL << 22)

The instruction accepts the XRELEASE prefix (0xF3).

◆ ZYDIS_ATTRIB_CPU_STATE_CR

#define ZYDIS_ATTRIB_CPU_STATE_CR   (1ULL << 10)

The instruction may conditionally read the general CPU state.

◆ ZYDIS_ATTRIB_CPU_STATE_CW

#define ZYDIS_ATTRIB_CPU_STATE_CW   (1ULL << 11)

The instruction may conditionally write the general CPU state.

◆ ZYDIS_ATTRIB_CPUFLAG_ACCESS

#define ZYDIS_ATTRIB_CPUFLAG_ACCESS   (1ULL << 9)

The instruction accesses one or more CPU-flags.

◆ ZYDIS_ATTRIB_FPU_STATE_CR

#define ZYDIS_ATTRIB_FPU_STATE_CR   (1ULL << 12)

The instruction may conditionally read the FPU state (X87, MMX).

◆ ZYDIS_ATTRIB_FPU_STATE_CW

#define ZYDIS_ATTRIB_FPU_STATE_CW   (1ULL << 13)

The instruction may conditionally write the FPU state (X87, MMX).

◆ ZYDIS_ATTRIB_HAS_ADDRESSSIZE

#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE   (1ULL << 44)

The instruction has the address-size override prefix (0x67).

◆ ZYDIS_ATTRIB_HAS_BND

#define ZYDIS_ATTRIB_HAS_BND   (1ULL << 31)

The instruction has the BND prefix (0xF2).

◆ ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN

#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN   (1ULL << 34)

The instruction has the branch-not-taken hint (0x2E).

◆ ZYDIS_ATTRIB_HAS_BRANCH_TAKEN

#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN   (1ULL << 35)

The instruction has the branch-taken hint (0x3E).

◆ ZYDIS_ATTRIB_HAS_EVEX

#define ZYDIS_ATTRIB_HAS_EVEX   (1ULL << 5)

The instruction has the EVEX prefix.

◆ ZYDIS_ATTRIB_HAS_EVEX_B

#define ZYDIS_ATTRIB_HAS_EVEX_B   (1ULL << 45)

The instruction has the EVEX.b bit set.

This attribute is mainly used by the encoder.

◆ ZYDIS_ATTRIB_HAS_LOCK

#define ZYDIS_ATTRIB_HAS_LOCK   (1ULL << 27)

The instruction has the LOCK prefix (0xF0).

◆ ZYDIS_ATTRIB_HAS_MODRM

#define ZYDIS_ATTRIB_HAS_MODRM   (1ULL << 0)

The instruction has the ModRM byte.

◆ ZYDIS_ATTRIB_HAS_MVEX

#define ZYDIS_ATTRIB_HAS_MVEX   (1ULL << 6)

The instruction has the MVEX prefix.

◆ ZYDIS_ATTRIB_HAS_NOTRACK

#define ZYDIS_ATTRIB_HAS_NOTRACK   (1ULL << 36)

The instruction has the CET no-track prefix (0x3E).

◆ ZYDIS_ATTRIB_HAS_OPERANDSIZE

#define ZYDIS_ATTRIB_HAS_OPERANDSIZE   (1ULL << 43)

The instruction has the operand-size override prefix (0x66).

◆ ZYDIS_ATTRIB_HAS_REP

#define ZYDIS_ATTRIB_HAS_REP   (1ULL << 28)

The instruction has the REP prefix (0xF3).

◆ ZYDIS_ATTRIB_HAS_REPE

#define ZYDIS_ATTRIB_HAS_REPE   (1ULL << 29)

The instruction has the REPE/REPZ prefix (0xF3).

◆ ZYDIS_ATTRIB_HAS_REPNE

#define ZYDIS_ATTRIB_HAS_REPNE   (1ULL << 30)

The instruction has the REPNE/REPNZ prefix (0xF2).

◆ ZYDIS_ATTRIB_HAS_REPNZ

#define ZYDIS_ATTRIB_HAS_REPNZ   ZYDIS_ATTRIB_HAS_REPNE

The instruction has the REPNE/REPNZ prefix (0xF2).

◆ ZYDIS_ATTRIB_HAS_REPZ

#define ZYDIS_ATTRIB_HAS_REPZ   ZYDIS_ATTRIB_HAS_REPE

The instruction has the REPE/REPZ prefix (0xF3).

◆ ZYDIS_ATTRIB_HAS_REX

#define ZYDIS_ATTRIB_HAS_REX   (1ULL << 2)

The instruction has the REX prefix.

◆ ZYDIS_ATTRIB_HAS_SEGMENT

#define ZYDIS_ATTRIB_HAS_SEGMENT
Value:
ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
ZYDIS_ATTRIB_HAS_SEGMENT_GS)
#define ZYDIS_ATTRIB_HAS_SEGMENT_CS
The instruction has the CS segment modifier (0x2E).
Definition: SharedTypes.h:670

The instruction has a segment modifier.

◆ ZYDIS_ATTRIB_HAS_SEGMENT_CS

#define ZYDIS_ATTRIB_HAS_SEGMENT_CS   (1ULL << 37)

The instruction has the CS segment modifier (0x2E).

◆ ZYDIS_ATTRIB_HAS_SEGMENT_DS

#define ZYDIS_ATTRIB_HAS_SEGMENT_DS   (1ULL << 39)

The instruction has the DS segment modifier (0x3E).

◆ ZYDIS_ATTRIB_HAS_SEGMENT_ES

#define ZYDIS_ATTRIB_HAS_SEGMENT_ES   (1ULL << 40)

The instruction has the ES segment modifier (0x26).

◆ ZYDIS_ATTRIB_HAS_SEGMENT_FS

#define ZYDIS_ATTRIB_HAS_SEGMENT_FS   (1ULL << 41)

The instruction has the FS segment modifier (0x64).

◆ ZYDIS_ATTRIB_HAS_SEGMENT_GS

#define ZYDIS_ATTRIB_HAS_SEGMENT_GS   (1ULL << 42)

The instruction has the GS segment modifier (0x65).

◆ ZYDIS_ATTRIB_HAS_SEGMENT_SS

#define ZYDIS_ATTRIB_HAS_SEGMENT_SS   (1ULL << 38)

The instruction has the SS segment modifier (0x36).

◆ ZYDIS_ATTRIB_HAS_SIB

#define ZYDIS_ATTRIB_HAS_SIB   (1ULL << 1)

The instruction has the SIB byte.

◆ ZYDIS_ATTRIB_HAS_VEX

#define ZYDIS_ATTRIB_HAS_VEX   (1ULL << 4)

The instruction has the VEX prefix.

◆ ZYDIS_ATTRIB_HAS_XACQUIRE

#define ZYDIS_ATTRIB_HAS_XACQUIRE   (1ULL << 32)

The instruction has the XACQUIRE prefix (0xF2).

◆ ZYDIS_ATTRIB_HAS_XOP

#define ZYDIS_ATTRIB_HAS_XOP   (1ULL << 3)

The instruction has the XOP prefix.

◆ ZYDIS_ATTRIB_HAS_XRELEASE

#define ZYDIS_ATTRIB_HAS_XRELEASE   (1ULL << 33)

The instruction has the XRELEASE prefix (0xF3).

◆ ZYDIS_ATTRIB_IS_PRIVILEGED

#define ZYDIS_ATTRIB_IS_PRIVILEGED   (1ULL << 8)

The instruction is privileged.

Privileged instructions are any instructions that require a current ring level below 3.

◆ ZYDIS_ATTRIB_IS_RELATIVE

#define ZYDIS_ATTRIB_IS_RELATIVE   (1ULL << 7)

The instruction has one or more operands with position-relative offsets.

◆ ZYDIS_ATTRIB_XMM_STATE_CR

#define ZYDIS_ATTRIB_XMM_STATE_CR   (1ULL << 14)

The instruction may conditionally read the XMM state (AVX, AVX2, AVX-512).

◆ ZYDIS_ATTRIB_XMM_STATE_CW

#define ZYDIS_ATTRIB_XMM_STATE_CW   (1ULL << 15)

The instruction may conditionally write the XMM state (AVX, AVX2, AVX-512).

Typedef Documentation

◆ ZydisInstructionAttributes

typedef ZyanU64 ZydisInstructionAttributes

Defines the ZydisInstructionAttributes data-type.