Skip to main content

SavedProgramStatusRegister

Struct SavedProgramStatusRegister 

Source
pub struct SavedProgramStatusRegister(/* private fields */);
Expand description

The layout of SPSR_EL1, SPSR_EL2, and SPSR_EL3.

These are the assignments when an exception is taken from AArch64 state.

Implementations§

Source§

impl SavedProgramStatusRegister

Source

pub const RSVD1_MASK: u64

Mask of all reserved-as-1 bits.

Source

pub const RSVD0_MASK: u64

Mask of all reserved-as-0 bits.

Source

pub const DEFAULT: u64

The default value of the layout, combining all field defaults and reserved-as values.

Source

pub const N_MASK: u64

Unshifted bitmask of n.

Source

pub const N_SHIFT: usize = 31

Bit shift (i.e., the low bit) of n.

Source

pub const Z_MASK: u64

Unshifted bitmask of z.

Source

pub const Z_SHIFT: usize = 30

Bit shift (i.e., the low bit) of z.

Source

pub const C_MASK: u64

Unshifted bitmask of c.

Source

pub const C_SHIFT: usize = 29

Bit shift (i.e., the low bit) of c.

Source

pub const V_MASK: u64

Unshifted bitmask of v.

Source

pub const V_SHIFT: usize = 28

Bit shift (i.e., the low bit) of v.

Source

pub const TCO_MASK: u64

Unshifted bitmask of tco.

Source

pub const TCO_SHIFT: usize = 25

Bit shift (i.e., the low bit) of tco.

Source

pub const DIT_MASK: u64

Unshifted bitmask of dit.

Source

pub const DIT_SHIFT: usize = 24

Bit shift (i.e., the low bit) of dit.

Source

pub const UAO_MASK: u64

Unshifted bitmask of uao.

Source

pub const UAO_SHIFT: usize = 23

Bit shift (i.e., the low bit) of uao.

Source

pub const PAN_MASK: u64

Unshifted bitmask of pan.

Source

pub const PAN_SHIFT: usize = 22

Bit shift (i.e., the low bit) of pan.

Source

pub const SS_MASK: u64

Unshifted bitmask of ss.

Source

pub const SS_SHIFT: usize = 21

Bit shift (i.e., the low bit) of ss.

Source

pub const IL_MASK: u64

Unshifted bitmask of il.

Source

pub const IL_SHIFT: usize = 20

Bit shift (i.e., the low bit) of il.

Source

pub const SSBS_MASK: u64

Unshifted bitmask of ssbs.

Source

pub const SSBS_SHIFT: usize = 12

Bit shift (i.e., the low bit) of ssbs.

Source

pub const BTYPE_MASK: u64

Unshifted bitmask of btype.

Source

pub const BTYPE_SHIFT: usize = 10

Bit shift (i.e., the low bit) of btype.

Source

pub const D_MASK: u64

Unshifted bitmask of d.

Source

pub const D_SHIFT: usize = 9

Bit shift (i.e., the low bit) of d.

Source

pub const A_MASK: u64

Unshifted bitmask of a.

Source

pub const A_SHIFT: usize = 8

Bit shift (i.e., the low bit) of a.

Source

pub const I_MASK: u64

Unshifted bitmask of i.

Source

pub const I_SHIFT: usize = 7

Bit shift (i.e., the low bit) of i.

Source

pub const F_MASK: u64

Unshifted bitmask of f.

Source

pub const F_SHIFT: usize = 6

Bit shift (i.e., the low bit) of f.

Source

pub const A32_MASK: u64

Unshifted bitmask of a32.

Source

pub const A32_SHIFT: usize = 4

Bit shift (i.e., the low bit) of a32.

Source

pub const M_MASK: u64

Unshifted bitmask of m.

Source

pub const M_SHIFT: usize = 0

Bit shift (i.e., the low bit) of m.

Source

pub const FIELDS: [FieldMetadata<u64>; 18]

Metadata of all named fields in the layout.

Source

pub const fn new() -> Self

Creates a new instance with reserved-as-1 bits set and all other bits zeroed (i.e., with a value of Self::RSVD1_MASK).

Source

pub const fn bits(self) -> u64

Source

pub const fn n(&self) -> bool

The value of SavedProgramStatusRegister31.

Source

pub const fn set_n(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister31.

Source

pub const fn z(&self) -> bool

The value of SavedProgramStatusRegister30.

Source

pub const fn set_z(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister30.

Source

pub const fn c(&self) -> bool

The value of SavedProgramStatusRegister29.

Source

pub const fn set_c(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister29.

Source

pub const fn v(&self) -> bool

The value of SavedProgramStatusRegister28.

Source

pub const fn set_v(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister28.

Source

pub const fn tco(&self) -> bool

The value of SavedProgramStatusRegister25.

Source

pub const fn set_tco(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister25.

Source

pub const fn dit(&self) -> bool

The value of SavedProgramStatusRegister24.

Source

pub const fn set_dit(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister24.

Source

pub const fn uao(&self) -> bool

The value of SavedProgramStatusRegister23.

Source

pub const fn set_uao(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister23.

Source

pub const fn pan(&self) -> bool

The value of SavedProgramStatusRegister22.

Source

pub const fn set_pan(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister22.

Source

pub const fn ss(&self) -> bool

The value of SavedProgramStatusRegister21.

Source

pub const fn set_ss(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister21.

Source

pub const fn il(&self) -> bool

The value of SavedProgramStatusRegister20.

Source

pub const fn set_il(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister20.

Source

pub const fn ssbs(&self) -> bool

The value of SavedProgramStatusRegister12.

Source

pub const fn set_ssbs(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister12.

Source

pub const fn btype(&self) -> u8

The value of SavedProgramStatusRegister[11:10].

Source

pub const fn set_btype(&mut self, value: u8) -> &mut Self

Sets the value of SavedProgramStatusRegister[11:10].

Source

pub const fn d(&self) -> bool

The value of SavedProgramStatusRegister9.

Source

pub const fn set_d(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister9.

Source

pub const fn a(&self) -> bool

The value of SavedProgramStatusRegister8.

Source

pub const fn set_a(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister8.

Source

pub const fn i(&self) -> bool

The value of SavedProgramStatusRegister7.

Source

pub const fn set_i(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister7.

Source

pub const fn f(&self) -> bool

The value of SavedProgramStatusRegister6.

Source

pub const fn set_f(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister6.

Source

pub const fn a32(&self) -> bool

The value of SavedProgramStatusRegister4.

Source

pub const fn set_a32(&mut self, value: bool) -> &mut Self

Sets the value of SavedProgramStatusRegister4.

Source

pub fn m(&self) -> SpsrExceptionLevel

The value of SavedProgramStatusRegister[3:0].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_m to recover from invalid bit patterns.

Source

pub fn try_m(&self) -> Result<SpsrExceptionLevel, InvalidBits<u8>>

Fallible variant of Self::m.

Source

pub fn set_m(&mut self, value: SpsrExceptionLevel) -> &mut Self

Sets the value of SavedProgramStatusRegister[3:0].

Source§

impl SavedProgramStatusRegister

Source

pub fn iter(&self) -> SavedProgramStatusRegisterIter

Returns an iterator over (metadata, value) pairs for each field.

Source§

impl SavedProgramStatusRegister

Source

pub fn el(self) -> CurrentEl

EL this exception was taken from.

Source

pub fn spsel(self) -> bool

SPSel state at the exception (true if it used SP_ELx).

Trait Implementations§

Source§

impl Binary for SavedProgramStatusRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where SpsrExceptionLevel: Debug,

Formats the value using the given formatter. Read more
Source§

impl Clone for SavedProgramStatusRegister

Source§

fn clone(&self) -> SavedProgramStatusRegister

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SavedProgramStatusRegister

Source§

impl Debug for SavedProgramStatusRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SavedProgramStatusRegister

Source§

fn default() -> Self

Returns an instance with the default bits set (i.e,. with a value of Self::DEFAULT.

Source§

impl Eq for SavedProgramStatusRegister

Source§

impl From<SavedProgramStatusRegister> for u64

Source§

fn from(value: SavedProgramStatusRegister) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for SavedProgramStatusRegister

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl IntoIterator for SavedProgramStatusRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = SavedProgramStatusRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a SavedProgramStatusRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = SavedProgramStatusRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for SavedProgramStatusRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where SpsrExceptionLevel: Debug,

Formats the value using the given formatter. Read more
Source§

impl Octal for SavedProgramStatusRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where SpsrExceptionLevel: Debug,

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SavedProgramStatusRegister

Source§

fn eq(&self, other: &SavedProgramStatusRegister) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SavedProgramStatusRegister

Source§

impl UpperHex for SavedProgramStatusRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where SpsrExceptionLevel: Debug,

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.