Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
Public
Document Table of Contents

7.4.2. Call Saved Registers

The compiler is responsible for generating code to save registers that need to be saved on entry to a function, and to restore the registers on exit. If there are any such registers, they are saved on the stack, from high to low addresses, in the following order: ra, fp, sp, gp, r25, r24, r23, r22, r21, r20, r19, r18, r17, r16, r15, r14, r13, r12, r11, r10, r9, r8, r7, r6, r5, r4, r3, and r2. Stack space is not allocated for registers that are not saved.