Table of Contents

Advertisement

Register
Name
Compiler
r24
et
r25
bt
r26
gp
r27
sp
r28
fp
r29
ea
r30
ba
r31
ra
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
Programming Model

7.4. Stacks

The stack grows downward (i.e. towards lower addresses). The stack pointer points to
the last used slot. The frame pointer points to the saved frame pointer near the top of
the stack frame.
The figure below shows an example of the structure of a current frame. In this case,
function
prologue in the called function has completed.
(41)
A function can use one of these registers if it saves it first. The function must restore the
register's original value before exiting.
(43)
In the GNU Linux operating system,
available as a callee-saved general-purpose register.
(44)
If the frame pointer is not used, the register is available as a callee-saved temporary register.
Refer to "Frame Pointer Elimination" .
Nios II Processor Reference Guide
148
Used by
Callee
(41)
Saved
Exception temporary
Break temporary
v
Global pointer
v
Stack pointer
(44)
v
Frame pointer
Exception return address
v
Return address
on page 149
on page 36
calls function
, and the stack is shown before the call and after the
a()
b()
r23
Normal Usage
Normal register set: Break return address
Shadow register sets:
SSTATUS
is used as the thread pointer. Otherwise, it is
7. Application Binary Interface
NII-PRG | 2018.04.18
register

Advertisement

Table of Contents
loading

Table of Contents