Xtensa [patch] Modified call0 stack frame layout to simplify stack tracing
Original Reporter info from Mantis: ccrause @ccrause
-
Reporter name: Christo Crause
Original Reporter info from Mantis: ccrause @ccrause
- Reporter name: Christo Crause
Description:
The current layout of the call0 stack frame makes it difficult to locate the previous frame pointer because it is not stored at a fixed offset in the stack frame. The attached patch changes the call0 stack frame so that saved registers are stored at negative offsets from the frame pointer (a15). This way the offsets are not dependent on the storage size of the params/temps area. The proposed layout is shown below in Additional Information. It is somewhat similar to the windowed layout, with the exception that all registers are stored below the frame pointer.
The stack helper functions in rtl/xtensa/xtensa.inc are updated for call0 and the new layout.
Note that the patch now always store register a0 - this is basically done for two reasons:
- to help with stack frame tracing
- to help solve #36931 by creating a free register that can be clobbered when required
Additional information:
-------- Top of frame ---------
temps/params/return
.
. <- FP (a15)
-------- Reg save area --------
a15 (caller FP)
a0 (return address)
other regs
.
. <- SP (a1)
--------- Below frame ---------
Mantis conversion info:
- Mantis ID: 37620
- Build: 46541
- Version: 3.3.1