pub enum Reg {
R0 = 0,
R1 = 1,
R2 = 2,
R3 = 3,
R4 = 4,
R5 = 5,
R6 = 6,
R7 = 7,
}
Expand description
A register. Must be between 0 and 7.
This Reg
struct can either be constructed by accessing an enum variant,
or by using Reg::try_from
.
§Examples
AND R0, R0, #0
~~ ~~
ADD R1, R1, R0
~~ ~~ ~~
LD R2, VALUE
~~
NOT R1, R2
~~ ~~
Variants§
R0 = 0
The 0th register in the register file.
R1 = 1
The 1st register in the register file.
R2 = 2
The 2nd register in the register file.
R3 = 3
The 3rd register in the register file.
R4 = 4
The 4th register in the register file.
R5 = 5
The 5th register in the register file.
R6 = 6
The 6th register in the register file.
R7 = 7
The 7th register in the register file.
Implementations§
Trait Implementations§
impl Copy for Reg
impl Eq for Reg
impl StructuralPartialEq for Reg
Auto Trait Implementations§
impl Freeze for Reg
impl RefUnwindSafe for Reg
impl Send for Reg
impl Sync for Reg
impl Unpin for Reg
impl UnwindSafe for Reg
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> Parse for Swhere
S: TokenParse,
impl<S> Parse for Swhere
S: TokenParse,
Source§impl<T> TokenParse for Twhere
T: DirectTokenParse,
impl<T> TokenParse for Twhere
T: DirectTokenParse,
Source§type Intermediate = T
type Intermediate = T
An intermediate to hold the match before it is converted to the actual component.
Source§fn match_(
m_token: Option<&Token>,
span: Range<usize>,
) -> Result<<T as TokenParse>::Intermediate, ParseErr>
fn match_( m_token: Option<&Token>, span: Range<usize>, ) -> Result<<T as TokenParse>::Intermediate, ParseErr>
Tries to match the next token to the given component, if possible. Read more
Source§fn convert(
imed: <T as TokenParse>::Intermediate,
_span: Range<usize>,
) -> Result<T, ParseErr>
fn convert( imed: <T as TokenParse>::Intermediate, _span: Range<usize>, ) -> Result<T, ParseErr>
Parses the intermediate into the given component, raising an error if conversion fails.