Intel® X86 Encoder Decoder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Flags Interface

There are several functions that provide more information about the flags read and written. More...

Data Structures

union  xed_flag_dfv_s
 
struct  xed_flag_enum_s
 
union  xed_flag_set_s
 
struct  xed_simple_flag_s
 

Typedefs

typedef union xed_flag_dfv_s xed_flag_dfv_t
 

Flag-set accessors

typedef struct xed_flag_enum_s xed_flag_action_t
 
XED_DLL_EXPORT int xed_flag_set_print (const xed_flag_set_t *p, char *buf, int buflen)
 
XED_DLL_EXPORT xed_bool_t xed_flag_set_is_subset_of (const xed_flag_set_t *p, const xed_flag_set_t *other)
 

Lowest-level flag-action accessors

typedef struct xed_simple_flag_s xed_simple_flag_t
 
XED_DLL_EXPORT xed_flag_enum_t xed_flag_action_get_flag_name (const xed_flag_action_t *p)
 
XED_DLL_EXPORT xed_flag_action_enum_t xed_flag_action_get_action (const xed_flag_action_t *p, unsigned int i)
 
XED_DLL_EXPORT xed_bool_t xed_flag_action_action_invalid (const xed_flag_action_enum_t a)
 
XED_DLL_EXPORT int xed_flag_action_print (const xed_flag_action_t *p, char *buf, int buflen)
 
XED_DLL_EXPORT xed_bool_t xed_flag_action_read_flag (const xed_flag_action_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_flag_action_writes_flag (const xed_flag_action_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_flag_action_read_action (xed_flag_action_enum_t a)
 
XED_DLL_EXPORT xed_bool_t xed_flag_action_write_action (xed_flag_action_enum_t a)
 

Accessing the simple flags (Mid-level access)

XED_DLL_EXPORT unsigned int xed_simple_flag_get_nflags (const xed_simple_flag_t *p)
 
const XED_DLL_EXPORT xed_flag_set_txed_simple_flag_get_read_flag_set (const xed_simple_flag_t *p)
 
const XED_DLL_EXPORT xed_flag_set_txed_simple_flag_get_written_flag_set (const xed_simple_flag_t *p)
 
const XED_DLL_EXPORT xed_flag_set_txed_simple_flag_get_undefined_flag_set (const xed_simple_flag_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_simple_flag_get_may_write (const xed_simple_flag_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_simple_flag_get_must_write (const xed_simple_flag_t *p)
 
const XED_DLL_EXPORT xed_flag_action_txed_simple_flag_get_flag_action (const xed_simple_flag_t *p, unsigned int i)
 
XED_DLL_EXPORT xed_bool_t xed_simple_flag_reads_flags (const xed_simple_flag_t *p)
 
XED_DLL_EXPORT xed_bool_t xed_simple_flag_writes_flags (const xed_simple_flag_t *p)
 
XED_DLL_EXPORT int xed_simple_flag_print (const xed_simple_flag_t *p, char *buf, int buflen)
 
static XED_INLINE unsigned int xed_flag_set_mask (const xed_flag_set_t *p)
 

Detailed Description

There are several functions that provide more information about the flags read and written.

The flags are available from the xed_decoded_inst_t via the xed_decoded_inst_get_rflags_info() function which returns a xed_simple_flag_t pointer.

The type xed_flag_set_t keeps the integer flags in the order specified by the RFLAGS register. The x87 flags are stored in the most significant 4 bits of the flag set. This should not affect use by the normal integer operations; Those bits are reserved as zero in the RFLAGS.

Typedef Documentation

◆ xed_flag_action_t

Associated with each flag field there can be one action.

◆ xed_flag_dfv_t

a struct representing an instruction's default flags values

◆ xed_simple_flag_t

A collection of xed_flag_action_t's and unions of read and written flags

Function Documentation

◆ xed_flag_action_action_invalid()

XED_DLL_EXPORT xed_bool_t xed_flag_action_action_invalid ( const xed_flag_action_enum_t  a)


returns true if the specified action is invalid. Only the 2nd flag might be invalid.

◆ xed_flag_action_get_action()

XED_DLL_EXPORT xed_flag_action_enum_t xed_flag_action_get_action ( const xed_flag_action_t p,
unsigned int  i 
)


return the action

◆ xed_flag_action_get_flag_name()

XED_DLL_EXPORT xed_flag_enum_t xed_flag_action_get_flag_name ( const xed_flag_action_t p)


get the name of the flag

◆ xed_flag_action_print()

XED_DLL_EXPORT int xed_flag_action_print ( const xed_flag_action_t p,
char *  buf,
int  buflen 
)


print the flag & actions

◆ xed_flag_action_read_action()

XED_DLL_EXPORT xed_bool_t xed_flag_action_read_action ( xed_flag_action_enum_t  a)


test to see if the specific action is a read

◆ xed_flag_action_read_flag()

XED_DLL_EXPORT xed_bool_t xed_flag_action_read_flag ( const xed_flag_action_t p)


returns true if either action is a read

◆ xed_flag_action_write_action()

XED_DLL_EXPORT xed_bool_t xed_flag_action_write_action ( xed_flag_action_enum_t  a)


test to see if a specific action is a write

◆ xed_flag_action_writes_flag()

XED_DLL_EXPORT xed_bool_t xed_flag_action_writes_flag ( const xed_flag_action_t p)


returns true if either action is a write

◆ xed_flag_set_is_subset_of()

XED_DLL_EXPORT xed_bool_t xed_flag_set_is_subset_of ( const xed_flag_set_t p,
const xed_flag_set_t other 
)

returns true if this object has a subset of the flags of the "other" object.

◆ xed_flag_set_mask()

static XED_INLINE unsigned int xed_flag_set_mask ( const xed_flag_set_t p)
static


Return the flags as a mask

◆ xed_flag_set_print()

XED_DLL_EXPORT int xed_flag_set_print ( const xed_flag_set_t p,
char *  buf,
int  buflen 
)

print the flag set in the supplied buffer

◆ xed_simple_flag_get_flag_action()

const XED_DLL_EXPORT xed_flag_action_t* xed_simple_flag_get_flag_action ( const xed_simple_flag_t p,
unsigned int  i 
)

return the specific flag-action. Very detailed low level information

◆ xed_simple_flag_get_may_write()

XED_DLL_EXPORT xed_bool_t xed_simple_flag_get_may_write ( const xed_simple_flag_t p)

Indicates the flags are only conditionally written. Usually MAY-writes of the flags instructions that are dependent on a REP count.

◆ xed_simple_flag_get_must_write()

XED_DLL_EXPORT xed_bool_t xed_simple_flag_get_must_write ( const xed_simple_flag_t p)

the flags always written

◆ xed_simple_flag_get_nflags()

XED_DLL_EXPORT unsigned int xed_simple_flag_get_nflags ( const xed_simple_flag_t p)

returns the number of flag-actions

◆ xed_simple_flag_get_read_flag_set()

const XED_DLL_EXPORT xed_flag_set_t* xed_simple_flag_get_read_flag_set ( const xed_simple_flag_t p)

return union of bits for read flags

◆ xed_simple_flag_get_undefined_flag_set()

const XED_DLL_EXPORT xed_flag_set_t* xed_simple_flag_get_undefined_flag_set ( const xed_simple_flag_t p)


return union of bits for undefined flags

◆ xed_simple_flag_get_written_flag_set()

const XED_DLL_EXPORT xed_flag_set_t* xed_simple_flag_get_written_flag_set ( const xed_simple_flag_t p)


return union of bits for written flags

◆ xed_simple_flag_print()

XED_DLL_EXPORT int xed_simple_flag_print ( const xed_simple_flag_t p,
char *  buf,
int  buflen 
)


print the flags

◆ xed_simple_flag_reads_flags()

XED_DLL_EXPORT xed_bool_t xed_simple_flag_reads_flags ( const xed_simple_flag_t p)


boolean test to see if flags are read, scans the flags

◆ xed_simple_flag_writes_flags()

XED_DLL_EXPORT xed_bool_t xed_simple_flag_writes_flags ( const xed_simple_flag_t p)


boolean test to see if flags are written, scans the flags