Skip to main content

Rv32ZacasInstruction

Enum Rv32ZacasInstruction 

Source
#[repr(u16, align(4))]
pub enum Rv32ZacasInstruction<Reg> { Amoswap { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amoadd { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amoxor { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amoand { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amoor { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amomin { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amomax { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amominu { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, Amomaxu { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, AmocasW { rs1: Reg, rs2: Reg, rd: Reg, aq: bool, rl: bool, }, AmocasD { rs1: Reg, rs2: Reg, rd: Reg, rd_hi: Reg, rs2_hi: Reg, aq: bool, rl: bool, }, }
Expand description

RISC-V RV32 Zacas instruction (Atomic Compare-and-Swap)

Variants§

§

Amoswap

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amoadd

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amoxor

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amoand

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amoor

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amomin

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amomax

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amominu

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

Amomaxu

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

AmocasW

Compare-and-swap word

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§aq: bool
§rl: bool
§

AmocasD

Compare-and-swap doubleword, using register pairs (rd, rd_hi) and (rs2, rs2_hi) since RV32 registers are only 32 bits wide

Fields

§rs1: Reg
§rs2: Reg
§rd: Reg
§rd_hi: Reg
§rs2_hi: Reg
§aq: bool
§rl: bool

Trait Implementations§

Source§

impl<Reg: Clone> Clone for Rv32ZacasInstruction<Reg>

Source§

fn clone(&self) -> Rv32ZacasInstruction<Reg>

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<Reg: Copy> Copy for Rv32ZacasInstruction<Reg>

Source§

impl<Reg: Debug> Debug for Rv32ZacasInstruction<Reg>

Source§

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

Formats the value using the given formatter. Read more
§

impl<Reg> Display for Rv32ZacasInstruction<Reg>
where Reg: Display + Copy,

§

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

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

impl<Reg: Eq> Eq for Rv32ZacasInstruction<Reg>

§

impl<Reg> Instruction for Rv32ZacasInstruction<Reg>
where Reg: Register<Type = u32>,

§

const IMPLEMENTED_EXTENSIONS: &'static [TypeId]

Types of all fully implemented extensions. Read more
§

type Reg = Reg

A register type used by the instruction
§

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

Try to decode a single valid instruction
§

fn alignment() -> u8

Instruction alignment in bytes
§

fn size(&self) -> u8

Instruction size in bytes
Source§

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

Checks whether this instruction implements the given extension
Source§

impl<Reg: PartialEq> PartialEq for Rv32ZacasInstruction<Reg>

Source§

fn eq(&self, other: &Rv32ZacasInstruction<Reg>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<Reg: PartialEq> StructuralPartialEq for Rv32ZacasInstruction<Reg>

Auto Trait Implementations§

§

impl<Reg> Freeze for Rv32ZacasInstruction<Reg>
where Reg: Freeze,

§

impl<Reg> RefUnwindSafe for Rv32ZacasInstruction<Reg>
where Reg: RefUnwindSafe,

§

impl<Reg> Send for Rv32ZacasInstruction<Reg>
where Reg: Send,

§

impl<Reg> Sync for Rv32ZacasInstruction<Reg>
where Reg: Sync,

§

impl<Reg> Unpin for Rv32ZacasInstruction<Reg>
where Reg: Unpin,

§

impl<Reg> UnsafeUnpin for Rv32ZacasInstruction<Reg>
where Reg: UnsafeUnpin,

§

impl<Reg> UnwindSafe for Rv32ZacasInstruction<Reg>
where 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 = Infallible

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.