Skip to main content

CAddiwEmitter

Trait CAddiwEmitter 

Source
pub trait CAddiwEmitter<T0, T1> {
    // Required method
    fn c_addiw(&mut self, rd: T0, imm: T1);
}
Expand description

Add a sign-extended non-zero immediate

C.ADDIW is an RV64C/RV128C-only instruction that performs the same computation as C.ADDI but produces a 32-bit result, then sign-extends result to 64 bits. C.ADDIW expands into addiw rd, rd, imm. The immediate can be zero for C.ADDIW, where this corresponds to sext.w rd. C.ADDIW is only valid when rd ≠ x0; the code points with rd=x0 are reserved.

§Forms

Assembly: c.addiw xd, imm Rust: c_addiw(rd, imm)

§Arguments

  • rd — Destination/source register.
  • imm — Immediate encoding value.

Required Methods§

Source

fn c_addiw(&mut self, rd: T0, imm: T1)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<U1: Into<Imm>> CAddiwEmitter<Gp, U1> for Assembler<'_>