lui
Load upper immediate
Sets t1 to a 20-bit immediate followed by 12 zero bits.
Forms
lui ,
Pseudo-instructions
The assembler turns these into one or more real instructions.
-
Set t1 to upper 20-bit label's address
Operands
t1- Any integer register,
x0tox31, or its named alias, such aszero,t0ort6. imm20- A 20-bit immediate,
0to1048575(0xFFFFF), placed in bits 31–12. label- A named address in the program, such as the start of a loop or a variable in
.data.
# lui writes 73728 to t0.
.data
marker: .word 17
.text
lui t0, 18