Struct Imm12
pub struct Imm12 {
pub bits: u16,
pub shift12: bool,
}
Expand description
A shifted immediate value in ‘imm12’ format: supports 12 bits, shifted left by 0 or 12 places.
Fields§
§bits: u16
The immediate bits.
shift12: bool
Whether the immediate bits are shifted left by 12 or not.
Implementations§
§impl Imm12
impl Imm12
pub fn maybe_from_u64(val: u64) -> Option<Imm12>
pub fn maybe_from_u64(val: u64) -> Option<Imm12>
Compute a Imm12 from raw bits, if possible.
pub fn shift_bits(&self) -> u32
pub fn shift_bits(&self) -> u32
Bits for 2-bit “shift” field in e.g. AddI.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Imm12
impl RefUnwindSafe for Imm12
impl Send for Imm12
impl Sync for Imm12
impl Unpin for Imm12
impl UnwindSafe for Imm12
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