# `auipc`

[RISC-V Documentation](https://asm-editor.specy.app/documentation/risc-v.md) › [Instructions](https://asm-editor.specy.app/documentation/risc-v/instruction.md)

Web page: https://asm-editor.specy.app/documentation/risc-v/instruction/auipc

**Add upper immediate to PC**

Category: Data movement

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

[RISC-V manual: auipc](https://docs.riscv.org/reference/isa/v20260120/unpriv/rv32.html#norm:auipc_op)

## Forms

- `auipc t1, imm20`

## 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.

## Example

```riscv
# auipc writes 0x00401000 to t0.
.data
marker: .word 17
.text
auipc t0, 1
```
