]> git.saurik.com Git - apple/xnu.git/blame - osfmk/mach/i386/_structs.h
xnu-6153.141.1.tar.gz
[apple/xnu.git] / osfmk / mach / i386 / _structs.h
CommitLineData
2d21ac55
A
1/*
2 * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28/*
29 * @OSF_COPYRIGHT@
30 */
31
32#ifndef _MACH_I386__STRUCTS_H_
33#define _MACH_I386__STRUCTS_H_
34
5ba3f43e
A
35#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
36#include <machine/types.h> /* __uint8_t */
37
2d21ac55
A
38/*
39 * i386 is the structure that is exported to user threads for
40 * use in status/mutate calls. This structure should never change.
41 *
42 */
43
44#if __DARWIN_UNIX03
45#define _STRUCT_X86_THREAD_STATE32 struct __darwin_i386_thread_state
46_STRUCT_X86_THREAD_STATE32
47{
48 unsigned int __eax;
49 unsigned int __ebx;
50 unsigned int __ecx;
51 unsigned int __edx;
52 unsigned int __edi;
53 unsigned int __esi;
54 unsigned int __ebp;
55 unsigned int __esp;
56 unsigned int __ss;
57 unsigned int __eflags;
58 unsigned int __eip;
59 unsigned int __cs;
60 unsigned int __ds;
61 unsigned int __es;
62 unsigned int __fs;
63 unsigned int __gs;
64};
65#else /* !__DARWIN_UNIX03 */
66#define _STRUCT_X86_THREAD_STATE32 struct i386_thread_state
67_STRUCT_X86_THREAD_STATE32
68{
69 unsigned int eax;
70 unsigned int ebx;
71 unsigned int ecx;
72 unsigned int edx;
73 unsigned int edi;
74 unsigned int esi;
75 unsigned int ebp;
76 unsigned int esp;
77 unsigned int ss;
78 unsigned int eflags;
79 unsigned int eip;
80 unsigned int cs;
81 unsigned int ds;
82 unsigned int es;
83 unsigned int fs;
84 unsigned int gs;
85};
86#endif /* !__DARWIN_UNIX03 */
87
88/* This structure should be double-word aligned for performance */
89
90#if __DARWIN_UNIX03
91#define _STRUCT_FP_CONTROL struct __darwin_fp_control
92_STRUCT_FP_CONTROL
93{
94 unsigned short __invalid :1,
95 __denorm :1,
96 __zdiv :1,
97 __ovrfl :1,
98 __undfl :1,
99 __precis :1,
100 :2,
101 __pc :2,
102#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
103#define FP_PREC_24B 0
104#define FP_PREC_53B 2
105#define FP_PREC_64B 3
106#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
107 __rc :2,
108#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
109#define FP_RND_NEAR 0
110#define FP_RND_DOWN 1
111#define FP_RND_UP 2
112#define FP_CHOP 3
113#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
114 /*inf*/ :1,
115 :3;
116};
117typedef _STRUCT_FP_CONTROL __darwin_fp_control_t;
118#else /* !__DARWIN_UNIX03 */
119#define _STRUCT_FP_CONTROL struct fp_control
120_STRUCT_FP_CONTROL
121{
122 unsigned short invalid :1,
123 denorm :1,
124 zdiv :1,
125 ovrfl :1,
126 undfl :1,
127 precis :1,
128 :2,
129 pc :2,
130#define FP_PREC_24B 0
131#define FP_PREC_53B 2
132#define FP_PREC_64B 3
133 rc :2,
134#define FP_RND_NEAR 0
135#define FP_RND_DOWN 1
136#define FP_RND_UP 2
137#define FP_CHOP 3
138 /*inf*/ :1,
139 :3;
140};
141typedef _STRUCT_FP_CONTROL fp_control_t;
142#endif /* !__DARWIN_UNIX03 */
143
144/*
145 * Status word.
146 */
147
148#if __DARWIN_UNIX03
149#define _STRUCT_FP_STATUS struct __darwin_fp_status
150_STRUCT_FP_STATUS
151{
152 unsigned short __invalid :1,
153 __denorm :1,
154 __zdiv :1,
155 __ovrfl :1,
156 __undfl :1,
157 __precis :1,
158 __stkflt :1,
159 __errsumm :1,
160 __c0 :1,
161 __c1 :1,
162 __c2 :1,
163 __tos :3,
164 __c3 :1,
165 __busy :1;
166};
167typedef _STRUCT_FP_STATUS __darwin_fp_status_t;
168#else /* !__DARWIN_UNIX03 */
169#define _STRUCT_FP_STATUS struct fp_status
170_STRUCT_FP_STATUS
171{
172 unsigned short invalid :1,
173 denorm :1,
174 zdiv :1,
175 ovrfl :1,
176 undfl :1,
177 precis :1,
178 stkflt :1,
179 errsumm :1,
180 c0 :1,
181 c1 :1,
182 c2 :1,
183 tos :3,
184 c3 :1,
185 busy :1;
186};
187typedef _STRUCT_FP_STATUS fp_status_t;
188#endif /* !__DARWIN_UNIX03 */
189
190/* defn of 80bit x87 FPU or MMX register */
191
192#if __DARWIN_UNIX03
193#define _STRUCT_MMST_REG struct __darwin_mmst_reg
194_STRUCT_MMST_REG
195{
196 char __mmst_reg[10];
197 char __mmst_rsrv[6];
198};
199#else /* !__DARWIN_UNIX03 */
200#define _STRUCT_MMST_REG struct mmst_reg
201_STRUCT_MMST_REG
202{
203 char mmst_reg[10];
204 char mmst_rsrv[6];
205};
206#endif /* !__DARWIN_UNIX03 */
207
208
209/* defn of 128 bit XMM regs */
210
211#if __DARWIN_UNIX03
212#define _STRUCT_XMM_REG struct __darwin_xmm_reg
213_STRUCT_XMM_REG
214{
215 char __xmm_reg[16];
216};
217#else /* !__DARWIN_UNIX03 */
218#define _STRUCT_XMM_REG struct xmm_reg
219_STRUCT_XMM_REG
220{
221 char xmm_reg[16];
222};
223#endif /* !__DARWIN_UNIX03 */
224
5ba3f43e
A
225/* defn of 256 bit YMM regs */
226
227#if __DARWIN_UNIX03
228#define _STRUCT_YMM_REG struct __darwin_ymm_reg
229_STRUCT_YMM_REG
230{
231 char __ymm_reg[32];
232};
233#else /* !__DARWIN_UNIX03 */
234#define _STRUCT_YMM_REG struct ymm_reg
235_STRUCT_YMM_REG
236{
237 char ymm_reg[32];
238};
239#endif /* !__DARWIN_UNIX03 */
240
241/* defn of 512 bit ZMM regs */
242
243#if __DARWIN_UNIX03
244#define _STRUCT_ZMM_REG struct __darwin_zmm_reg
245_STRUCT_ZMM_REG
246{
247 char __zmm_reg[64];
248};
249#else /* !__DARWIN_UNIX03 */
250#define _STRUCT_ZMM_REG struct zmm_reg
251_STRUCT_ZMM_REG
252{
253 char zmm_reg[64];
254};
255#endif /* !__DARWIN_UNIX03 */
256
257#if __DARWIN_UNIX03
258#define _STRUCT_OPMASK_REG struct __darwin_opmask_reg
259_STRUCT_OPMASK_REG
260{
261 char __opmask_reg[8];
262};
263#else /* !__DARWIN_UNIX03 */
264#define _STRUCT_OPMASK_REG struct opmask_reg
265_STRUCT_OPMASK_REG
266{
267 char opmask_reg[8];
268};
269#endif /* !__DARWIN_UNIX03 */
5ba3f43e 270
2d21ac55
A
271/*
272 * Floating point state.
273 */
274
275#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
276#define FP_STATE_BYTES 512 /* number of chars worth of data from fpu_fcw */
277#endif /* !_POSIX_C_SOURCE || _DARWIN_C_SOURCE */
278
279#if __DARWIN_UNIX03
280#define _STRUCT_X86_FLOAT_STATE32 struct __darwin_i386_float_state
281_STRUCT_X86_FLOAT_STATE32
282{
283 int __fpu_reserved[2];
284 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
285 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
286 __uint8_t __fpu_ftw; /* x87 FPU tag word */
287 __uint8_t __fpu_rsrv1; /* reserved */
288 __uint16_t __fpu_fop; /* x87 FPU Opcode */
289 __uint32_t __fpu_ip; /* x87 FPU Instruction Pointer offset */
290 __uint16_t __fpu_cs; /* x87 FPU Instruction Pointer Selector */
291 __uint16_t __fpu_rsrv2; /* reserved */
292 __uint32_t __fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
293 __uint16_t __fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
294 __uint16_t __fpu_rsrv3; /* reserved */
295 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
296 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
297 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
298 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
299 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
300 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
301 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
302 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
303 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
304 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
305 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
306 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
307 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
308 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
309 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
310 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
311 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
312 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
313 char __fpu_rsrv4[14*16]; /* reserved */
314 int __fpu_reserved1;
315};
060df5ea
A
316
317#define _STRUCT_X86_AVX_STATE32 struct __darwin_i386_avx_state
318_STRUCT_X86_AVX_STATE32
319{
320 int __fpu_reserved[2];
321 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
322 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
323 __uint8_t __fpu_ftw; /* x87 FPU tag word */
324 __uint8_t __fpu_rsrv1; /* reserved */
325 __uint16_t __fpu_fop; /* x87 FPU Opcode */
326 __uint32_t __fpu_ip; /* x87 FPU Instruction Pointer offset */
327 __uint16_t __fpu_cs; /* x87 FPU Instruction Pointer Selector */
328 __uint16_t __fpu_rsrv2; /* reserved */
329 __uint32_t __fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
330 __uint16_t __fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
331 __uint16_t __fpu_rsrv3; /* reserved */
332 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
333 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
334 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
335 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
336 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
337 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
338 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
339 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
340 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
341 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
342 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
343 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
344 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
345 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
346 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
347 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
348 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
349 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
350 char __fpu_rsrv4[14*16]; /* reserved */
351 int __fpu_reserved1;
352 char __avx_reserved1[64];
353 _STRUCT_XMM_REG __fpu_ymmh0; /* YMMH 0 */
354 _STRUCT_XMM_REG __fpu_ymmh1; /* YMMH 1 */
355 _STRUCT_XMM_REG __fpu_ymmh2; /* YMMH 2 */
356 _STRUCT_XMM_REG __fpu_ymmh3; /* YMMH 3 */
357 _STRUCT_XMM_REG __fpu_ymmh4; /* YMMH 4 */
358 _STRUCT_XMM_REG __fpu_ymmh5; /* YMMH 5 */
359 _STRUCT_XMM_REG __fpu_ymmh6; /* YMMH 6 */
360 _STRUCT_XMM_REG __fpu_ymmh7; /* YMMH 7 */
361};
362
5ba3f43e
A
363#define _STRUCT_X86_AVX512_STATE32 struct __darwin_i386_avx512_state
364_STRUCT_X86_AVX512_STATE32
365{
366 int __fpu_reserved[2];
367 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
368 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
369 __uint8_t __fpu_ftw; /* x87 FPU tag word */
370 __uint8_t __fpu_rsrv1; /* reserved */
371 __uint16_t __fpu_fop; /* x87 FPU Opcode */
372 __uint32_t __fpu_ip; /* x87 FPU Instruction Pointer offset */
373 __uint16_t __fpu_cs; /* x87 FPU Instruction Pointer Selector */
374 __uint16_t __fpu_rsrv2; /* reserved */
375 __uint32_t __fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
376 __uint16_t __fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
377 __uint16_t __fpu_rsrv3; /* reserved */
378 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
379 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
380 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
381 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
382 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
383 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
384 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
385 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
386 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
387 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
388 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
389 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
390 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
391 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
392 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
393 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
394 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
395 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
396 char __fpu_rsrv4[14*16]; /* reserved */
397 int __fpu_reserved1;
398 char __avx_reserved1[64];
399 _STRUCT_XMM_REG __fpu_ymmh0; /* YMMH 0 */
400 _STRUCT_XMM_REG __fpu_ymmh1; /* YMMH 1 */
401 _STRUCT_XMM_REG __fpu_ymmh2; /* YMMH 2 */
402 _STRUCT_XMM_REG __fpu_ymmh3; /* YMMH 3 */
403 _STRUCT_XMM_REG __fpu_ymmh4; /* YMMH 4 */
404 _STRUCT_XMM_REG __fpu_ymmh5; /* YMMH 5 */
405 _STRUCT_XMM_REG __fpu_ymmh6; /* YMMH 6 */
406 _STRUCT_XMM_REG __fpu_ymmh7; /* YMMH 7 */
407 _STRUCT_OPMASK_REG __fpu_k0; /* K0 */
408 _STRUCT_OPMASK_REG __fpu_k1; /* K1 */
409 _STRUCT_OPMASK_REG __fpu_k2; /* K2 */
410 _STRUCT_OPMASK_REG __fpu_k3; /* K3 */
411 _STRUCT_OPMASK_REG __fpu_k4; /* K4 */
412 _STRUCT_OPMASK_REG __fpu_k5; /* K5 */
413 _STRUCT_OPMASK_REG __fpu_k6; /* K6 */
414 _STRUCT_OPMASK_REG __fpu_k7; /* K7 */
415 _STRUCT_YMM_REG __fpu_zmmh0; /* ZMMH 0 */
416 _STRUCT_YMM_REG __fpu_zmmh1; /* ZMMH 1 */
417 _STRUCT_YMM_REG __fpu_zmmh2; /* ZMMH 2 */
418 _STRUCT_YMM_REG __fpu_zmmh3; /* ZMMH 3 */
419 _STRUCT_YMM_REG __fpu_zmmh4; /* ZMMH 4 */
420 _STRUCT_YMM_REG __fpu_zmmh5; /* ZMMH 5 */
421 _STRUCT_YMM_REG __fpu_zmmh6; /* ZMMH 6 */
422 _STRUCT_YMM_REG __fpu_zmmh7; /* ZMMH 7 */
423};
5ba3f43e 424
2d21ac55
A
425#else /* !__DARWIN_UNIX03 */
426#define _STRUCT_X86_FLOAT_STATE32 struct i386_float_state
427_STRUCT_X86_FLOAT_STATE32
428{
429 int fpu_reserved[2];
430 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
431 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
432 __uint8_t fpu_ftw; /* x87 FPU tag word */
433 __uint8_t fpu_rsrv1; /* reserved */
434 __uint16_t fpu_fop; /* x87 FPU Opcode */
435 __uint32_t fpu_ip; /* x87 FPU Instruction Pointer offset */
436 __uint16_t fpu_cs; /* x87 FPU Instruction Pointer Selector */
437 __uint16_t fpu_rsrv2; /* reserved */
438 __uint32_t fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
439 __uint16_t fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
440 __uint16_t fpu_rsrv3; /* reserved */
441 __uint32_t fpu_mxcsr; /* MXCSR Register state */
442 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
443 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
444 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
445 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
446 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
447 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
448 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
449 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
450 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
451 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
452 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
453 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
454 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
455 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
456 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
457 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
458 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
459 char fpu_rsrv4[14*16]; /* reserved */
460 int fpu_reserved1;
461};
060df5ea
A
462
463#define _STRUCT_X86_AVX_STATE32 struct i386_avx_state
464_STRUCT_X86_AVX_STATE32
465{
466 int fpu_reserved[2];
467 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
468 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
469 __uint8_t fpu_ftw; /* x87 FPU tag word */
470 __uint8_t fpu_rsrv1; /* reserved */
471 __uint16_t fpu_fop; /* x87 FPU Opcode */
472 __uint32_t fpu_ip; /* x87 FPU Instruction Pointer offset */
473 __uint16_t fpu_cs; /* x87 FPU Instruction Pointer Selector */
474 __uint16_t fpu_rsrv2; /* reserved */
475 __uint32_t fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
476 __uint16_t fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
477 __uint16_t fpu_rsrv3; /* reserved */
478 __uint32_t fpu_mxcsr; /* MXCSR Register state */
479 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
480 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
481 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
482 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
483 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
484 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
485 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
486 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
487 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
488 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
489 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
490 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
491 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
492 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
493 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
494 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
495 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
496 char fpu_rsrv4[14*16]; /* reserved */
497 int fpu_reserved1;
5ba3f43e
A
498 char avx_reserved1[64];
499 _STRUCT_XMM_REG fpu_ymmh0; /* YMMH 0 */
500 _STRUCT_XMM_REG fpu_ymmh1; /* YMMH 1 */
501 _STRUCT_XMM_REG fpu_ymmh2; /* YMMH 2 */
502 _STRUCT_XMM_REG fpu_ymmh3; /* YMMH 3 */
503 _STRUCT_XMM_REG fpu_ymmh4; /* YMMH 4 */
504 _STRUCT_XMM_REG fpu_ymmh5; /* YMMH 5 */
505 _STRUCT_XMM_REG fpu_ymmh6; /* YMMH 6 */
506 _STRUCT_XMM_REG fpu_ymmh7; /* YMMH 7 */
507};
508
5ba3f43e
A
509#define _STRUCT_X86_AVX512_STATE32 struct i386_avx512_state
510_STRUCT_X86_AVX512_STATE32
511{
512 int fpu_reserved[2];
513 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
514 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
515 __uint8_t fpu_ftw; /* x87 FPU tag word */
516 __uint8_t fpu_rsrv1; /* reserved */
517 __uint16_t fpu_fop; /* x87 FPU Opcode */
518 __uint32_t fpu_ip; /* x87 FPU Instruction Pointer offset */
519 __uint16_t fpu_cs; /* x87 FPU Instruction Pointer Selector */
520 __uint16_t fpu_rsrv2; /* reserved */
521 __uint32_t fpu_dp; /* x87 FPU Instruction Operand(Data) Pointer offset */
522 __uint16_t fpu_ds; /* x87 FPU Instruction Operand(Data) Pointer Selector */
523 __uint16_t fpu_rsrv3; /* reserved */
524 __uint32_t fpu_mxcsr; /* MXCSR Register state */
525 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
526 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
527 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
528 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
529 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
530 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
531 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
532 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
533 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
534 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
535 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
536 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
537 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
538 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
539 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
540 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
541 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
542 char fpu_rsrv4[14*16]; /* reserved */
543 int fpu_reserved1;
544 char avx_reserved1[64];
545 _STRUCT_XMM_REG fpu_ymmh0; /* YMMH 0 */
546 _STRUCT_XMM_REG fpu_ymmh1; /* YMMH 1 */
547 _STRUCT_XMM_REG fpu_ymmh2; /* YMMH 2 */
548 _STRUCT_XMM_REG fpu_ymmh3; /* YMMH 3 */
549 _STRUCT_XMM_REG fpu_ymmh4; /* YMMH 4 */
550 _STRUCT_XMM_REG fpu_ymmh5; /* YMMH 5 */
551 _STRUCT_XMM_REG fpu_ymmh6; /* YMMH 6 */
552 _STRUCT_XMM_REG fpu_ymmh7; /* YMMH 7 */
553 _STRUCT_OPMASK_REG fpu_k0; /* K0 */
554 _STRUCT_OPMASK_REG fpu_k1; /* K1 */
555 _STRUCT_OPMASK_REG fpu_k2; /* K2 */
556 _STRUCT_OPMASK_REG fpu_k3; /* K3 */
557 _STRUCT_OPMASK_REG fpu_k4; /* K4 */
558 _STRUCT_OPMASK_REG fpu_k5; /* K5 */
559 _STRUCT_OPMASK_REG fpu_k6; /* K6 */
560 _STRUCT_OPMASK_REG fpu_k7; /* K7 */
561 _STRUCT_YMM_REG fpu_zmmh0; /* ZMMH 0 */
562 _STRUCT_YMM_REG fpu_zmmh1; /* ZMMH 1 */
563 _STRUCT_YMM_REG fpu_zmmh2; /* ZMMH 2 */
564 _STRUCT_YMM_REG fpu_zmmh3; /* ZMMH 3 */
565 _STRUCT_YMM_REG fpu_zmmh4; /* ZMMH 4 */
566 _STRUCT_YMM_REG fpu_zmmh5; /* ZMMH 5 */
567 _STRUCT_YMM_REG fpu_zmmh6; /* ZMMH 6 */
568 _STRUCT_YMM_REG fpu_zmmh7; /* ZMMH 7 */
060df5ea
A
569};
570
2d21ac55
A
571#endif /* !__DARWIN_UNIX03 */
572
573#if __DARWIN_UNIX03
574#define _STRUCT_X86_EXCEPTION_STATE32 struct __darwin_i386_exception_state
575_STRUCT_X86_EXCEPTION_STATE32
576{
6d2010ae
A
577 __uint16_t __trapno;
578 __uint16_t __cpu;
579 __uint32_t __err;
580 __uint32_t __faultvaddr;
2d21ac55
A
581};
582#else /* !__DARWIN_UNIX03 */
583#define _STRUCT_X86_EXCEPTION_STATE32 struct i386_exception_state
584_STRUCT_X86_EXCEPTION_STATE32
585{
6d2010ae
A
586 __uint16_t trapno;
587 __uint16_t cpu;
588 __uint32_t err;
589 __uint32_t faultvaddr;
2d21ac55
A
590};
591#endif /* !__DARWIN_UNIX03 */
592
593#if __DARWIN_UNIX03
594#define _STRUCT_X86_DEBUG_STATE32 struct __darwin_x86_debug_state32
595_STRUCT_X86_DEBUG_STATE32
596{
597 unsigned int __dr0;
598 unsigned int __dr1;
599 unsigned int __dr2;
600 unsigned int __dr3;
601 unsigned int __dr4;
602 unsigned int __dr5;
603 unsigned int __dr6;
604 unsigned int __dr7;
605};
606#else /* !__DARWIN_UNIX03 */
607#define _STRUCT_X86_DEBUG_STATE32 struct x86_debug_state32
608_STRUCT_X86_DEBUG_STATE32
609{
610 unsigned int dr0;
611 unsigned int dr1;
612 unsigned int dr2;
613 unsigned int dr3;
614 unsigned int dr4;
615 unsigned int dr5;
616 unsigned int dr6;
617 unsigned int dr7;
618};
619#endif /* !__DARWIN_UNIX03 */
620
cb323159
A
621#define _STRUCT_X86_PAGEIN_STATE struct __x86_pagein_state
622_STRUCT_X86_PAGEIN_STATE
623{
624 int __pagein_error;
625};
626
2d21ac55
A
627/*
628 * 64 bit versions of the above
629 */
630
631#if __DARWIN_UNIX03
632#define _STRUCT_X86_THREAD_STATE64 struct __darwin_x86_thread_state64
633_STRUCT_X86_THREAD_STATE64
634{
635 __uint64_t __rax;
636 __uint64_t __rbx;
637 __uint64_t __rcx;
638 __uint64_t __rdx;
639 __uint64_t __rdi;
640 __uint64_t __rsi;
641 __uint64_t __rbp;
642 __uint64_t __rsp;
643 __uint64_t __r8;
644 __uint64_t __r9;
645 __uint64_t __r10;
646 __uint64_t __r11;
647 __uint64_t __r12;
648 __uint64_t __r13;
649 __uint64_t __r14;
650 __uint64_t __r15;
651 __uint64_t __rip;
652 __uint64_t __rflags;
653 __uint64_t __cs;
654 __uint64_t __fs;
655 __uint64_t __gs;
656};
657#else /* !__DARWIN_UNIX03 */
658#define _STRUCT_X86_THREAD_STATE64 struct x86_thread_state64
659_STRUCT_X86_THREAD_STATE64
660{
661 __uint64_t rax;
662 __uint64_t rbx;
663 __uint64_t rcx;
664 __uint64_t rdx;
665 __uint64_t rdi;
666 __uint64_t rsi;
667 __uint64_t rbp;
668 __uint64_t rsp;
669 __uint64_t r8;
670 __uint64_t r9;
671 __uint64_t r10;
672 __uint64_t r11;
673 __uint64_t r12;
674 __uint64_t r13;
675 __uint64_t r14;
676 __uint64_t r15;
677 __uint64_t rip;
678 __uint64_t rflags;
679 __uint64_t cs;
680 __uint64_t fs;
681 __uint64_t gs;
682};
683#endif /* !__DARWIN_UNIX03 */
684
0a7de745
A
685/*
686 * 64 bit versions of the above (complete)
687 */
688
689#if __DARWIN_UNIX03
690#define _STRUCT_X86_THREAD_FULL_STATE64 struct __darwin_x86_thread_full_state64
691_STRUCT_X86_THREAD_FULL_STATE64
692{
cb323159 693 _STRUCT_X86_THREAD_STATE64 __ss64;
0a7de745
A
694 __uint64_t __ds;
695 __uint64_t __es;
696 __uint64_t __ss;
697 __uint64_t __gsbase;
698};
699#else /* !__DARWIN_UNIX03 */
700#define _STRUCT_X86_THREAD_FULL_STATE64 struct x86_thread_full_state64
701_STRUCT_X86_THREAD_FULL_STATE64
702{
703 _STRUCT_X86_THREAD_STATE64 ss64;
704 __uint64_t ds;
705 __uint64_t es;
706 __uint64_t ss;
707 __uint64_t gsbase;
708};
709#endif /* !__DARWIN_UNIX03 */
710
2d21ac55
A
711
712#if __DARWIN_UNIX03
713#define _STRUCT_X86_FLOAT_STATE64 struct __darwin_x86_float_state64
714_STRUCT_X86_FLOAT_STATE64
715{
716 int __fpu_reserved[2];
717 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
718 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
719 __uint8_t __fpu_ftw; /* x87 FPU tag word */
720 __uint8_t __fpu_rsrv1; /* reserved */
721 __uint16_t __fpu_fop; /* x87 FPU Opcode */
722
723 /* x87 FPU Instruction Pointer */
724 __uint32_t __fpu_ip; /* offset */
725 __uint16_t __fpu_cs; /* Selector */
726
727 __uint16_t __fpu_rsrv2; /* reserved */
728
729 /* x87 FPU Instruction Operand(Data) Pointer */
730 __uint32_t __fpu_dp; /* offset */
731 __uint16_t __fpu_ds; /* Selector */
732
733 __uint16_t __fpu_rsrv3; /* reserved */
734 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
735 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
736 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
737 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
738 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
739 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
740 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
741 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
742 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
743 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
744 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
745 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
746 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
747 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
748 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
749 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
750 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
751 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
752 _STRUCT_XMM_REG __fpu_xmm8; /* XMM 8 */
753 _STRUCT_XMM_REG __fpu_xmm9; /* XMM 9 */
754 _STRUCT_XMM_REG __fpu_xmm10; /* XMM 10 */
755 _STRUCT_XMM_REG __fpu_xmm11; /* XMM 11 */
756 _STRUCT_XMM_REG __fpu_xmm12; /* XMM 12 */
757 _STRUCT_XMM_REG __fpu_xmm13; /* XMM 13 */
758 _STRUCT_XMM_REG __fpu_xmm14; /* XMM 14 */
759 _STRUCT_XMM_REG __fpu_xmm15; /* XMM 15 */
760 char __fpu_rsrv4[6*16]; /* reserved */
761 int __fpu_reserved1;
762};
060df5ea
A
763
764#define _STRUCT_X86_AVX_STATE64 struct __darwin_x86_avx_state64
765_STRUCT_X86_AVX_STATE64
766{
767 int __fpu_reserved[2];
768 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
769 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
770 __uint8_t __fpu_ftw; /* x87 FPU tag word */
771 __uint8_t __fpu_rsrv1; /* reserved */
772 __uint16_t __fpu_fop; /* x87 FPU Opcode */
773
774 /* x87 FPU Instruction Pointer */
775 __uint32_t __fpu_ip; /* offset */
776 __uint16_t __fpu_cs; /* Selector */
777
778 __uint16_t __fpu_rsrv2; /* reserved */
779
780 /* x87 FPU Instruction Operand(Data) Pointer */
781 __uint32_t __fpu_dp; /* offset */
782 __uint16_t __fpu_ds; /* Selector */
783
784 __uint16_t __fpu_rsrv3; /* reserved */
785 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
786 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
787 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
788 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
789 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
790 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
791 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
792 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
793 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
794 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
795 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
796 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
797 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
798 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
799 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
800 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
801 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
802 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
803 _STRUCT_XMM_REG __fpu_xmm8; /* XMM 8 */
804 _STRUCT_XMM_REG __fpu_xmm9; /* XMM 9 */
805 _STRUCT_XMM_REG __fpu_xmm10; /* XMM 10 */
806 _STRUCT_XMM_REG __fpu_xmm11; /* XMM 11 */
807 _STRUCT_XMM_REG __fpu_xmm12; /* XMM 12 */
808 _STRUCT_XMM_REG __fpu_xmm13; /* XMM 13 */
809 _STRUCT_XMM_REG __fpu_xmm14; /* XMM 14 */
810 _STRUCT_XMM_REG __fpu_xmm15; /* XMM 15 */
811 char __fpu_rsrv4[6*16]; /* reserved */
812 int __fpu_reserved1;
813 char __avx_reserved1[64];
814 _STRUCT_XMM_REG __fpu_ymmh0; /* YMMH 0 */
815 _STRUCT_XMM_REG __fpu_ymmh1; /* YMMH 1 */
816 _STRUCT_XMM_REG __fpu_ymmh2; /* YMMH 2 */
817 _STRUCT_XMM_REG __fpu_ymmh3; /* YMMH 3 */
818 _STRUCT_XMM_REG __fpu_ymmh4; /* YMMH 4 */
819 _STRUCT_XMM_REG __fpu_ymmh5; /* YMMH 5 */
820 _STRUCT_XMM_REG __fpu_ymmh6; /* YMMH 6 */
821 _STRUCT_XMM_REG __fpu_ymmh7; /* YMMH 7 */
822 _STRUCT_XMM_REG __fpu_ymmh8; /* YMMH 8 */
823 _STRUCT_XMM_REG __fpu_ymmh9; /* YMMH 9 */
824 _STRUCT_XMM_REG __fpu_ymmh10; /* YMMH 10 */
825 _STRUCT_XMM_REG __fpu_ymmh11; /* YMMH 11 */
826 _STRUCT_XMM_REG __fpu_ymmh12; /* YMMH 12 */
827 _STRUCT_XMM_REG __fpu_ymmh13; /* YMMH 13 */
828 _STRUCT_XMM_REG __fpu_ymmh14; /* YMMH 14 */
829 _STRUCT_XMM_REG __fpu_ymmh15; /* YMMH 15 */
830};
831
5ba3f43e
A
832#define _STRUCT_X86_AVX512_STATE64 struct __darwin_x86_avx512_state64
833_STRUCT_X86_AVX512_STATE64
834{
835 int __fpu_reserved[2];
836 _STRUCT_FP_CONTROL __fpu_fcw; /* x87 FPU control word */
837 _STRUCT_FP_STATUS __fpu_fsw; /* x87 FPU status word */
838 __uint8_t __fpu_ftw; /* x87 FPU tag word */
839 __uint8_t __fpu_rsrv1; /* reserved */
840 __uint16_t __fpu_fop; /* x87 FPU Opcode */
841
842 /* x87 FPU Instruction Pointer */
843 __uint32_t __fpu_ip; /* offset */
844 __uint16_t __fpu_cs; /* Selector */
845
846 __uint16_t __fpu_rsrv2; /* reserved */
847
848 /* x87 FPU Instruction Operand(Data) Pointer */
849 __uint32_t __fpu_dp; /* offset */
850 __uint16_t __fpu_ds; /* Selector */
851
852 __uint16_t __fpu_rsrv3; /* reserved */
853 __uint32_t __fpu_mxcsr; /* MXCSR Register state */
854 __uint32_t __fpu_mxcsrmask; /* MXCSR mask */
855 _STRUCT_MMST_REG __fpu_stmm0; /* ST0/MM0 */
856 _STRUCT_MMST_REG __fpu_stmm1; /* ST1/MM1 */
857 _STRUCT_MMST_REG __fpu_stmm2; /* ST2/MM2 */
858 _STRUCT_MMST_REG __fpu_stmm3; /* ST3/MM3 */
859 _STRUCT_MMST_REG __fpu_stmm4; /* ST4/MM4 */
860 _STRUCT_MMST_REG __fpu_stmm5; /* ST5/MM5 */
861 _STRUCT_MMST_REG __fpu_stmm6; /* ST6/MM6 */
862 _STRUCT_MMST_REG __fpu_stmm7; /* ST7/MM7 */
863 _STRUCT_XMM_REG __fpu_xmm0; /* XMM 0 */
864 _STRUCT_XMM_REG __fpu_xmm1; /* XMM 1 */
865 _STRUCT_XMM_REG __fpu_xmm2; /* XMM 2 */
866 _STRUCT_XMM_REG __fpu_xmm3; /* XMM 3 */
867 _STRUCT_XMM_REG __fpu_xmm4; /* XMM 4 */
868 _STRUCT_XMM_REG __fpu_xmm5; /* XMM 5 */
869 _STRUCT_XMM_REG __fpu_xmm6; /* XMM 6 */
870 _STRUCT_XMM_REG __fpu_xmm7; /* XMM 7 */
871 _STRUCT_XMM_REG __fpu_xmm8; /* XMM 8 */
872 _STRUCT_XMM_REG __fpu_xmm9; /* XMM 9 */
873 _STRUCT_XMM_REG __fpu_xmm10; /* XMM 10 */
874 _STRUCT_XMM_REG __fpu_xmm11; /* XMM 11 */
875 _STRUCT_XMM_REG __fpu_xmm12; /* XMM 12 */
876 _STRUCT_XMM_REG __fpu_xmm13; /* XMM 13 */
877 _STRUCT_XMM_REG __fpu_xmm14; /* XMM 14 */
878 _STRUCT_XMM_REG __fpu_xmm15; /* XMM 15 */
879 char __fpu_rsrv4[6*16]; /* reserved */
880 int __fpu_reserved1;
881 char __avx_reserved1[64];
882 _STRUCT_XMM_REG __fpu_ymmh0; /* YMMH 0 */
883 _STRUCT_XMM_REG __fpu_ymmh1; /* YMMH 1 */
884 _STRUCT_XMM_REG __fpu_ymmh2; /* YMMH 2 */
885 _STRUCT_XMM_REG __fpu_ymmh3; /* YMMH 3 */
886 _STRUCT_XMM_REG __fpu_ymmh4; /* YMMH 4 */
887 _STRUCT_XMM_REG __fpu_ymmh5; /* YMMH 5 */
888 _STRUCT_XMM_REG __fpu_ymmh6; /* YMMH 6 */
889 _STRUCT_XMM_REG __fpu_ymmh7; /* YMMH 7 */
890 _STRUCT_XMM_REG __fpu_ymmh8; /* YMMH 8 */
891 _STRUCT_XMM_REG __fpu_ymmh9; /* YMMH 9 */
892 _STRUCT_XMM_REG __fpu_ymmh10; /* YMMH 10 */
893 _STRUCT_XMM_REG __fpu_ymmh11; /* YMMH 11 */
894 _STRUCT_XMM_REG __fpu_ymmh12; /* YMMH 12 */
895 _STRUCT_XMM_REG __fpu_ymmh13; /* YMMH 13 */
896 _STRUCT_XMM_REG __fpu_ymmh14; /* YMMH 14 */
897 _STRUCT_XMM_REG __fpu_ymmh15; /* YMMH 15 */
898 _STRUCT_OPMASK_REG __fpu_k0; /* K0 */
899 _STRUCT_OPMASK_REG __fpu_k1; /* K1 */
900 _STRUCT_OPMASK_REG __fpu_k2; /* K2 */
901 _STRUCT_OPMASK_REG __fpu_k3; /* K3 */
902 _STRUCT_OPMASK_REG __fpu_k4; /* K4 */
903 _STRUCT_OPMASK_REG __fpu_k5; /* K5 */
904 _STRUCT_OPMASK_REG __fpu_k6; /* K6 */
905 _STRUCT_OPMASK_REG __fpu_k7; /* K7 */
906 _STRUCT_YMM_REG __fpu_zmmh0; /* ZMMH 0 */
907 _STRUCT_YMM_REG __fpu_zmmh1; /* ZMMH 1 */
908 _STRUCT_YMM_REG __fpu_zmmh2; /* ZMMH 2 */
909 _STRUCT_YMM_REG __fpu_zmmh3; /* ZMMH 3 */
910 _STRUCT_YMM_REG __fpu_zmmh4; /* ZMMH 4 */
911 _STRUCT_YMM_REG __fpu_zmmh5; /* ZMMH 5 */
912 _STRUCT_YMM_REG __fpu_zmmh6; /* ZMMH 6 */
913 _STRUCT_YMM_REG __fpu_zmmh7; /* ZMMH 7 */
914 _STRUCT_YMM_REG __fpu_zmmh8; /* ZMMH 8 */
915 _STRUCT_YMM_REG __fpu_zmmh9; /* ZMMH 9 */
916 _STRUCT_YMM_REG __fpu_zmmh10; /* ZMMH 10 */
917 _STRUCT_YMM_REG __fpu_zmmh11; /* ZMMH 11 */
918 _STRUCT_YMM_REG __fpu_zmmh12; /* ZMMH 12 */
919 _STRUCT_YMM_REG __fpu_zmmh13; /* ZMMH 13 */
920 _STRUCT_YMM_REG __fpu_zmmh14; /* ZMMH 14 */
921 _STRUCT_YMM_REG __fpu_zmmh15; /* ZMMH 15 */
922 _STRUCT_ZMM_REG __fpu_zmm16; /* ZMM 16 */
923 _STRUCT_ZMM_REG __fpu_zmm17; /* ZMM 17 */
924 _STRUCT_ZMM_REG __fpu_zmm18; /* ZMM 18 */
925 _STRUCT_ZMM_REG __fpu_zmm19; /* ZMM 19 */
926 _STRUCT_ZMM_REG __fpu_zmm20; /* ZMM 20 */
927 _STRUCT_ZMM_REG __fpu_zmm21; /* ZMM 21 */
928 _STRUCT_ZMM_REG __fpu_zmm22; /* ZMM 22 */
929 _STRUCT_ZMM_REG __fpu_zmm23; /* ZMM 23 */
930 _STRUCT_ZMM_REG __fpu_zmm24; /* ZMM 24 */
931 _STRUCT_ZMM_REG __fpu_zmm25; /* ZMM 25 */
932 _STRUCT_ZMM_REG __fpu_zmm26; /* ZMM 26 */
933 _STRUCT_ZMM_REG __fpu_zmm27; /* ZMM 27 */
934 _STRUCT_ZMM_REG __fpu_zmm28; /* ZMM 28 */
935 _STRUCT_ZMM_REG __fpu_zmm29; /* ZMM 29 */
936 _STRUCT_ZMM_REG __fpu_zmm30; /* ZMM 30 */
937 _STRUCT_ZMM_REG __fpu_zmm31; /* ZMM 31 */
938};
5ba3f43e 939
2d21ac55
A
940#else /* !__DARWIN_UNIX03 */
941#define _STRUCT_X86_FLOAT_STATE64 struct x86_float_state64
942_STRUCT_X86_FLOAT_STATE64
943{
944 int fpu_reserved[2];
945 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
946 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
947 __uint8_t fpu_ftw; /* x87 FPU tag word */
948 __uint8_t fpu_rsrv1; /* reserved */
949 __uint16_t fpu_fop; /* x87 FPU Opcode */
950
951 /* x87 FPU Instruction Pointer */
952 __uint32_t fpu_ip; /* offset */
953 __uint16_t fpu_cs; /* Selector */
954
955 __uint16_t fpu_rsrv2; /* reserved */
956
957 /* x87 FPU Instruction Operand(Data) Pointer */
958 __uint32_t fpu_dp; /* offset */
959 __uint16_t fpu_ds; /* Selector */
960
961 __uint16_t fpu_rsrv3; /* reserved */
962 __uint32_t fpu_mxcsr; /* MXCSR Register state */
963 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
964 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
965 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
966 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
967 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
968 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
969 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
970 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
971 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
972 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
973 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
974 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
975 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
976 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
977 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
978 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
979 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
980 _STRUCT_XMM_REG fpu_xmm8; /* XMM 8 */
981 _STRUCT_XMM_REG fpu_xmm9; /* XMM 9 */
982 _STRUCT_XMM_REG fpu_xmm10; /* XMM 10 */
983 _STRUCT_XMM_REG fpu_xmm11; /* XMM 11 */
984 _STRUCT_XMM_REG fpu_xmm12; /* XMM 12 */
985 _STRUCT_XMM_REG fpu_xmm13; /* XMM 13 */
986 _STRUCT_XMM_REG fpu_xmm14; /* XMM 14 */
987 _STRUCT_XMM_REG fpu_xmm15; /* XMM 15 */
988 char fpu_rsrv4[6*16]; /* reserved */
989 int fpu_reserved1;
990};
060df5ea
A
991
992#define _STRUCT_X86_AVX_STATE64 struct x86_avx_state64
993_STRUCT_X86_AVX_STATE64
994{
995 int fpu_reserved[2];
996 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
997 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
998 __uint8_t fpu_ftw; /* x87 FPU tag word */
999 __uint8_t fpu_rsrv1; /* reserved */
1000 __uint16_t fpu_fop; /* x87 FPU Opcode */
1001
1002 /* x87 FPU Instruction Pointer */
1003 __uint32_t fpu_ip; /* offset */
1004 __uint16_t fpu_cs; /* Selector */
1005
1006 __uint16_t fpu_rsrv2; /* reserved */
1007
1008 /* x87 FPU Instruction Operand(Data) Pointer */
1009 __uint32_t fpu_dp; /* offset */
1010 __uint16_t fpu_ds; /* Selector */
1011
1012 __uint16_t fpu_rsrv3; /* reserved */
1013 __uint32_t fpu_mxcsr; /* MXCSR Register state */
1014 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
1015 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
1016 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
1017 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
1018 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
1019 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
1020 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
1021 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
1022 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
1023 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
1024 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
1025 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
1026 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
1027 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
1028 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
1029 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
1030 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
1031 _STRUCT_XMM_REG fpu_xmm8; /* XMM 8 */
1032 _STRUCT_XMM_REG fpu_xmm9; /* XMM 9 */
1033 _STRUCT_XMM_REG fpu_xmm10; /* XMM 10 */
1034 _STRUCT_XMM_REG fpu_xmm11; /* XMM 11 */
1035 _STRUCT_XMM_REG fpu_xmm12; /* XMM 12 */
1036 _STRUCT_XMM_REG fpu_xmm13; /* XMM 13 */
1037 _STRUCT_XMM_REG fpu_xmm14; /* XMM 14 */
1038 _STRUCT_XMM_REG fpu_xmm15; /* XMM 15 */
1039 char fpu_rsrv4[6*16]; /* reserved */
1040 int fpu_reserved1;
5ba3f43e
A
1041 char avx_reserved1[64];
1042 _STRUCT_XMM_REG fpu_ymmh0; /* YMMH 0 */
1043 _STRUCT_XMM_REG fpu_ymmh1; /* YMMH 1 */
1044 _STRUCT_XMM_REG fpu_ymmh2; /* YMMH 2 */
1045 _STRUCT_XMM_REG fpu_ymmh3; /* YMMH 3 */
1046 _STRUCT_XMM_REG fpu_ymmh4; /* YMMH 4 */
1047 _STRUCT_XMM_REG fpu_ymmh5; /* YMMH 5 */
1048 _STRUCT_XMM_REG fpu_ymmh6; /* YMMH 6 */
1049 _STRUCT_XMM_REG fpu_ymmh7; /* YMMH 7 */
1050 _STRUCT_XMM_REG fpu_ymmh8; /* YMMH 8 */
1051 _STRUCT_XMM_REG fpu_ymmh9; /* YMMH 9 */
1052 _STRUCT_XMM_REG fpu_ymmh10; /* YMMH 10 */
1053 _STRUCT_XMM_REG fpu_ymmh11; /* YMMH 11 */
1054 _STRUCT_XMM_REG fpu_ymmh12; /* YMMH 12 */
1055 _STRUCT_XMM_REG fpu_ymmh13; /* YMMH 13 */
1056 _STRUCT_XMM_REG fpu_ymmh14; /* YMMH 14 */
1057 _STRUCT_XMM_REG fpu_ymmh15; /* YMMH 15 */
1058};
1059
5ba3f43e
A
1060#define _STRUCT_X86_AVX512_STATE64 struct x86_avx512_state64
1061_STRUCT_X86_AVX512_STATE64
1062{
1063 int fpu_reserved[2];
1064 _STRUCT_FP_CONTROL fpu_fcw; /* x87 FPU control word */
1065 _STRUCT_FP_STATUS fpu_fsw; /* x87 FPU status word */
1066 __uint8_t fpu_ftw; /* x87 FPU tag word */
1067 __uint8_t fpu_rsrv1; /* reserved */
1068 __uint16_t fpu_fop; /* x87 FPU Opcode */
1069
1070 /* x87 FPU Instruction Pointer */
1071 __uint32_t fpu_ip; /* offset */
1072 __uint16_t fpu_cs; /* Selector */
1073
1074 __uint16_t fpu_rsrv2; /* reserved */
1075
1076 /* x87 FPU Instruction Operand(Data) Pointer */
1077 __uint32_t fpu_dp; /* offset */
1078 __uint16_t fpu_ds; /* Selector */
1079
1080 __uint16_t fpu_rsrv3; /* reserved */
1081 __uint32_t fpu_mxcsr; /* MXCSR Register state */
1082 __uint32_t fpu_mxcsrmask; /* MXCSR mask */
1083 _STRUCT_MMST_REG fpu_stmm0; /* ST0/MM0 */
1084 _STRUCT_MMST_REG fpu_stmm1; /* ST1/MM1 */
1085 _STRUCT_MMST_REG fpu_stmm2; /* ST2/MM2 */
1086 _STRUCT_MMST_REG fpu_stmm3; /* ST3/MM3 */
1087 _STRUCT_MMST_REG fpu_stmm4; /* ST4/MM4 */
1088 _STRUCT_MMST_REG fpu_stmm5; /* ST5/MM5 */
1089 _STRUCT_MMST_REG fpu_stmm6; /* ST6/MM6 */
1090 _STRUCT_MMST_REG fpu_stmm7; /* ST7/MM7 */
1091 _STRUCT_XMM_REG fpu_xmm0; /* XMM 0 */
1092 _STRUCT_XMM_REG fpu_xmm1; /* XMM 1 */
1093 _STRUCT_XMM_REG fpu_xmm2; /* XMM 2 */
1094 _STRUCT_XMM_REG fpu_xmm3; /* XMM 3 */
1095 _STRUCT_XMM_REG fpu_xmm4; /* XMM 4 */
1096 _STRUCT_XMM_REG fpu_xmm5; /* XMM 5 */
1097 _STRUCT_XMM_REG fpu_xmm6; /* XMM 6 */
1098 _STRUCT_XMM_REG fpu_xmm7; /* XMM 7 */
1099 _STRUCT_XMM_REG fpu_xmm8; /* XMM 8 */
1100 _STRUCT_XMM_REG fpu_xmm9; /* XMM 9 */
1101 _STRUCT_XMM_REG fpu_xmm10; /* XMM 10 */
1102 _STRUCT_XMM_REG fpu_xmm11; /* XMM 11 */
1103 _STRUCT_XMM_REG fpu_xmm12; /* XMM 12 */
1104 _STRUCT_XMM_REG fpu_xmm13; /* XMM 13 */
1105 _STRUCT_XMM_REG fpu_xmm14; /* XMM 14 */
1106 _STRUCT_XMM_REG fpu_xmm15; /* XMM 15 */
1107 char fpu_rsrv4[6*16]; /* reserved */
1108 int fpu_reserved1;
1109 char avx_reserved1[64];
1110 _STRUCT_XMM_REG fpu_ymmh0; /* YMMH 0 */
1111 _STRUCT_XMM_REG fpu_ymmh1; /* YMMH 1 */
1112 _STRUCT_XMM_REG fpu_ymmh2; /* YMMH 2 */
1113 _STRUCT_XMM_REG fpu_ymmh3; /* YMMH 3 */
1114 _STRUCT_XMM_REG fpu_ymmh4; /* YMMH 4 */
1115 _STRUCT_XMM_REG fpu_ymmh5; /* YMMH 5 */
1116 _STRUCT_XMM_REG fpu_ymmh6; /* YMMH 6 */
1117 _STRUCT_XMM_REG fpu_ymmh7; /* YMMH 7 */
1118 _STRUCT_XMM_REG fpu_ymmh8; /* YMMH 8 */
1119 _STRUCT_XMM_REG fpu_ymmh9; /* YMMH 9 */
1120 _STRUCT_XMM_REG fpu_ymmh10; /* YMMH 10 */
1121 _STRUCT_XMM_REG fpu_ymmh11; /* YMMH 11 */
1122 _STRUCT_XMM_REG fpu_ymmh12; /* YMMH 12 */
1123 _STRUCT_XMM_REG fpu_ymmh13; /* YMMH 13 */
1124 _STRUCT_XMM_REG fpu_ymmh14; /* YMMH 14 */
1125 _STRUCT_XMM_REG fpu_ymmh15; /* YMMH 15 */
1126 _STRUCT_OPMASK_REG fpu_k0; /* K0 */
1127 _STRUCT_OPMASK_REG fpu_k1; /* K1 */
1128 _STRUCT_OPMASK_REG fpu_k2; /* K2 */
1129 _STRUCT_OPMASK_REG fpu_k3; /* K3 */
1130 _STRUCT_OPMASK_REG fpu_k4; /* K4 */
1131 _STRUCT_OPMASK_REG fpu_k5; /* K5 */
1132 _STRUCT_OPMASK_REG fpu_k6; /* K6 */
1133 _STRUCT_OPMASK_REG fpu_k7; /* K7 */
1134 _STRUCT_YMM_REG fpu_zmmh0; /* ZMMH 0 */
1135 _STRUCT_YMM_REG fpu_zmmh1; /* ZMMH 1 */
1136 _STRUCT_YMM_REG fpu_zmmh2; /* ZMMH 2 */
1137 _STRUCT_YMM_REG fpu_zmmh3; /* ZMMH 3 */
1138 _STRUCT_YMM_REG fpu_zmmh4; /* ZMMH 4 */
1139 _STRUCT_YMM_REG fpu_zmmh5; /* ZMMH 5 */
1140 _STRUCT_YMM_REG fpu_zmmh6; /* ZMMH 6 */
1141 _STRUCT_YMM_REG fpu_zmmh7; /* ZMMH 7 */
1142 _STRUCT_YMM_REG fpu_zmmh8; /* ZMMH 8 */
1143 _STRUCT_YMM_REG fpu_zmmh9; /* ZMMH 9 */
1144 _STRUCT_YMM_REG fpu_zmmh10; /* ZMMH 10 */
1145 _STRUCT_YMM_REG fpu_zmmh11; /* ZMMH 11 */
1146 _STRUCT_YMM_REG fpu_zmmh12; /* ZMMH 12 */
1147 _STRUCT_YMM_REG fpu_zmmh13; /* ZMMH 13 */
1148 _STRUCT_YMM_REG fpu_zmmh14; /* ZMMH 14 */
1149 _STRUCT_YMM_REG fpu_zmmh15; /* ZMMH 15 */
1150 _STRUCT_ZMM_REG fpu_zmm16; /* ZMM 16 */
1151 _STRUCT_ZMM_REG fpu_zmm17; /* ZMM 17 */
1152 _STRUCT_ZMM_REG fpu_zmm18; /* ZMM 18 */
1153 _STRUCT_ZMM_REG fpu_zmm19; /* ZMM 19 */
1154 _STRUCT_ZMM_REG fpu_zmm20; /* ZMM 20 */
1155 _STRUCT_ZMM_REG fpu_zmm21; /* ZMM 21 */
1156 _STRUCT_ZMM_REG fpu_zmm22; /* ZMM 22 */
1157 _STRUCT_ZMM_REG fpu_zmm23; /* ZMM 23 */
1158 _STRUCT_ZMM_REG fpu_zmm24; /* ZMM 24 */
1159 _STRUCT_ZMM_REG fpu_zmm25; /* ZMM 25 */
1160 _STRUCT_ZMM_REG fpu_zmm26; /* ZMM 26 */
1161 _STRUCT_ZMM_REG fpu_zmm27; /* ZMM 27 */
1162 _STRUCT_ZMM_REG fpu_zmm28; /* ZMM 28 */
1163 _STRUCT_ZMM_REG fpu_zmm29; /* ZMM 29 */
1164 _STRUCT_ZMM_REG fpu_zmm30; /* ZMM 30 */
1165 _STRUCT_ZMM_REG fpu_zmm31; /* ZMM 31 */
060df5ea
A
1166};
1167
2d21ac55
A
1168#endif /* !__DARWIN_UNIX03 */
1169
1170#if __DARWIN_UNIX03
1171#define _STRUCT_X86_EXCEPTION_STATE64 struct __darwin_x86_exception_state64
1172_STRUCT_X86_EXCEPTION_STATE64
1173{
6d2010ae
A
1174 __uint16_t __trapno;
1175 __uint16_t __cpu;
1176 __uint32_t __err;
1177 __uint64_t __faultvaddr;
2d21ac55
A
1178};
1179#else /* !__DARWIN_UNIX03 */
1180#define _STRUCT_X86_EXCEPTION_STATE64 struct x86_exception_state64
1181_STRUCT_X86_EXCEPTION_STATE64
1182{
6d2010ae
A
1183 __uint16_t trapno;
1184 __uint16_t cpu;
1185 __uint32_t err;
1186 __uint64_t faultvaddr;
2d21ac55
A
1187};
1188#endif /* !__DARWIN_UNIX03 */
1189
1190#if __DARWIN_UNIX03
1191#define _STRUCT_X86_DEBUG_STATE64 struct __darwin_x86_debug_state64
1192_STRUCT_X86_DEBUG_STATE64
1193{
1194 __uint64_t __dr0;
1195 __uint64_t __dr1;
1196 __uint64_t __dr2;
1197 __uint64_t __dr3;
1198 __uint64_t __dr4;
1199 __uint64_t __dr5;
1200 __uint64_t __dr6;
1201 __uint64_t __dr7;
1202};
1203#else /* !__DARWIN_UNIX03 */
1204#define _STRUCT_X86_DEBUG_STATE64 struct x86_debug_state64
1205_STRUCT_X86_DEBUG_STATE64
1206{
1207 __uint64_t dr0;
1208 __uint64_t dr1;
1209 __uint64_t dr2;
1210 __uint64_t dr3;
1211 __uint64_t dr4;
1212 __uint64_t dr5;
1213 __uint64_t dr6;
1214 __uint64_t dr7;
1215};
1216#endif /* !__DARWIN_UNIX03 */
1217
5ba3f43e
A
1218#if __DARWIN_UNIX03
1219#define _STRUCT_X86_CPMU_STATE64 struct __darwin_x86_cpmu_state64
1220_STRUCT_X86_CPMU_STATE64
1221{
1222 __uint64_t __ctrs[16];
1223};
1224#else /* __DARWIN_UNIX03 */
1225#define _STRUCT_X86_CPMU_STATE64 struct x86_cpmu_state64
1226_STRUCT_X86_CPMU_STATE64
1227{
1228 __uint64_t ctrs[16];
1229};
1230#endif /* !__DARWIN_UNIX03 */
1231
2d21ac55 1232#endif /* _MACH_I386__STRUCTS_H_ */