c.li
Load the sign-extended 6-bit immediate
This instruction is defined by:
Synopsis
C.LI loads the sign-extended 6-bit immediate, imm, into register xd.
C.LI expands into addi xd, x0, imm
.
C.LI is only valid when xd ≠ x0; the code points with xd=x0 encode HINTs.
Execution
-
Pruned, XLEN == 64
-
Original
if (implemented?(ExtensionName::C) && (misa.C == 1'b0)) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[xd] = $signed(imm);
if (implemented?(ExtensionName::C) && (misa.C == 1'b0)) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[xd] = $signed(imm);