li

Load immediate Pseudo-instruction

Puts an immediate value into a register, using one or two instructions as its size needs.

Forms

Operands

$t1
Any general-purpose register, $0 to $31, using its numeric or named spelling, such as $8 or $t0 ($zero is $0; $ra is $31).
imm
An immediate value: a signed 16-bit value (-32768 to 32767), an unsigned 16-bit value (0 to 65535) or a 32-bit value (-2147483648 to 4294967295). The assembler chooses a supported encoding for the value and other operands; a pseudoinstruction may expand into several instructions.
# Load a literal directly into $t2; inspect it for 7.
li $t2, 7