lui

Load upper immediate

This instruction is defined by:

Encoding

svg

Synopsis

Load the zero-extended imm into rd.

Access

M

HS

U

VS

VU

Always

Always

Always

Always

Always

Decode Variables

Bits<32> imm = {$encoding[31:12], 12'd0};
Bits<5> rd = $encoding[11:7];

Execution

  • Pruned, XLEN == 64

  • Original

X[rd] = imm;
X[rd] = imm;