Skip to main content

ZicsrInstruction

Enum ZicsrInstruction 

Source
pub enum ZicsrInstruction<Hart>
where Hart: HartConfig,
{ Csrrw { rs1: Hart::Reg, rd: Hart::Reg, csr_index: u16, /* private fields */ }, Csrrs { rs1: Hart::Reg, rd: Hart::Reg, csr_index: u16, /* private fields */ }, Csrrc { rs1: Hart::Reg, rd: Hart::Reg, csr_index: u16, /* private fields */ }, Csrrwi { rd: Hart::Reg, zimm: u8, csr_index: u16, /* private fields */ }, Csrrsi { rd: Hart::Reg, zimm: u8, csr_index: u16, /* private fields */ }, Csrrci { rd: Hart::Reg, zimm: u8, csr_index: u16, /* private fields */ }, }
Expand description

RISC-V Zicsr instruction (Control and Status Register)

Variants§

§

Csrrw

Fields

§rs1: Hart::Reg
§rd: Hart::Reg
§csr_index: u16
§

Csrrs

Fields

§rs1: Hart::Reg
§rd: Hart::Reg
§csr_index: u16
§

Csrrc

Fields

§rs1: Hart::Reg
§rd: Hart::Reg
§csr_index: u16
§

Csrrwi

Fields

§rd: Hart::Reg
§zimm: u8
§csr_index: u16
§

Csrrsi

Fields

§rd: Hart::Reg
§zimm: u8
§csr_index: u16
§

Csrrci

Fields

§rd: Hart::Reg
§zimm: u8
§csr_index: u16

Trait Implementations§

Source§

impl<Hart> Clone for ZicsrInstruction<Hart>
where Hart: HartConfig + Clone, Hart::Reg: Clone,

Source§

fn clone(&self) -> ZicsrInstruction<Hart>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Hart> Copy for ZicsrInstruction<Hart>
where Hart: HartConfig + Copy, Hart::Reg: Copy,

Source§

impl<Hart> Debug for ZicsrInstruction<Hart>
where Hart: HartConfig + Debug, Hart::Reg: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl<Reg, Hart> Display for ZicsrInstruction<Hart>
where Reg: Display, Hart: HartConfig<Reg = Reg>,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Hart> Eq for ZicsrInstruction<Hart>
where Hart: HartConfig + Eq, Hart::Reg: Eq,

§

impl<Reg, Hart> Instruction for ZicsrInstruction<Hart>
where Reg: Register, Hart: HartConfig<Reg = Reg>,

§

const IMPLEMENTED_EXTENSIONS: &'static [ImplementedExtension]

All implemented extensions, including this instruction itself, with their ISA extensions. Read more
§

const OWN_ISA_EXTENSIONS: &'static [IsaExtension]

ISA extensions defined by this instruction enum itself, without inherited ones. Read more
§

const ALIGNMENT: u8

Instruction alignment in bytes, also known as IALIGN
§

type Hart = Hart

Hart configuration of the implementation
§

fn try_decode(instruction: u32) -> Option<Self>

Try to decode a single valid instruction
§

fn size(&self) -> u8

Instruction size in bytes
Source§

const ISA_STRING: &'static str = _

ISA string as used in the Tag_RISCV_arch attribute of ELF files, for example, rv64i2p1_m2p0_zmmul1p0. Read more
Source§

fn implements_extension<E>() -> bool
where E: Instruction<Hart = Self::Hart>,

Checks whether this instruction implements the given extension, see Self::IMPLEMENTED_EXTENSIONS for details
Source§

impl<Hart> PartialEq for ZicsrInstruction<Hart>
where Hart: HartConfig + PartialEq, Hart::Reg: PartialEq,

Source§

fn eq(&self, other: &ZicsrInstruction<Hart>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Hart> StructuralPartialEq for ZicsrInstruction<Hart>
where Hart: HartConfig + PartialEq, Hart::Reg: PartialEq,

Auto Trait Implementations§

§

impl<Hart> Freeze for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: Freeze,

§

impl<Hart> RefUnwindSafe for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: RefUnwindSafe,

§

impl<Hart> Send for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: Send,

§

impl<Hart> Sync for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: Sync,

§

impl<Hart> Unpin for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: Unpin,

§

impl<Hart> UnsafeUnpin for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: UnsafeUnpin,

§

impl<Hart> UnwindSafe for ZicsrInstruction<Hart>
where <Hart as HartConfig>::Reg: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.