Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / platforms / android-21 / arch-mips64 / usr / include / sys / user.h
blobc969726a434867486537f26bdd42236863e884d2
1 /*
2 * Copyright (C) 2013 The Android Open Source Project
3 * All rights reserved.
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 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in
12 * the documentation and/or other materials provided with the
13 * distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
29 #ifndef _SYS_USER_H_
30 #define _SYS_USER_H_
32 #include <sys/cdefs.h>
33 #include <limits.h> /* For PAGE_SIZE. */
34 #include <stddef.h> /* For size_t. */
36 __BEGIN_DECLS
38 #if __i386__
40 struct user_fpregs_struct {
41 long cwd;
42 long swd;
43 long twd;
44 long fip;
45 long fcs;
46 long foo;
47 long fos;
48 long st_space[20];
50 struct user_fxsr_struct {
51 unsigned short cwd;
52 unsigned short swd;
53 unsigned short twd;
54 unsigned short fop;
55 long fip;
56 long fcs;
57 long foo;
58 long fos;
59 long mxcsr;
60 long reserved;
61 long st_space[32];
62 long xmm_space[32];
63 long padding[56];
65 struct user_regs_struct {
66 long ebx;
67 long ecx;
68 long edx;
69 long esi;
70 long edi;
71 long ebp;
72 long eax;
73 long xds;
74 long xes;
75 long xfs;
76 long xgs;
77 long orig_eax;
78 long eip;
79 long xcs;
80 long eflags;
81 long esp;
82 long xss;
84 struct user {
85 struct user_regs_struct regs;
86 int u_fpvalid;
87 struct user_fpregs_struct i387;
88 unsigned long int u_tsize;
89 unsigned long int u_dsize;
90 unsigned long int u_ssize;
91 unsigned long start_code;
92 unsigned long start_stack;
93 long int signal;
94 int reserved;
95 struct user_regs_struct* u_ar0;
96 struct user_fpregs_struct* u_fpstate;
97 unsigned long magic;
98 char u_comm[32];
99 int u_debugreg[8];
102 #elif defined(__x86_64__)
104 struct user_fpregs_struct {
105 unsigned short cwd;
106 unsigned short swd;
107 unsigned short ftw;
108 unsigned short fop;
109 __u64 rip;
110 __u64 rdp;
111 __u32 mxcsr;
112 __u32 mxcr_mask;
113 __u32 st_space[32];
114 __u32 xmm_space[64];
115 __u32 padding[24];
117 struct user_regs_struct {
118 unsigned long r15;
119 unsigned long r14;
120 unsigned long r13;
121 unsigned long r12;
122 unsigned long rbp;
123 unsigned long rbx;
124 unsigned long r11;
125 unsigned long r10;
126 unsigned long r9;
127 unsigned long r8;
128 unsigned long rax;
129 unsigned long rcx;
130 unsigned long rdx;
131 unsigned long rsi;
132 unsigned long rdi;
133 unsigned long orig_rax;
134 unsigned long rip;
135 unsigned long cs;
136 unsigned long eflags;
137 unsigned long rsp;
138 unsigned long ss;
139 unsigned long fs_base;
140 unsigned long gs_base;
141 unsigned long ds;
142 unsigned long es;
143 unsigned long fs;
144 unsigned long gs;
146 struct user {
147 struct user_regs_struct regs;
148 int u_fpvalid;
149 int pad0;
150 struct user_fpregs_struct i387;
151 unsigned long int u_tsize;
152 unsigned long int u_dsize;
153 unsigned long int u_ssize;
154 unsigned long start_code;
155 unsigned long start_stack;
156 long int signal;
157 int reserved;
158 int pad1;
159 struct user_regs_struct* u_ar0;
160 struct user_fpregs_struct* u_fpstate;
161 unsigned long magic;
162 char u_comm[32];
163 unsigned long u_debugreg[8];
164 unsigned long error_code;
165 unsigned long fault_address;
168 #elif defined(__mips__)
169 struct user_regs_struct
171 unsigned long regs[180 / sizeof(unsigned long) + 64];
174 struct user {
175 unsigned long regs[180 / sizeof(unsigned long) + 64];
176 size_t u_tsize;
177 size_t u_dsize;
178 size_t u_ssize;
179 unsigned long start_code;
180 unsigned long start_data;
181 unsigned long start_stack;
182 long int signal;
183 void* u_ar0;
184 unsigned long magic;
185 char u_comm[32];
188 #elif defined(__arm__)
190 struct user_fpregs {
191 struct fp_reg {
192 unsigned int sign1:1;
193 unsigned int unused:15;
194 unsigned int sign2:1;
195 unsigned int exponent:14;
196 unsigned int j:1;
197 unsigned int mantissa1:31;
198 unsigned int mantissa0:32;
199 } fpregs[8];
200 unsigned int fpsr:32;
201 unsigned int fpcr:32;
202 unsigned char ftype[8];
203 unsigned int init_flag;
205 struct user_regs {
206 unsigned long uregs[18];
208 struct user_vfp {
209 unsigned long long fpregs[32];
210 unsigned long fpscr;
212 struct user_vfp_exc {
213 unsigned long fpexc;
214 unsigned long fpinst;
215 unsigned long fpinst2;
217 struct user {
218 struct user_regs regs;
219 int u_fpvalid;
220 unsigned long int u_tsize;
221 unsigned long int u_dsize;
222 unsigned long int u_ssize;
223 unsigned long start_code;
224 unsigned long start_stack;
225 long int signal;
226 int reserved;
227 struct user_regs* u_ar0;
228 unsigned long magic;
229 char u_comm[32];
230 int u_debugreg[8];
231 struct user_fpregs u_fp;
232 struct user_fpregs* u_fp0;
235 #elif defined(__aarch64__)
237 // There are no user structures for 64 bit arm.
239 #else
241 #error "Unsupported architecture."
243 #endif
245 __END_DECLS
247 #endif /* _SYS_USER_H_ */