Specifications

Table Of Contents
3–2 Altera Corporation
Nios II Processor Reference Handbook October 2007
Control Registers
accessed by call and ret instructions. C and C++ compilers use a
common procedure-call convention, assigning specific meaning to
registers r1 through r23 and r26 through r28.
f For more information, refer to the Application Binary Interface chapter of
the Nios II Processor Reference Handbook.
Control
Registers
Control registers report the status and change the behavior of the
processor. The Nios II architecture supports up to 32 control registers.
Table 3–2 shows details of the currently-defined control registers. All
control registers have names recognized by the assembler.
Control registers are accessed differently than the general-purpose
registers. The special instructions rdctl and wrctl provide the only
means to read and write to the control registers.
Table 3–1. The Nios II General Purpose Registers
Register Name Function Register Name Function
r0 zero
0x00000000
r16
r1 at
Assembler Temporary
r17
r2
Return Value
r18
r3
Return Value
r19
r4
Register Arguments
r20
r5
Register Arguments
r21
r6
Register Arguments
r22
r7
Register Arguments
r23
r8
Caller-Saved Register
r24 et
Exception Temporary
r9
Caller-Saved Register
r25 bt
Breakpoint Temporary (1)
r10
Caller-Saved Register
r26 gp
Global Pointer
r11
Caller-Saved Register
r27 sp
Stack Pointer
r12
Caller-Saved Register
r28 fp
Frame Pointer
r13
Caller-Saved Register
r29 ea
Exception Return Address
r14
Caller-Saved Register
r30 ba
Breakpoint Return Address (1)
r15
Caller-Saved Register
r31 ra
Return Address
Notes to Ta b le 3 – 1 :
(1) This register is used exclusively by the JTAG debug module.