Deleted Added
full compact
setjmp.h (85230) setjmp.h (104493)
1/* $FreeBSD: head/sys/ia64/include/setjmp.h 85230 2001-10-20 15:19:43Z dfr $ */
2/*
1/*-
3 * Copyright (c) 2000
4 * Intel Corporation.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *

--- 21 unchanged lines hidden (view full) ---

32 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 * THE POSSIBILITY OF SUCH DAMAGE.
39 *
2 * Copyright (c) 2000
3 * Intel Corporation.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *

--- 21 unchanged lines hidden (view full) ---

31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
37 * THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 * $FreeBSD: head/sys/ia64/include/setjmp.h 104493 2002-10-04 22:10:06Z mike $
40 */
41
40 */
41
42#ifndef _MACHINE_SETJMP_H_
43#define _MACHINE_SETJMP_H_
44
42/*
45/*
43 * IA64 assembler doesn't like C style comments. This also means we can't
44 * include other include files to get things like the roundup2() macro.
46 * IA64 assembler doesn't like C style comments. This also means we can't
47 * include other include files to get things like the roundup2() macro.
45 *
48 *
46 * NOTE: Actual register storage must start on a 16 byte boundary. Both
47 * setjmp and longjmp make that adjustment before referencing the contents
48 * of jmp_buf. The macro JMPBUF_ADDR_OF( buf, item ) allows someone to get
49 * the address of an individual item saved in jmp_buf
49 * NOTE: Actual register storage must start on a 16 byte boundary. Both
50 * setjmp and longjmp make that adjustment before referencing the contents
51 * of jmp_buf. The macro JMPBUF_ADDR_OF() allows someone to get the address
52 * of an individual item saved in jmp_buf.
50 */
51
53 */
54
52#define our_roundup(x, y) (((x)+((y)-1))&(~((y)-1)))
55#define our_roundup(x, y) (((x)+((y)-1))&(~((y)-1)))
53
56
54#define JMPBUF_ALIGNMENT 0x10
55#define JMPBUF_ADDR_OF( buf, item ) \
56 ((size_t)((our_roundup((size_t)buf, JMPBUF_ALIGNMENT)) + item))
57#define JMPBUF_ALIGNMENT 0x10
58#define JMPBUF_ADDR_OF(buf, item) \
59 ((size_t)((our_roundup((size_t)buf, JMPBUF_ALIGNMENT)) + item))
57
60
58#define J_UNAT 0
59#define J_NATS 0x8
60#define J_PFS 0x10
61#define J_BSP 0x18
62#define J_RNAT 0x20
63#define J_PREDS 0x28
64#define J_LC 0x30
65#define J_R4 0x38
66#define J_R5 0x40
67#define J_R6 0x48
68#define J_R7 0x50
69#define J_SP 0x58
70#define J_F2 0x60
71#define J_F3 0x70
72#define J_F4 0x80
73#define J_F5 0x90
74#define J_F16 0xa0
75#define J_F17 0xb0
76#define J_F18 0xc0
77#define J_F19 0xd0
78#define J_F20 0xe0
79#define J_F21 0xf0
80#define J_F22 0x100
81#define J_F23 0x110
82#define J_F24 0x120
83#define J_F25 0x130
84#define J_F26 0x140
85#define J_F27 0x150
86#define J_F28 0x160
87#define J_F29 0x170
88#define J_F30 0x180
89#define J_F31 0x190
90#define J_FPSR 0x1a0
91#define J_B0 0x1a8
92#define J_B1 0x1b0
93#define J_B2 0x1b8
94#define J_B3 0x1c0
95#define J_B4 0x1c8
96#define J_B5 0x1d0
97#define J_SIG0 0x1d8
98#define J_SIG1 0x1e0
99#define J_SIGMASK 0x1e8
100#define J_END 0x1f0
61#define J_UNAT 0
62#define J_NATS 0x8
63#define J_PFS 0x10
64#define J_BSP 0x18
65#define J_RNAT 0x20
66#define J_PREDS 0x28
67#define J_LC 0x30
68#define J_R4 0x38
69#define J_R5 0x40
70#define J_R6 0x48
71#define J_R7 0x50
72#define J_SP 0x58
73#define J_F2 0x60
74#define J_F3 0x70
75#define J_F4 0x80
76#define J_F5 0x90
77#define J_F16 0xa0
78#define J_F17 0xb0
79#define J_F18 0xc0
80#define J_F19 0xd0
81#define J_F20 0xe0
82#define J_F21 0xf0
83#define J_F22 0x100
84#define J_F23 0x110
85#define J_F24 0x120
86#define J_F25 0x130
87#define J_F26 0x140
88#define J_F27 0x150
89#define J_F28 0x160
90#define J_F29 0x170
91#define J_F30 0x180
92#define J_F31 0x190
93#define J_FPSR 0x1a0
94#define J_B0 0x1a8
95#define J_B1 0x1b0
96#define J_B2 0x1b8
97#define J_B3 0x1c0
98#define J_B4 0x1c8
99#define J_B5 0x1d0
100#define J_SIG0 0x1d8
101#define J_SIG1 0x1e0
102#define J_SIGMASK 0x1e8
103#define J_END 0x1f0
101
102#ifndef LOCORE
103/*
104 * jmp_buf and sigjmp_buf are encapsulated in different structs to force
105 * compile-time diagnostics for mismatches. The structs are the same
106 * internally to avoid some run-time errors for mismatches.
107 */
108#ifndef _ANSI_SOURCE
104
105#ifndef LOCORE
106/*
107 * jmp_buf and sigjmp_buf are encapsulated in different structs to force
108 * compile-time diagnostics for mismatches. The structs are the same
109 * internally to avoid some run-time errors for mismatches.
110 */
111#ifndef _ANSI_SOURCE
109typedef struct _sigjmp_buf {
110 char Buffer[ J_END + JMPBUF_ALIGNMENT ];
112typedef struct _sigjmp_buf {
113 char Buffer[J_END + JMPBUF_ALIGNMENT];
111} sigjmp_buf[1];
114} sigjmp_buf[1];
112#endif /* not ANSI */
113typedef struct _jmp_buf {
114 char Buffer[ J_END + JMPBUF_ALIGNMENT ];
115#endif
116
117typedef struct _jmp_buf {
118 char Buffer[J_END + JMPBUF_ALIGNMENT];
115} jmp_buf[1];
116#endif
119} jmp_buf[1];
120#endif
121
122#endif /* !_MACHINE_SETJMP_H_ */