]> git.saurik.com Git - apple/libc.git/blob - ppc/sys/_setjmp.h
8a7881708541154e205f646fb18350efe69d209b
[apple/libc.git] / ppc / sys / _setjmp.h
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * Copyright (c) 1998, Apple Computer Inc. All rights reserved.
24 *
25 * File: _setjmp.h
26 *
27 * Defines for register offsets in the save area.
28 *
29 */
30
31 /* NOTE: jmp_bufs are only 4-byte aligned. This means we
32 * need to pad before the VR and FPR save areas, so that they
33 * can be naturally aligned in the buffer. In case a jmp_buf
34 * is bcopy'd to a different alignment between the setjmp
35 * and longjmp, we need to save the jmp_buf address in the
36 * jmp_buf at setjmp time, so we can realign before reloading.
37 */
38
39 #define JMP_r1 0x00
40 #define JMP_r2 0x04
41 #define JMP_r13 0x08
42 #define JMP_r14 0x0c
43 #define JMP_r15 0x10
44 #define JMP_r16 0x14
45 #define JMP_r17 0x18
46 #define JMP_r18 0x1c
47 #define JMP_r19 0x20
48 #define JMP_r20 0x24
49 #define JMP_r21 0x28
50 #define JMP_r22 0x2c
51 #define JMP_r23 0x30
52 #define JMP_r24 0x34
53 #define JMP_r25 0x38
54 #define JMP_r26 0x3c
55 #define JMP_r27 0x40
56 #define JMP_r28 0x44
57 #define JMP_r29 0x48
58 #define JMP_r30 0x4c
59 #define JMP_r31 0x50
60 #define JMP_lr 0x54
61 #define JMP_cr 0x58
62 #define JMP_ctr 0x5c
63 #define JMP_xer 0x60
64 #define JMP_sig 0x64
65 #define JMP_SIGFLAG 0x68
66 #define JMP_flags 0x6c
67 #define JMP_vrsave 0x70
68 #define JMP_addr_at_setjmp 0x74
69 /* 12 bytes padding here */
70 #define JMP_vr_base_addr 0x84
71 /* save room for 12 VRs (v20-v31), or 0xC0 bytes */
72 #define JMP_fp_base_addr 0x144
73 /* save room for 18 FPRs (f14-f31), or 0x90 bytes */
74 #define JMP_buf_end 0x1d4
75