Specifications

Registe
r
Name Used by
Compiler
Callee
Saved
(45)
Normal Usage
r16 v v
Callee-saved general-purpose registers
r17 v v
r18 v v
r19 v v
r20 v v
r21 v v
r22 v
(46)
r23 v
(47)
r24 et Exception temporary
r25 bt Break temporary
r26 gp v Global pointer
r27 sp v Stack pointer
r28 fp v
(48)
Frame pointer
r29 ea Exception return address
r30 ba
Normal register set: Break return address
Shadow register sets: SSTATUS register
r31 ra v Return address
The endianness of values greater than 8 bits is little endian. The upper 8 bits of a value are stored at the
higher byte address.
Related Information
Frame Pointer Elimination on page 7-4
Programming Model on page 3-1
Programming Model
(45)
A function can use one of these registers if it saves it first. The function must restore the register’s original
value before exiting.
(46)
In the GNU Linux operating system, r22 points to the global offset table (GOT). Otherwise, it is available as
a callee-saved general-purpose register.
(47)
In the GNU Linux operating system, r23 is used as the thread pointer. Otherwise, it is available as a callee-
saved general-purpose register.
(48)
If the frame pointer is not used, the register is available as a callee-saved temporary register. Refer to “Frame
Pointer Elimination” .
NII51016
2015.04.02
Register Usage
7-3
Application Binary Interface
Altera Corporation
Send Feedback