Enum lc3_ensemble::ast::ImmOrReg
source · pub enum ImmOrReg<const N: u32> {
Imm(IOffset<N>),
Reg(Reg),
}Expand description
A value representing either an immediate value or a register.
This is used to handle cases where an operand can be either
an immediate value or a register (e.g., in AND or ADD).
§Examples
AND R0, R0, #0
AND R1, R1, R1
ADD R2, R2, #2
ADD R3, R3, R3
^^
Variants§
Trait Implementations§
source§impl<const N: u32> PartialEq for ImmOrReg<N>
impl<const N: u32> PartialEq for ImmOrReg<N>
impl<const N: u32> Copy for ImmOrReg<N>
impl<const N: u32> Eq for ImmOrReg<N>
impl<const N: u32> StructuralPartialEq for ImmOrReg<N>
Auto Trait Implementations§
impl<const N: u32> Freeze for ImmOrReg<N>
impl<const N: u32> RefUnwindSafe for ImmOrReg<N>
impl<const N: u32> Send for ImmOrReg<N>
impl<const N: u32> Sync for ImmOrReg<N>
impl<const N: u32> Unpin for ImmOrReg<N>
impl<const N: u32> UnwindSafe for ImmOrReg<N>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)