LI
Load Immediate
LI rd, imm
Loads an arbitrary immediate value into a register.
Details
LI loads an arbitrary immediate value into rd using one or two instructions (LUI+ADDI for 32-bit, or longer for 64-bit). It is an assembler pseudoinstruction.
Pseudocode Operation
R[rd] = imm;
Example
LI x5, 0x12345
Encoding
Binary Layout
imm[31:12]
31:12
rd
11:7
0110111
6:0
Operands
-
rd
Destination register (integer) -
imm
Immediate Value