Skip to main content

CLuiEmitter

Trait CLuiEmitter 

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

Load the non-zero 6-bit immediate field into bits 17-12 of the destination register

C.LUI loads the non-zero 6-bit immediate field into bits 17-12 of the destination register, clears the bottom 12 bits, and sign-extends bit 17 into all higher bits of the destination. C.LUI expands into lui rd, imm. C.LUI is only valid when rd≠x0 and rd≠x2, and when the immediate is not equal to zero. The code points with imm=0 are reserved; the remaining code points with rd=x0 are HINTs; and the remaining code points with rd=x2 correspond to the C.ADDI16SP instruction

§Forms

Assembly: c.lui xd, imm Rust: c_lui(rd, imm)

§Arguments

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

Required Methods§

Source

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