Skip to main content

CLdspEmitter

Trait CLdspEmitter 

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

Load doubleword from stack pointer

C.LDSP is an RV64C/RV128C-only instruction that loads a 64-bit value from memory into register rd. It computes its effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to ld rd, offset(x2). C.LDSP is only valid when rd ≠ x0 the code points with rd=x0 are reserved.

§Forms

Assembly: c.ldsp xd, imm(sp) Rust: c_ldsp(rd, imm)

§Arguments

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

Required Methods§

Source

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