9210 remove KMDB branch debugging support
[unleashed.git] / usr / src / uts / intel / sys / frame.h
blob5494ce82d0fdbd77e8189ac7264c979906f0f7b3
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_FRAME_H
28 #define _SYS_FRAME_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/regset.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
39 * In the Intel world, a stack frame looks like this:
41 * %fp0->| |
42 * |-------------------------------|
43 * | Args to next subroutine |
44 * |-------------------------------|-\
45 * %sp0->| One word struct-ret address | |
46 * |-------------------------------| > minimum stack frame
47 * %fp1->| Previous frame pointer (%fp0)| |
48 * |-------------------------------|-/
49 * | Local variables |
50 * %sp1->|-------------------------------|
52 * For amd64, the minimum stack frame is 16 bytes and the frame pointer must
53 * be 16-byte aligned.
56 struct frame {
57 greg_t fr_savfp; /* saved frame pointer */
58 greg_t fr_savpc; /* saved program counter */
61 #ifdef _SYSCALL32
64 * Kernel's view of a 32-bit stack frame.
66 struct frame32 {
67 greg32_t fr_savfp; /* saved frame pointer */
68 greg32_t fr_savpc; /* saved program counter */
71 #endif
73 #ifdef __cplusplus
75 #endif
77 #endif /* _SYS_FRAME_H */