Struct aarch64defs::Cpsr64

source ·
pub struct Cpsr64(/* private fields */);
Expand description

Aarch64 SPSR_EL2 register when in 64-bit mode. Usually called CPSR by hypervisors.

Implementations§

source§

impl Cpsr64

source

pub const fn new() -> Self

Creates a new default initialized bitfield.

source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

source

pub const fn into_bits(self) -> u64

Convert into bits.

source

pub const fn sp(&self) -> bool

PSTATE.SP

Bits: 0..1

source

pub const fn with_sp(self, value: bool) -> Self

PSTATE.SP

Bits: 0..1

source

pub fn set_sp(&mut self, value: bool)

PSTATE.SP

Bits: 0..1

source

pub const fn el(&self) -> u8

Exception Level

Bits: 2..4

source

pub const fn with_el(self, value: u8) -> Self

Exception Level

Bits: 2..4

source

pub fn set_el(&mut self, value: u8)

Exception Level

Bits: 2..4

source

pub const fn aa32(&self) -> bool

Aarch32 mode. If set, this struct is the wrong one to interpret this register.

Bits: 4..5

source

pub const fn with_aa32(self, value: bool) -> Self

Aarch32 mode. If set, this struct is the wrong one to interpret this register.

Bits: 4..5

source

pub fn set_aa32(&mut self, value: bool)

Aarch32 mode. If set, this struct is the wrong one to interpret this register.

Bits: 4..5

source

pub const fn f(&self) -> bool

Bits: 6..7

source

pub const fn with_f(self, value: bool) -> Self

Bits: 6..7

source

pub fn set_f(&mut self, value: bool)

Bits: 6..7

source

pub const fn i(&self) -> bool

Bits: 7..8

source

pub const fn with_i(self, value: bool) -> Self

Bits: 7..8

source

pub fn set_i(&mut self, value: bool)

Bits: 7..8

source

pub const fn a(&self) -> bool

Bits: 8..9

source

pub const fn with_a(self, value: bool) -> Self

Bits: 8..9

source

pub fn set_a(&mut self, value: bool)

Bits: 8..9

source

pub const fn d(&self) -> bool

Bits: 9..10

source

pub const fn with_d(self, value: bool) -> Self

Bits: 9..10

source

pub fn set_d(&mut self, value: bool)

Bits: 9..10

source

pub const fn btype(&self) -> u8

Bits: 10..12

source

pub const fn with_btype(self, value: u8) -> Self

Bits: 10..12

source

pub fn set_btype(&mut self, value: u8)

Bits: 10..12

source

pub const fn ssbs(&self) -> bool

Bits: 12..13

source

pub const fn with_ssbs(self, value: bool) -> Self

Bits: 12..13

source

pub fn set_ssbs(&mut self, value: bool)

Bits: 12..13

source

pub const fn il(&self) -> bool

Bits: 20..21

source

pub const fn with_il(self, value: bool) -> Self

Bits: 20..21

source

pub fn set_il(&mut self, value: bool)

Bits: 20..21

source

pub const fn ss(&self) -> bool

Bits: 21..22

source

pub const fn with_ss(self, value: bool) -> Self

Bits: 21..22

source

pub fn set_ss(&mut self, value: bool)

Bits: 21..22

source

pub const fn pan(&self) -> bool

Bits: 22..23

source

pub const fn with_pan(self, value: bool) -> Self

Bits: 22..23

source

pub fn set_pan(&mut self, value: bool)

Bits: 22..23

source

pub const fn uao(&self) -> bool

Bits: 23..24

source

pub const fn with_uao(self, value: bool) -> Self

Bits: 23..24

source

pub fn set_uao(&mut self, value: bool)

Bits: 23..24

source

pub const fn dit(&self) -> bool

Bits: 24..25

source

pub const fn with_dit(self, value: bool) -> Self

Bits: 24..25

source

pub fn set_dit(&mut self, value: bool)

Bits: 24..25

source

pub const fn tco(&self) -> bool

Bits: 25..26

source

pub const fn with_tco(self, value: bool) -> Self

Bits: 25..26

source

pub fn set_tco(&mut self, value: bool)

Bits: 25..26

source

pub const fn v(&self) -> bool

Bits: 28..29

source

pub const fn with_v(self, value: bool) -> Self

Bits: 28..29

source

pub fn set_v(&mut self, value: bool)

Bits: 28..29

source

pub const fn c(&self) -> bool

Bits: 29..30

source

pub const fn with_c(self, value: bool) -> Self

Bits: 29..30

source

pub fn set_c(&mut self, value: bool)

Bits: 29..30

source

pub const fn z(&self) -> bool

Bits: 30..31

source

pub const fn with_z(self, value: bool) -> Self

Bits: 30..31

source

pub fn set_z(&mut self, value: bool)

Bits: 30..31

source

pub const fn n(&self) -> bool

Bits: 31..32

source

pub const fn with_n(self, value: bool) -> Self

Bits: 31..32

source

pub fn set_n(&mut self, value: bool)

Bits: 31..32

source

pub const fn res0(&self) -> u32

Bits: 32..64

source

pub const fn with_res0(self, value: u32) -> Self

Bits: 32..64

source

pub fn set_res0(&mut self, value: u32)

Bits: 32..64

Trait Implementations§

source§

impl Clone for Cpsr64

source§

fn clone(&self) -> Cpsr64

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Cpsr64

source§

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

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

impl Default for Cpsr64

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<Cpsr64> for u64

source§

fn from(v: Cpsr64) -> u64

Converts to this type from the input type.
source§

impl From<u64> for Cpsr64

source§

fn from(v: u64) -> Self

Converts to this type from the input type.
source§

impl Copy for Cpsr64

Auto Trait Implementations§

§

impl Freeze for Cpsr64

§

impl RefUnwindSafe for Cpsr64

§

impl Send for Cpsr64

§

impl Sync for Cpsr64

§

impl Unpin for Cpsr64

§

impl UnwindSafe for Cpsr64

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

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<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

source§

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

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

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

Performs the conversion.