frame.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
269473047d747f7815af570197e4ef7322d3632cEvan Yan * CDDL HEADER START
269473047d747f7815af570197e4ef7322d3632cEvan Yan * The contents of this file are subject to the terms of the
269473047d747f7815af570197e4ef7322d3632cEvan Yan * Common Development and Distribution License, Version 1.0 only
269473047d747f7815af570197e4ef7322d3632cEvan Yan * (the "License"). You may not use this file except in compliance
269473047d747f7815af570197e4ef7322d3632cEvan Yan * with the License.
269473047d747f7815af570197e4ef7322d3632cEvan Yan * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
269473047d747f7815af570197e4ef7322d3632cEvan Yan * See the License for the specific language governing permissions
269473047d747f7815af570197e4ef7322d3632cEvan Yan * and limitations under the License.
269473047d747f7815af570197e4ef7322d3632cEvan Yan * When distributing Covered Code, include this CDDL HEADER in each
269473047d747f7815af570197e4ef7322d3632cEvan Yan * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
269473047d747f7815af570197e4ef7322d3632cEvan Yan * If applicable, add the following below this CDDL HEADER, with the
269473047d747f7815af570197e4ef7322d3632cEvan Yan * fields enclosed by brackets "[]" replaced with your own identifying
269473047d747f7815af570197e4ef7322d3632cEvan Yan * information: Portions Copyright [yyyy] [name of copyright owner]
269473047d747f7815af570197e4ef7322d3632cEvan Yan * CDDL HEADER END
269473047d747f7815af570197e4ef7322d3632cEvan Yan * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
269473047d747f7815af570197e4ef7322d3632cEvan Yan * Use is subject to license terms.
269473047d747f7815af570197e4ef7322d3632cEvan Yan#pragma ident "%Z%%M% %I% %E% SMI"
269473047d747f7815af570197e4ef7322d3632cEvan Yanextern "C" {
269473047d747f7815af570197e4ef7322d3632cEvan Yan * In the Intel world, a stack frame looks like this:
269473047d747f7815af570197e4ef7322d3632cEvan Yan * %fp0->| |
269473047d747f7815af570197e4ef7322d3632cEvan Yan * |-------------------------------|
269473047d747f7815af570197e4ef7322d3632cEvan Yan * | Args to next subroutine |
269473047d747f7815af570197e4ef7322d3632cEvan Yan * |-------------------------------|-\
269473047d747f7815af570197e4ef7322d3632cEvan Yan * %sp0->| One word struct-ret address | |
269473047d747f7815af570197e4ef7322d3632cEvan Yan * |-------------------------------| > minimum stack frame
269473047d747f7815af570197e4ef7322d3632cEvan Yan * %fp1->| Previous frame pointer (%fp0)| |
269473047d747f7815af570197e4ef7322d3632cEvan Yan * |-------------------------------|-/
269473047d747f7815af570197e4ef7322d3632cEvan Yan * | Local variables |
269473047d747f7815af570197e4ef7322d3632cEvan Yan * %sp1->|-------------------------------|
269473047d747f7815af570197e4ef7322d3632cEvan Yan * For amd64, the minimum stack frame is 16 bytes and the frame pointer must
269473047d747f7815af570197e4ef7322d3632cEvan Yan * be 16-byte aligned.
269473047d747f7815af570197e4ef7322d3632cEvan Yan * Kernel's view of a 32-bit stack frame.
269473047d747f7815af570197e4ef7322d3632cEvan Yan#endif /* _SYS_FRAME_H */