1 /* SPARC stack layout Macros and structures,
2 * mainly taken from BCC (the Bare C compiler for
3 * SPARC LEON2/3) sources.
6 * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com.
8 * SPDX-License-Identifier: GPL-2.0+
11 #ifndef __SPARC_STACK_H__
12 #define __SPARC_STACK_H__
14 #include <asm/ptrace.h>
22 #define PT_REGS_SZ sizeof(struct pt_regs)
24 /* A Sparc stack frame */
25 struct sparc_stackframe_regs {
26 unsigned long sf_locals[8];
27 unsigned long sf_ins[6];
28 struct sparc_stackframe_regs *sf_fp;
29 unsigned long sf_callers_pc;
31 unsigned long sf_xargs[6];
32 unsigned long sf_xxargs[1];
34 #define SF_REGS_SZ sizeof(struct sparc_stackframe_regs)
36 /* A register window */
37 struct sparc_regwindow_regs {
38 unsigned long locals[8];
41 #define RW_REGS_SZ sizeof(struct sparc_regwindow_regs)
44 struct sparc_fpuwindow_regs {
45 unsigned long locals[32];
47 unsigned long lastctx;
49 #define FW_REGS_SZ sizeof(struct sparc_fpuwindow_regs)
55 #define PT_REGS_SZ 0x50 /* 20*4 */
56 #define SF_REGS_SZ 0x60 /* 24*4 */
57 #define RW_REGS_SZ 0x20 /* 16*4 */
58 #define FW_REGS_SZ 0x88 /* 34*4 */
61 /* These are for pt_regs. */
85 /* Stack_frame offsets */
103 #define SF_XARG0 0x44
104 #define SF_XARG1 0x48
105 #define SF_XARG2 0x4c
106 #define SF_XARG3 0x50
107 #define SF_XARG4 0x54
108 #define SF_XARG5 0x58
109 #define SF_XXARG 0x5c
111 /* Reg_window offsets */
129 /* Fpu_window offsets */