auipc

Add upper immediate to PC

Adds an upper 20-bit immediate, shifted left by 12 bits, to the PC and stores the result in t1.

RISC-V manual: auipc

Forms

  • auipc ,

Operands

t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
imm20
A 20-bit immediate, 0 to 1048575 (0xFFFFF), placed in bits 31–12.
# auipc writes 0x00401000 to t0.
.data
marker: .word 17
.text
auipc t0, 1