pub struct RegisterFlags { /* private fields */ }Expand description
Flags describing register properties
Implementations§
Source§impl RegisterFlags
impl RegisterFlags
Sourcepub const VIRTUAL: RegisterFlags
pub const VIRTUAL: RegisterFlags
Default value if no flags set. Read/write pure virtual register that is not a stack pointer or flags
Sourcepub const PHYSICAL: RegisterFlags
pub const PHYSICAL: RegisterFlags
Indicates that the register is a physical register
Sourcepub const LOCAL: RegisterFlags
pub const LOCAL: RegisterFlags
Indicates that the register is a local temporary register of the current basic block
Sourcepub const FLAGS: RegisterFlags
pub const FLAGS: RegisterFlags
Indicates that the register is used to hold CPU flags
Sourcepub const STACK_POINTER: RegisterFlags
pub const STACK_POINTER: RegisterFlags
Indicates that the register is used as the stack pointer
Sourcepub const IMAGE_BASE: RegisterFlags
pub const IMAGE_BASE: RegisterFlags
Indicates that the register is an alias to the image base
Sourcepub const VOLATILE: RegisterFlags
pub const VOLATILE: RegisterFlags
Indicates that the register can change spontanously (e.g.: IA32_TIME_STAMP_COUNTER)
Sourcepub const READONLY: RegisterFlags
pub const READONLY: RegisterFlags
Indicates that the register can change spontanously (e.g.: IA32_TIME_STAMP_COUNTER)
Sourcepub const UNDEFINED: RegisterFlags
pub const UNDEFINED: RegisterFlags
Indicates that it is the special “undefined” register
Sourcepub const INTERNAL: RegisterFlags
pub const INTERNAL: RegisterFlags
Indicates that it is a internal-use register that should be treated like any other virtual register
Sourcepub const SPECIAL: RegisterFlags
pub const SPECIAL: RegisterFlags
Combined mask of all special registers
Sourcepub const fn empty() -> RegisterFlags
pub const fn empty() -> RegisterFlags
Returns an empty set of flags
Sourcepub const fn all() -> RegisterFlags
pub const fn all() -> RegisterFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u64) -> Option<RegisterFlags>
pub fn from_bits(bits: u64) -> Option<RegisterFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u64) -> RegisterFlags
pub const fn from_bits_truncate(bits: u64) -> RegisterFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u64) -> RegisterFlags
pub const unsafe fn from_bits_unchecked(bits: u64) -> RegisterFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: RegisterFlags) -> bool
pub const fn intersects(&self, other: RegisterFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: RegisterFlags) -> bool
pub const fn contains(&self, other: RegisterFlags) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: RegisterFlags)
pub fn insert(&mut self, other: RegisterFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: RegisterFlags)
pub fn remove(&mut self, other: RegisterFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: RegisterFlags)
pub fn toggle(&mut self, other: RegisterFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: RegisterFlags, value: bool)
pub fn set(&mut self, other: RegisterFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for RegisterFlags
impl Binary for RegisterFlags
Source§impl BitAnd for RegisterFlags
impl BitAnd for RegisterFlags
Source§fn bitand(self, other: RegisterFlags) -> RegisterFlags
fn bitand(self, other: RegisterFlags) -> RegisterFlags
Returns the intersection between the two sets of flags.
Source§type Output = RegisterFlags
type Output = RegisterFlags
& operator.Source§impl BitAndAssign for RegisterFlags
impl BitAndAssign for RegisterFlags
Source§fn bitand_assign(&mut self, other: RegisterFlags)
fn bitand_assign(&mut self, other: RegisterFlags)
Disables all flags disabled in the set.
Source§impl BitOr for RegisterFlags
impl BitOr for RegisterFlags
Source§fn bitor(self, other: RegisterFlags) -> RegisterFlags
fn bitor(self, other: RegisterFlags) -> RegisterFlags
Returns the union of the two sets of flags.
Source§type Output = RegisterFlags
type Output = RegisterFlags
| operator.Source§impl BitOrAssign for RegisterFlags
impl BitOrAssign for RegisterFlags
Source§fn bitor_assign(&mut self, other: RegisterFlags)
fn bitor_assign(&mut self, other: RegisterFlags)
Adds the set of flags.
Source§impl BitXor for RegisterFlags
impl BitXor for RegisterFlags
Source§fn bitxor(self, other: RegisterFlags) -> RegisterFlags
fn bitxor(self, other: RegisterFlags) -> RegisterFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = RegisterFlags
type Output = RegisterFlags
^ operator.Source§impl BitXorAssign for RegisterFlags
impl BitXorAssign for RegisterFlags
Source§fn bitxor_assign(&mut self, other: RegisterFlags)
fn bitxor_assign(&mut self, other: RegisterFlags)
Toggles the set of flags.
Source§impl Clone for RegisterFlags
impl Clone for RegisterFlags
Source§fn clone(&self) -> RegisterFlags
fn clone(&self) -> RegisterFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegisterFlags
impl Debug for RegisterFlags
Source§impl Extend<RegisterFlags> for RegisterFlags
impl Extend<RegisterFlags> for RegisterFlags
Source§fn extend<T: IntoIterator<Item = RegisterFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = RegisterFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<RegisterFlags> for RegisterFlags
impl FromIterator<RegisterFlags> for RegisterFlags
Source§fn from_iter<T: IntoIterator<Item = RegisterFlags>>(
iterator: T,
) -> RegisterFlags
fn from_iter<T: IntoIterator<Item = RegisterFlags>>( iterator: T, ) -> RegisterFlags
Source§impl Hash for RegisterFlags
impl Hash for RegisterFlags
Source§impl LowerHex for RegisterFlags
impl LowerHex for RegisterFlags
Source§impl Not for RegisterFlags
impl Not for RegisterFlags
Source§fn not(self) -> RegisterFlags
fn not(self) -> RegisterFlags
Returns the complement of this set of flags.
Source§type Output = RegisterFlags
type Output = RegisterFlags
! operator.Source§impl Octal for RegisterFlags
impl Octal for RegisterFlags
Source§impl Ord for RegisterFlags
impl Ord for RegisterFlags
Source§fn cmp(&self, other: &RegisterFlags) -> Ordering
fn cmp(&self, other: &RegisterFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RegisterFlags
impl PartialEq for RegisterFlags
Source§impl PartialOrd for RegisterFlags
impl PartialOrd for RegisterFlags
Source§impl Sub for RegisterFlags
impl Sub for RegisterFlags
Source§fn sub(self, other: RegisterFlags) -> RegisterFlags
fn sub(self, other: RegisterFlags) -> RegisterFlags
Returns the set difference of the two sets of flags.
Source§type Output = RegisterFlags
type Output = RegisterFlags
- operator.Source§impl SubAssign for RegisterFlags
impl SubAssign for RegisterFlags
Source§fn sub_assign(&mut self, other: RegisterFlags)
fn sub_assign(&mut self, other: RegisterFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for RegisterFlags
impl UpperHex for RegisterFlags
impl Copy for RegisterFlags
impl Eq for RegisterFlags
impl StructuralPartialEq for RegisterFlags
Auto Trait Implementations§
impl Freeze for RegisterFlags
impl RefUnwindSafe for RegisterFlags
impl Send for RegisterFlags
impl Sync for RegisterFlags
impl Unpin for RegisterFlags
impl UnwindSafe for RegisterFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.