2 * Copyright (C) 2013 The Android Open Source Project
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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
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
32 #include <sys/cdefs.h>
33 #include <limits.h> /* For PAGE_SIZE. */
34 #include <stddef.h> /* For size_t */
40 struct user_fpregs_struct
{
50 struct user_fxsr_struct
{
65 struct user_regs_struct
{
85 struct user_regs_struct regs
;
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
;
96 struct user_fpregs_struct
* u_fpstate
;
102 #elif defined(__x86_64__)
104 struct user_fpregs_struct
{
117 struct user_regs_struct
{
133 unsigned long orig_rax
;
136 unsigned long eflags
;
139 unsigned long fs_base
;
140 unsigned long gs_base
;
147 struct user_regs_struct regs
;
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
;
160 struct user_fpregs_struct
* u_fpstate
;
163 unsigned long u_debugreg
[8];
164 unsigned long error_code
;
165 unsigned long fault_address
;
168 #elif defined(__mips__)
171 unsigned long regs
[180 / sizeof(unsigned long) + 64];
175 unsigned long start_code
;
176 unsigned long start_data
;
177 unsigned long start_stack
;
184 #elif defined(__arm__)
188 unsigned int sign1
:1;
189 unsigned int unused
:15;
190 unsigned int sign2
:1;
191 unsigned int exponent
:14;
193 unsigned int mantissa1
:31;
194 unsigned int mantissa0
:32;
196 unsigned int fpsr
:32;
197 unsigned int fpcr
:32;
198 unsigned char ftype
[8];
199 unsigned int init_flag
;
202 unsigned long uregs
[18];
205 unsigned long long fpregs
[32];
208 struct user_vfp_exc
{
210 unsigned long fpinst
;
211 unsigned long fpinst2
;
214 struct user_regs regs
;
216 unsigned long int u_tsize
;
217 unsigned long int u_dsize
;
218 unsigned long int u_ssize
;
219 unsigned long start_code
;
220 unsigned long start_stack
;
223 struct user_regs
* u_ar0
;
227 struct user_fpregs u_fp
;
228 struct user_fpregs
* u_fp0
;
231 #elif defined(__aarch64__)
233 // There are no user structures for 64 bit arm.
237 #error "Unsupported architecture."
243 #endif /* _SYS_USER_H_ */