]> git.saurik.com Git - apple/libc.git/blob - ppc/gen/assymdefs.c
80ecae87e4d05beb8072da9973a2bc7f8bb81c32
[apple/libc.git] / ppc / gen / assymdefs.c
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 * assymdefs.c -- list of symbols to #define in assym.h
24 */
25 #import <bsd/ppc/setjmp.h>
26 #define __TARGET_ARCHITECTURE__ "ppc"
27 #import <signal.h>
28 #import <assert.h>
29 #import <bsd/stddef.h>
30 #import "genassym.h"
31
32 void
33 assymdefs(void)
34 {
35 /* This is required for `setjmp' to work. */
36 assert(offsetof(struct _jmp_buf, csr[18])
37 == offsetof(struct _jmp_buf, fp));
38
39 comment(MAJOR, "Structure Offsets");
40 comment(MINOR, "jmpbuf_t offsets and constants");
41
42 PRINT_OFFSET(struct _jmp_buf *, magic);
43 PRINT_OFFSET(struct _jmp_buf *, sp);
44 PRINT_OFFSET(struct _jmp_buf *, csr[0]);
45 PRINT_OFFSET(struct _jmp_buf *, csr[17]);
46 PRINT_OFFSET(struct _jmp_buf *, fp);
47 PRINT_OFFSET(struct _jmp_buf *, toc);
48 PRINT_OFFSET(struct _jmp_buf *, cr);
49 PRINT_OFFSET(struct _jmp_buf *, lr);
50 PRINT_OFFSET(struct _jmp_buf *, fpr[0]);
51 PRINT_OFFSET(struct _jmp_buf *, fpr[1]);
52 PRINT_OFFSET(struct _jmp_buf *, fpr[2]);
53 PRINT_OFFSET(struct _jmp_buf *, fpr[3]);
54 PRINT_OFFSET(struct _jmp_buf *, fpr[4]);
55 PRINT_OFFSET(struct _jmp_buf *, fpr[5]);
56 PRINT_OFFSET(struct _jmp_buf *, fpr[6]);
57 PRINT_OFFSET(struct _jmp_buf *, fpr[7]);
58 PRINT_OFFSET(struct _jmp_buf *, fpr[8]);
59 PRINT_OFFSET(struct _jmp_buf *, fpr[9]);
60 PRINT_OFFSET(struct _jmp_buf *, fpr[10]);
61 PRINT_OFFSET(struct _jmp_buf *, fpr[11]);
62 PRINT_OFFSET(struct _jmp_buf *, fpr[12]);
63 PRINT_OFFSET(struct _jmp_buf *, fpr[13]);
64 PRINT_OFFSET(struct _jmp_buf *, fpr[14]);
65 PRINT_OFFSET(struct _jmp_buf *, fpr[15]);
66 PRINT_OFFSET(struct _jmp_buf *, fpr[16]);
67 PRINT_OFFSET(struct _jmp_buf *, fpr[17]);
68 PRINT_OFFSET(struct _jmp_buf *, fpscr);
69 PRINT_OFFSET(struct _jmp_buf *, sig_onstack);
70 PRINT_OFFSET(struct _jmp_buf *, sig_mask);
71 PRINT_CONSTANT(_JMP_BUF_MAGICNUM);
72
73 comment(MINOR, "sigcontext offsets, sizes, and constants");
74 PRINT_SIZEOF(struct sigcontext);
75 PRINT_OFFSET(struct sigcontext *, sc_onstack);
76 PRINT_OFFSET(struct sigcontext *, sc_mask);
77 PRINT_OFFSET(struct sigcontext *, sc_sp);
78 PRINT_OFFSET(struct sigcontext *, sc_cia);
79 PRINT_OFFSET(struct sigcontext *, sc_regs_saved);
80 PRINT_OFFSET(struct sigcontext *, sc_a0);
81 PRINT_ENUM(REGS_SAVED_NONE);
82
83 comment(MINOR, "struct sigstack offsets and sizes");
84 PRINT_SIZEOF(struct sigstack);
85 PRINT_OFFSET(struct sigstack *, ss_sp);
86 PRINT_OFFSET(struct sigstack *, ss_onstack);
87 }