Webcentive RISC-V Reference

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

31121176210
imm[31:12]rd0010111

Match 0x00000017, mask 0x0000007f. Source: auipc rd imm20 6..2=0x05 1..0=3 in riscv-opcodes/extensions/rv_i.

FieldBitsriscv-opcodes name
imm[31:12]31:12imm20
rd11:7rd

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.

Specification and related pages