auipc
Add upper immediate to pc
- Extension
- RV32I/RV64I base integer
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
auipc xd, imm- Length
- 32-bit
Encoding
| 3112 | 117 | 62 | 10 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| imm[31:12] | rd | 00101 | 11 | ||||||||||||||||||||||||||||
Match 0x00000017, mask 0x0000007f. Source: auipc rd imm20 6..2=0x05 1..0=3 in riscv-opcodes/extensions/rv_i.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| imm[31:12] | 31:12 | imm20 |
| rd | 11:7 | rd |
Description
Add an immediate to the current PC.
Description from riscv-unified-db, reformatted.
Operation
X[xd] = $pc + $signed(imm);
Pseudocode in riscv-unified-db’s IDL, quoted unchanged.