xref: /illumos-gate/usr/src/uts/sparc/sys/frame.h (revision 7c478bd9)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1987-1997,2002-2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_FRAME_H
28 #define	_SYS_FRAME_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* sys4-3.2L 1.1 */
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Definition of the sparc stack frame (when it is pushed on the stack).
38  */
39 struct frame {
40 	long	fr_local[8];		/* saved locals */
41 	long	fr_arg[6];		/* saved arguments [0 - 5] */
42 	struct frame	*fr_savfp;	/* saved frame pointer */
43 	long	fr_savpc;		/* saved program counter */
44 #if !defined(__sparcv9)
45 	char	*fr_stret;		/* struct return addr */
46 #endif	/* __sparcv9 */
47 	long	fr_argd[6];		/* arg dump area */
48 	long	fr_argx[1];		/* array of args past the sixth */
49 };
50 
51 #ifdef _SYSCALL32
52 /*
53  * Kernels view of a 32-bit stack frame
54  */
55 struct frame32 {
56 	int	fr_local[8];		/* saved locals */
57 	int	fr_arg[6];		/* saved arguments [0 - 5] */
58 	caddr32_t fr_savfp;		/* saved frame pointer */
59 	int	fr_savpc;		/* saved program counter */
60 	caddr32_t fr_stret;		/* struct return addr */
61 	int	fr_argd[6];		/* arg dump area */
62 	int	fr_argx[1];		/* array of args past the sixth */
63 };
64 #endif
65 
66 #ifdef	__cplusplus
67 }
68 #endif
69 
70 #endif	/* _SYS_FRAME_H */
71