%hi Upper 20 bits
In this section:
Precedence
2
Description
%hi takes the upper 20 bits, compensated for a negative lower 12-bit field, and right-shifted 12 positions. The intended use for this operator is for the instruction LUI and for instructions like ADDI, LW, and SW to construct a 32-bit address.
Example
lui a0, %hi(myVar) lw a0, %lo(myVar)(a0)