pub enum ShiftAmount {
Immediate(i32),
Register(Register),
None,
}Expand description
How much a ShiftOp shifts by.
Variants§
Immediate(i32)
A constant amount (lsl #3).
i32, not i128: no architecture encodes a shift wider than 63, and
an i128 here would force 16-byte alignment on ShiftAmount, which
propagates through Operand into every Instruction. The signed type
is kept so a negative amount can be diagnosed rather than wrapped.
Register(Register)
A register-supplied amount (lsl r3) — ARM32 only.
None
No amount given (rrx, or a bare uxtb whose shift defaults to zero).
Trait Implementations§
Source§impl Clone for ShiftAmount
impl Clone for ShiftAmount
Source§fn clone(&self) -> ShiftAmount
fn clone(&self) -> ShiftAmount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShiftAmount
Source§impl Debug for ShiftAmount
impl Debug for ShiftAmount
Source§impl Display for ShiftAmount
impl Display for ShiftAmount
impl Eq for ShiftAmount
Source§impl PartialEq for ShiftAmount
impl PartialEq for ShiftAmount
impl StructuralPartialEq for ShiftAmount
Auto Trait Implementations§
impl Freeze for ShiftAmount
impl RefUnwindSafe for ShiftAmount
impl Send for ShiftAmount
impl Sync for ShiftAmount
impl Unpin for ShiftAmount
impl UnsafeUnpin for ShiftAmount
impl UnwindSafe for ShiftAmount
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