]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libkse/arch/powerpc/powerpc/assym.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libkse / arch / powerpc / powerpc / assym.c
1 /*
2  * Copyright (c) 2004 Peter Grehan.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD$
27  */
28
29 /* Used to generate mcontext_t offsets */
30
31 #include <sys/types.h>
32 #include <sys/assym.h>
33 #include <sys/ucontext.h>
34
35 #include <stddef.h>
36
37 ASSYM(_MC_VERSION, _MC_VERSION);
38 ASSYM(_MC_VERSION_KSE, _MC_VERSION_KSE);
39 ASSYM(_MC_FP_VALID, _MC_FP_VALID);
40
41 ASSYM(_MC_VERS, offsetof(mcontext_t, mc_vers));
42 ASSYM(_MC_FLAGS, offsetof(mcontext_t, mc_flags));
43
44 ASSYM(_MC_R0,  offsetof(mcontext_t, mc_frame[0]));
45 ASSYM(_MC_R1,  offsetof(mcontext_t, mc_frame[1]));
46 ASSYM(_MC_R2,  offsetof(mcontext_t, mc_frame[2]));
47 ASSYM(_MC_R3,  offsetof(mcontext_t, mc_frame[3]));
48 ASSYM(_MC_R4,  offsetof(mcontext_t, mc_frame[4]));
49 ASSYM(_MC_R5,  offsetof(mcontext_t, mc_frame[5]));
50 ASSYM(_MC_R6,  offsetof(mcontext_t, mc_frame[6]));
51 ASSYM(_MC_R7,  offsetof(mcontext_t, mc_frame[7]));
52 ASSYM(_MC_R8,  offsetof(mcontext_t, mc_frame[8]));
53 ASSYM(_MC_R9,  offsetof(mcontext_t, mc_frame[9]));
54 ASSYM(_MC_R10, offsetof(mcontext_t, mc_frame[10]));
55 ASSYM(_MC_R11, offsetof(mcontext_t, mc_frame[11]));
56 ASSYM(_MC_R12, offsetof(mcontext_t, mc_frame[12]));
57 ASSYM(_MC_R13, offsetof(mcontext_t, mc_frame[13]));
58 ASSYM(_MC_R14, offsetof(mcontext_t, mc_frame[14]));
59 ASSYM(_MC_R15, offsetof(mcontext_t, mc_frame[15]));
60 ASSYM(_MC_R16, offsetof(mcontext_t, mc_frame[16]));
61 ASSYM(_MC_R17, offsetof(mcontext_t, mc_frame[17]));
62 ASSYM(_MC_R18, offsetof(mcontext_t, mc_frame[18]));
63 ASSYM(_MC_R19, offsetof(mcontext_t, mc_frame[19]));
64 ASSYM(_MC_R20, offsetof(mcontext_t, mc_frame[20]));
65 ASSYM(_MC_R21, offsetof(mcontext_t, mc_frame[21]));
66 ASSYM(_MC_R22, offsetof(mcontext_t, mc_frame[22]));
67 ASSYM(_MC_R23, offsetof(mcontext_t, mc_frame[23]));
68 ASSYM(_MC_R24, offsetof(mcontext_t, mc_frame[24]));
69 ASSYM(_MC_R25, offsetof(mcontext_t, mc_frame[25]));
70 ASSYM(_MC_R26, offsetof(mcontext_t, mc_frame[26]));
71 ASSYM(_MC_R27, offsetof(mcontext_t, mc_frame[27]));
72 ASSYM(_MC_R28, offsetof(mcontext_t, mc_frame[28]));
73 ASSYM(_MC_R29, offsetof(mcontext_t, mc_frame[29]));
74 ASSYM(_MC_R30, offsetof(mcontext_t, mc_frame[30]));
75 ASSYM(_MC_R31, offsetof(mcontext_t, mc_frame[31]));
76 ASSYM(_MC_LR,  offsetof(mcontext_t, mc_frame[32]));
77 ASSYM(_MC_CR,  offsetof(mcontext_t, mc_frame[33]));
78 ASSYM(_MC_XER, offsetof(mcontext_t, mc_frame[34]));
79 ASSYM(_MC_CTR, offsetof(mcontext_t, mc_frame[35]));
80
81 ASSYM(_MC_FPSCR, offsetof(mcontext_t, mc_fpreg[32]));
82 ASSYM(_MC_F0,  offsetof(mcontext_t, mc_fpreg[0]));
83 ASSYM(_MC_F1,  offsetof(mcontext_t, mc_fpreg[1]));
84 ASSYM(_MC_F2,  offsetof(mcontext_t, mc_fpreg[2]));
85 ASSYM(_MC_F3,  offsetof(mcontext_t, mc_fpreg[3]));
86 ASSYM(_MC_F4,  offsetof(mcontext_t, mc_fpreg[4]));
87 ASSYM(_MC_F5,  offsetof(mcontext_t, mc_fpreg[5]));
88 ASSYM(_MC_F6,  offsetof(mcontext_t, mc_fpreg[6]));
89 ASSYM(_MC_F7,  offsetof(mcontext_t, mc_fpreg[7]));
90 ASSYM(_MC_F8,  offsetof(mcontext_t, mc_fpreg[8]));
91 ASSYM(_MC_F9,  offsetof(mcontext_t, mc_fpreg[9]));
92 ASSYM(_MC_F10, offsetof(mcontext_t, mc_fpreg[10]));
93 ASSYM(_MC_F11, offsetof(mcontext_t, mc_fpreg[11]));
94 ASSYM(_MC_F12, offsetof(mcontext_t, mc_fpreg[12]));
95 ASSYM(_MC_F13, offsetof(mcontext_t, mc_fpreg[13]));
96 ASSYM(_MC_F14, offsetof(mcontext_t, mc_fpreg[14]));
97 ASSYM(_MC_F15, offsetof(mcontext_t, mc_fpreg[15]));
98 ASSYM(_MC_F16, offsetof(mcontext_t, mc_fpreg[16]));
99 ASSYM(_MC_F17, offsetof(mcontext_t, mc_fpreg[17]));
100 ASSYM(_MC_F18, offsetof(mcontext_t, mc_fpreg[18]));
101 ASSYM(_MC_F19, offsetof(mcontext_t, mc_fpreg[19]));
102 ASSYM(_MC_F20, offsetof(mcontext_t, mc_fpreg[20]));
103 ASSYM(_MC_F21, offsetof(mcontext_t, mc_fpreg[21]));
104 ASSYM(_MC_F22, offsetof(mcontext_t, mc_fpreg[22]));
105 ASSYM(_MC_F23, offsetof(mcontext_t, mc_fpreg[23]));
106 ASSYM(_MC_F24, offsetof(mcontext_t, mc_fpreg[24]));
107 ASSYM(_MC_F25, offsetof(mcontext_t, mc_fpreg[25]));
108 ASSYM(_MC_F26, offsetof(mcontext_t, mc_fpreg[26]));
109 ASSYM(_MC_F27, offsetof(mcontext_t, mc_fpreg[27]));
110 ASSYM(_MC_F28, offsetof(mcontext_t, mc_fpreg[28]));
111 ASSYM(_MC_F29, offsetof(mcontext_t, mc_fpreg[29]));
112 ASSYM(_MC_F30, offsetof(mcontext_t, mc_fpreg[30]));
113 ASSYM(_MC_F31, offsetof(mcontext_t, mc_fpreg[31]));