Skip to main content

CAddi4spnEmitter

Trait CAddi4spnEmitter 

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

Add a zero-extended non-zero immediate, scaled by 4, to the stack pointer

Adds a zero-extended non-zero immediate, scaled by 4, to the stack pointer, x2, and writes the result to rd’. This instruction is used to generate pointers to stack-allocated variables. It expands to addi rd', x2, nzuimm\[9:2\]. C.ADDI4SPN is only valid when nzuimm ≠ 0; the code points with nzuimm=0 are reserved.

§Forms

Assembly: c.addi4spn xd, imm Rust: c_addi4spn(rd, imm)

§Arguments

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

Required Methods§

Source

fn c_addi4spn(&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>> CAddi4spnEmitter<Gp, U1> for Assembler<'_>