pub trait CAddiEmitter<T0, T1> {
// Required method
fn c_addi(&mut self, rd: T0, imm: T1);
}Expand description
Add a sign-extended non-zero immediate
C.ADDI adds the non-zero sign-extended 6-bit immediate to the value in register rd then writes the result to rd.
C.ADDI expands into addi rd, rd, imm.
C.ADDI is only valid when rd ≠ x0 and imm ≠ 0.
The code points with rd=x0 encode the C.NOP instruction; the remaining code points with imm=0 encode HINTs.
§Forms
Assembly: c.addi xd, imm
Rust: c_addi(rd, imm)
§Arguments
rd— Destination/source register.imm— Immediate encoding value.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".