pub enum MInstruction {
Mul,
Mulh,
Mulhsu,
Mulhu,
Div,
Divu,
Rem,
Remu,
}Expand description
M extension instructions Following https://msyksphinz-self.github.io/riscv-isadoc/html/rvm.html
Variants§
Mul
Format: mul rd, rs1, rs2
Description: performs an 32-bit 32-bit multiplication of signed rs1
by signed rs2 and places the lower 32 bits in the destination register.
Implementation: x[rd] = x[rs1] * x[rs2]
Mulh
Format: mulh rd, rs1, rs2
Description: performs an 32-bit 32-bit multiplication of signed rs1 by
signed rs2 and places the upper 32 bits in the destination register.
Implementation: x[rd] = (x[rs1] * x[rs2]) >> 32
Mulhsu
Format: mulhsu rd, rs1, rs2
Description: performs an 32-bit 32-bit multiplication of signed rs1 by
unsigned rs2 and places the upper 32 bits in the destination register.
Implementation: x[rd] = (x[rs1] * x[rs2]) >> 32
Mulhu
Format: mulhu rd, rs1, rs2
Description: performs an 32-bit 32-bit multiplication of unsigned rs1 by
unsigned rs2 and places the upper 32 bits in the destination register.
Implementation: x[rd] = (x[rs1] * x[rs2]) >> 32
Div
Format: div rd, rs1, rs2
Description: perform an 32 bits by 32 bits signed integer division of
rs1 by rs2, rounding towards zero
Implementation: x[rd] = x[rs1] /s x[rs2]
Divu
Format: divu rd, rs1, rs2
Description: performs an 32 bits by 32 bits unsigned integer division of
rs1 by rs2, rounding towards zero.
Implementation: x[rd] = x[rs1] /u x[rs2]
Rem
Format: rem rd, rs1, rs2
Description: performs an 32 bits by 32 bits signed integer reminder of
rs1 by rs2.
Implementation: x[rd] = x[rs1] %s x[rs2]
Remu
Format: remu rd, rs1, rs2
Description: performs an 32 bits by 32 bits unsigned integer reminder of
rs1 by rs2.
Implementation: x[rd] = x[rs1] %u x[rs2]
Trait Implementations§
Source§impl Clone for MInstruction
impl Clone for MInstruction
Source§fn clone(&self) -> MInstruction
fn clone(&self) -> MInstruction
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MInstruction
impl Debug for MInstruction
Source§impl Default for MInstruction
impl Default for MInstruction
Source§fn default() -> MInstruction
fn default() -> MInstruction
Source§impl Display for MInstruction
impl Display for MInstruction
Source§impl Hash for MInstruction
impl Hash for MInstruction
Source§impl IntoEnumIterator for MInstruction
impl IntoEnumIterator for MInstruction
type Iterator = MInstructionIter
fn iter() -> MInstructionIter ⓘ
Source§impl Ord for MInstruction
impl Ord for MInstruction
Source§impl PartialEq for MInstruction
impl PartialEq for MInstruction
Source§impl PartialOrd for MInstruction
impl PartialOrd for MInstruction
impl Copy for MInstruction
impl Eq for MInstruction
impl StructuralPartialEq for MInstruction
Auto Trait Implementations§
impl Freeze for MInstruction
impl RefUnwindSafe for MInstruction
impl Send for MInstruction
impl Sync for MInstruction
impl Unpin for MInstruction
impl UnwindSafe for MInstruction
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)