1 /*	$NetBSD: setjmp.h,v 1.2 2006/09/10 21:16:56 cherry Exp $	*/
2 
3 /*-
4  * Copyright (c) 2000
5  * Intel Corporation.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * 3. All advertising materials mentioning features or use of this software
20  *    must display the following acknowledgement:
21  *
22  *    This product includes software developed by Intel Corporation and
23  *    its contributors.
24  *
25  * 4. Neither the name of Intel Corporation or its contributors may be
26  *    used to endorse or promote products derived from this software
27  *    without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION AND CONTRIBUTORS ``AS IS''
30  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32  * ARE DISCLAIMED.  IN NO EVENT SHALL INTEL CORPORATION OR CONTRIBUTORS BE
33  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
39  * THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * $FreeBSD: src/sys/ia64/include/setjmp.h,v 1.12 2003/07/26 08:03:43 marcel Exp $
42  */
43 
44 #ifndef _MACHINE_SETJMP_H_
45 #define	_MACHINE_SETJMP_H_
46 
47 #include <sys/cdefs.h>
48 
49 #define	JMPBUF_ADDR_OF(buf, item)	((unsigned long)((char *)buf + item))
50 
51 #define	J_UNAT		0
52 #define	J_NATS		0x8
53 #define	J_PFS		0x10
54 #define	J_BSP		0x18
55 #define	J_RNAT		0x20
56 #define	J_PREDS		0x28
57 #define	J_LC		0x30
58 #define	J_R4		0x38
59 #define	J_R5		0x40
60 #define	J_R6		0x48
61 #define	J_R7		0x50
62 #define	J_SP		0x58
63 #define	J_F2		0x60
64 #define	J_F3		0x70
65 #define	J_F4		0x80
66 #define	J_F5		0x90
67 #define	J_F16		0xa0
68 #define	J_F17		0xb0
69 #define	J_F18		0xc0
70 #define	J_F19		0xd0
71 #define	J_F20		0xe0
72 #define	J_F21		0xf0
73 #define	J_F22		0x100
74 #define	J_F23		0x110
75 #define	J_F24		0x120
76 #define	J_F25		0x130
77 #define	J_F26		0x140
78 #define	J_F27		0x150
79 #define	J_F28		0x160
80 #define	J_F29		0x170
81 #define	J_F30		0x180
82 #define	J_F31		0x190
83 #define	J_FPSR		0x1a0
84 #define	J_B0		0x1a8
85 #define	J_B1		0x1b0
86 #define	J_B2		0x1b8
87 #define	J_B3		0x1c0
88 #define	J_B4		0x1c8
89 #define	J_B5		0x1d0
90 #define	J_SIGMASK	0x1d8
91 #define	J_SIGSET	0x1e0
92 
93 #define	_JBLEN		0x200			/* Size in long XXX: Set to sizeof(mcontext_t)/sizeof(long) */
94 
95 #ifdef _KERNEL
96 #ifdef CTASSERT
97 CTASSERT(sizeof(struct _jmp_buf) == 512);
98 #endif
99 #endif
100 
101 #endif /* !_MACHINE_SETJMP_H_ */
102