Register Guide
RISC-V pc / pc Register: Program Counter
pc is the program counter holding the current instruction address; branches, jumps, traps, and trap returns update it implicitly.
ABI name: pc; physical register: pc.
Save rule: Saved by software when context requires.
Read it through its psABI role first, then inspect how each instruction reads or writes it.
Physical Name pcABI Name pcSave Rule Saved by software when context requires
Role
Program Counter
Convention
Architectural state / CSR semantics
Remember This First
The calling convention listed for this entry is: Architectural state / CSR semantics.
RISC-V ISA Reference
ABI register
pc is the program counter holding the current instruction address; branches, jumps, traps, and trap returns update it implicitly.
Preserved across calls: Saved by software when context requires
RISC-V Unprivileged ISA ManualWhen It Fits Best
- - Use it according to the documented role: Program Counter.
- - Consult the applicable ISA or ABI specification for concrete read, write, or execution semantics.
When Not To Use It This Way
- - Do not apply the integer temporary-register t* rules to this entry.
- - Do not infer behavior not defined by this page or the applicable specification from the ABI name.
What Happens Around A Call
1
The calling convention listed for this entry is: Architectural state / CSR semantics.
2
The save rule listed for this entry is: Saved by software when context requires.
Read The Documented Role
Examples explain the rule, not a complete program# pc / pc
# Program Counter
# Architectural state / CSR semantics