risc-v

Definition

li (RISC-V)

Loads an immediate value into a register.

li a, imm

The above is a pseudoinstruction, which is translated to:

lui  a, imm_31:12
addi a, a, imm_11:0

The exact split between the two instructions depends on the value, especially when the lower 12 bits would be interpreted as a negative immediate.