pub struct PsrField {
pub saved: bool,
pub mask: u8,
}Expand description
An ARM32 program status register together with the byte fields an MSR
writes to it.
The field suffix is not decoration: msr cpsr_f, r0 updates only the
condition flags, while msr cpsr_c, r0 can change the processor mode and
interrupt masks. Encoding one as the other would be a silent behaviour
change, so the selector is carried through the IR rather than defaulted.
Fields§
§saved: booltrue for SPSR, false for CPSR.
mask: u8Field mask, in the bit order the instruction encodes it:
bit 0 = c (control), 1 = x (extension), 2 = s (status),
3 = f (flags).
Implementations§
Source§impl PsrField
impl PsrField
Sourcepub fn from_lower(s: &str) -> Option<Self>
pub fn from_lower(s: &str) -> Option<Self>
Parse cpsr / spsr, optionally suffixed with _ and any combination
of the field letters c, x, s, f (or _all). Input must already
be lowercase.
A bare cpsr selects the f and c fields, matching GNU as, which
keeps the pre-UAL spelling meaning what it always did.