- for (i = 0; i < 8; i++)
- trad_frame_set_reg_addr (this_cache, i + 8, base + i * 4);
- for (i = 0; i < 7; i++)
- trad_frame_set_reg_addr (this_cache, i + 1, base + (i + 8) * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_RA_REGNUM, base + 16 * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_FP_REGNUM, base + 17 * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_SP_REGNUM, base + 18 * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_GP_REGNUM, base + 19 * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_ESTATUS_REGNUM, base + 20 * 4);
- trad_frame_set_reg_addr (this_cache, NIOS2_PC_REGNUM, base + 21 * 4);
+ The key points are:
+ - The kernel creates a trampoline at the hard-wired address 0x1044.
+ - The stack pointer points to an object of type struct rt_sigframe.
+ The definition of this structure is not exported from the kernel.
+ The register save area is located at offset 152 bytes (as determined
+ by inspection of the stack contents in the debugger), and the
+ registers are saved as r1-r23, ra, fp, gp, ea, sp.