libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::x86::Flags Class Reference

Handler for the x86 EFLAGS/RFLAGS register. More...

#include <Flags.hh>

Public Member Functions

bool carry () const
 Get the CF (Carry flag) bit.
 
bool parity () const
 Get the PF (Parity flag) bit.
 
bool adjust () const
 Get the AF (Adjust flag) bit.
 
bool zero () const
 Get the ZF (Zero flag) bit.
 
bool sign () const
 Get the SF (Sign flag) bit.
 
bool trap () const
 Get the TF (Trap flag) bit.
 
bool interrupt () const
 Get the IF (interrupt flag) bit.
 
void interrupt (bool val)
 Set the IF (interrupt flag) flag.
 
bool direction () const
 Get the DF (Direction flag) bit.
 
bool overflow () const
 Get the OF (Overflow flag) bit.
 
int8_t iopl () const
 Get the IOPL (I/O privilege level) bits.
 
bool nested_task () const
 Get the NT (Nested-task flag) bit.
 
bool resume () const
 Get the RF (Resume flag) bit.
 
bool virtual_8086 () const
 Get the VM (Virtual 8086 mode) bit.
 
bool alignment_check () const
 Get the AC (Aligment-check) bit.
 
bool virtual_interrupt () const
 Get the VIF (Virtual-interrupt flag) bit.
 
bool virtual_interrupt_pending () const
 Get the VIP (Virtual-interrupt pending flag) bit.
 
bool cpuid () const
 Get the ID (CPUID) bit.
 
uint64_t value () const
 Get the raw flags value.
 
void value (uint64_t value)
 Set the raw flags value.
 
 Flags ()
 Construct a new Flags instance (default)
 
 Flags (uint64_t flags)
 Construct a new Flags instances.
 
 Flags (uint64_t &flags, bool *modified)
 Construct a new Flags instances using a reference variable.
 
 Flags (const Flags &src)=delete
 
Flagsoperator= (const Flags &)=delete
 
Flagsoperator= (Flags &&) noexcept=default
 

Detailed Description

Handler for the x86 EFLAGS/RFLAGS register.

Constructor & Destructor Documentation

◆ Flags() [1/4]

introvirt::x86::Flags::Flags ( )
explicit

Construct a new Flags instance (default)

◆ Flags() [2/4]

introvirt::x86::Flags::Flags ( uint64_t  flags)
explicit

Construct a new Flags instances.

Parameters
flagsThe value to initially set

◆ Flags() [3/4]

introvirt::x86::Flags::Flags ( uint64_t &  flags,
bool *  modified 
)
explicit

Construct a new Flags instances using a reference variable.

This is primarily intended for backends to use to update a struct of registers.

Parameters
flagsA reference to the flags value to use/update
modifiedA variable to set to true if any field is modified

◆ Flags() [4/4]

introvirt::x86::Flags::Flags ( const Flags src)
delete

Member Function Documentation

◆ adjust()

bool introvirt::x86::Flags::adjust ( ) const

Get the AF (Adjust flag) bit.

Returns
true if the AF bit is set
false if the AF bit is not set

◆ alignment_check()

bool introvirt::x86::Flags::alignment_check ( ) const

Get the AC (Aligment-check) bit.

Returns
true if the AC bit is set
false if the AC bit is not set

◆ carry()

bool introvirt::x86::Flags::carry ( ) const

Get the CF (Carry flag) bit.

Returns
true if the CF bit is set
false if the CF bit is not set

◆ cpuid()

bool introvirt::x86::Flags::cpuid ( ) const

Get the ID (CPUID) bit.

Returns
true if the ID bit is set
false if the ID bit is not set

◆ direction()

bool introvirt::x86::Flags::direction ( ) const

Get the DF (Direction flag) bit.

Returns
true if the DF bit is set
false if the DF bit is not set

◆ interrupt() [1/2]

bool introvirt::x86::Flags::interrupt ( ) const

Get the IF (interrupt flag) bit.

Returns
true if the IF bit is set
false if the IF bit is not set

◆ interrupt() [2/2]

void introvirt::x86::Flags::interrupt ( bool  val)

Set the IF (interrupt flag) flag.

Parameters
valThe value to the flag to

◆ iopl()

int8_t introvirt::x86::Flags::iopl ( ) const

Get the IOPL (I/O privilege level) bits.

Returns
The IOPL value

◆ nested_task()

bool introvirt::x86::Flags::nested_task ( ) const

Get the NT (Nested-task flag) bit.

Returns
true if the NT bit is set
false if the NT bit is not set

◆ operator=() [1/2]

Flags & introvirt::x86::Flags::operator= ( const Flags )
delete

◆ operator=() [2/2]

Flags & introvirt::x86::Flags::operator= ( Flags &&  )
defaultnoexcept

◆ overflow()

bool introvirt::x86::Flags::overflow ( ) const

Get the OF (Overflow flag) bit.

Returns
true if the OF bit is set
false if the OF bit is not set

◆ parity()

bool introvirt::x86::Flags::parity ( ) const

Get the PF (Parity flag) bit.

Returns
true if the PF bit is set
false if the PF bit is not set

◆ resume()

bool introvirt::x86::Flags::resume ( ) const

Get the RF (Resume flag) bit.

Returns
true if the RF bit is set
false if the RF bit is not set

◆ sign()

bool introvirt::x86::Flags::sign ( ) const

Get the SF (Sign flag) bit.

Returns
true if the SF bit is set
false if the SF bit is not set

◆ trap()

bool introvirt::x86::Flags::trap ( ) const

Get the TF (Trap flag) bit.

Returns
true if the TF bit is set
false if the TF bit is not set

◆ value() [1/2]

uint64_t introvirt::x86::Flags::value ( ) const

Get the raw flags value.

Returns
uint64_t The raw flags value

◆ value() [2/2]

void introvirt::x86::Flags::value ( uint64_t  value)

Set the raw flags value.

Parameters
valueThe value to set

◆ virtual_8086()

bool introvirt::x86::Flags::virtual_8086 ( ) const

Get the VM (Virtual 8086 mode) bit.

Returns
true if the VM bit is set
false if the VM bit is not set

◆ virtual_interrupt()

bool introvirt::x86::Flags::virtual_interrupt ( ) const

Get the VIF (Virtual-interrupt flag) bit.

Returns
true if the VIF bit is set
false if the VIF bit is not set

◆ virtual_interrupt_pending()

bool introvirt::x86::Flags::virtual_interrupt_pending ( ) const

Get the VIP (Virtual-interrupt pending flag) bit.

Returns
true if the VIP bit is set
false if the VIP bit is not set

◆ zero()

bool introvirt::x86::Flags::zero ( ) const

Get the ZF (Zero flag) bit.

Returns
true if the ZF bit is set
false if the ZF bit is not set

The documentation for this class was generated from the following file: