pub struct SavedProgramStatusRegister(/* private fields */);Expand description
Implementations§
Source§impl SavedProgramStatusRegister
impl SavedProgramStatusRegister
Sourcepub const RSVD1_MASK: u64
pub const RSVD1_MASK: u64
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u64
pub const RSVD0_MASK: u64
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u64
pub const DEFAULT: u64
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const SSBS_SHIFT: usize = 12
pub const SSBS_SHIFT: usize = 12
Bit shift (i.e., the low bit) of ssbs.
Sourcepub const BTYPE_MASK: u64
pub const BTYPE_MASK: u64
Unshifted bitmask of btype.
Sourcepub const BTYPE_SHIFT: usize = 10
pub const BTYPE_SHIFT: usize = 10
Bit shift (i.e., the low bit) of btype.
Sourcepub const FIELDS: [FieldMetadata<u64>; 18]
pub const FIELDS: [FieldMetadata<u64>; 18]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
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).
pub const fn bits(self) -> u64
Sourcepub const fn set_n(&mut self, value: bool) -> &mut Self
pub const fn set_n(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister31.
Sourcepub const fn set_z(&mut self, value: bool) -> &mut Self
pub const fn set_z(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister30.
Sourcepub const fn set_c(&mut self, value: bool) -> &mut Self
pub const fn set_c(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister29.
Sourcepub const fn set_v(&mut self, value: bool) -> &mut Self
pub const fn set_v(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister28.
Sourcepub const fn set_tco(&mut self, value: bool) -> &mut Self
pub const fn set_tco(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister25.
Sourcepub const fn set_dit(&mut self, value: bool) -> &mut Self
pub const fn set_dit(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister24.
Sourcepub const fn set_uao(&mut self, value: bool) -> &mut Self
pub const fn set_uao(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister23.
Sourcepub const fn set_pan(&mut self, value: bool) -> &mut Self
pub const fn set_pan(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister22.
Sourcepub const fn set_ss(&mut self, value: bool) -> &mut Self
pub const fn set_ss(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister21.
Sourcepub const fn set_il(&mut self, value: bool) -> &mut Self
pub const fn set_il(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister20.
Sourcepub const fn set_ssbs(&mut self, value: bool) -> &mut Self
pub const fn set_ssbs(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister12.
Sourcepub const fn set_btype(&mut self, value: u8) -> &mut Self
pub const fn set_btype(&mut self, value: u8) -> &mut Self
Sets the value of SavedProgramStatusRegister[11:10].
Sourcepub const fn set_d(&mut self, value: bool) -> &mut Self
pub const fn set_d(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister9.
Sourcepub const fn set_a(&mut self, value: bool) -> &mut Self
pub const fn set_a(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister8.
Sourcepub const fn set_i(&mut self, value: bool) -> &mut Self
pub const fn set_i(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister7.
Sourcepub const fn set_f(&mut self, value: bool) -> &mut Self
pub const fn set_f(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister6.
Sourcepub const fn set_a32(&mut self, value: bool) -> &mut Self
pub const fn set_a32(&mut self, value: bool) -> &mut Self
Sets the value of SavedProgramStatusRegister4.
Sourcepub fn m(&self) -> SpsrExceptionLevelwhere
SpsrExceptionLevel: TryFromBytes,
pub fn m(&self) -> SpsrExceptionLevelwhere
SpsrExceptionLevel: TryFromBytes,
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.
Sourcepub fn try_m(&self) -> Result<SpsrExceptionLevel, InvalidBits<u8>>where
SpsrExceptionLevel: TryFromBytes,
pub fn try_m(&self) -> Result<SpsrExceptionLevel, InvalidBits<u8>>where
SpsrExceptionLevel: TryFromBytes,
Fallible variant of Self::m.
Sourcepub fn set_m(&mut self, value: SpsrExceptionLevel) -> &mut Self
pub fn set_m(&mut self, value: SpsrExceptionLevel) -> &mut Self
Sets the value of SavedProgramStatusRegister[3:0].
Trait Implementations§
Source§impl Binary for SavedProgramStatusRegister
impl Binary for SavedProgramStatusRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
Source§impl Clone for SavedProgramStatusRegister
impl Clone for SavedProgramStatusRegister
Source§fn clone(&self) -> SavedProgramStatusRegister
fn clone(&self) -> SavedProgramStatusRegister
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SavedProgramStatusRegister
Source§impl Debug for SavedProgramStatusRegister
impl Debug for SavedProgramStatusRegister
Source§impl Default for SavedProgramStatusRegister
impl Default for SavedProgramStatusRegister
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for SavedProgramStatusRegister
Source§impl From<SavedProgramStatusRegister> for u64
impl From<SavedProgramStatusRegister> for u64
Source§fn from(value: SavedProgramStatusRegister) -> Self
fn from(value: SavedProgramStatusRegister) -> Self
Source§impl From<u64> for SavedProgramStatusRegister
impl From<u64> for SavedProgramStatusRegister
Source§impl IntoIterator for SavedProgramStatusRegister
impl IntoIterator for SavedProgramStatusRegister
Source§impl<'a> IntoIterator for &'a SavedProgramStatusRegister
impl<'a> IntoIterator for &'a SavedProgramStatusRegister
Source§impl LowerHex for SavedProgramStatusRegister
impl LowerHex for SavedProgramStatusRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
Source§impl Octal for SavedProgramStatusRegister
impl Octal for SavedProgramStatusRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
Source§impl PartialEq for SavedProgramStatusRegister
impl PartialEq for SavedProgramStatusRegister
impl StructuralPartialEq for SavedProgramStatusRegister
Source§impl UpperHex for SavedProgramStatusRegister
impl UpperHex for SavedProgramStatusRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
SpsrExceptionLevel: Debug,
Auto Trait Implementations§
impl Freeze for SavedProgramStatusRegister
impl RefUnwindSafe for SavedProgramStatusRegister
impl Send for SavedProgramStatusRegister
impl Sync for SavedProgramStatusRegister
impl Unpin for SavedProgramStatusRegister
impl UnsafeUnpin for SavedProgramStatusRegister
impl UnwindSafe for SavedProgramStatusRegister
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)