#ifndef _MACH_I386__TYPES_H_
#define _MACH_I386__TYPES_H_
#if !__DARWIN_UNIX03
struct i386_thread_state
#else
struct __darwin_i386_thread_state
#endif
{
unsigned int eax;
unsigned int ebx;
unsigned int ecx;
unsigned int edx;
unsigned int edi;
unsigned int esi;
unsigned int ebp;
unsigned int esp;
unsigned int ss;
unsigned int eflags;
unsigned int eip;
unsigned int cs;
unsigned int ds;
unsigned int es;
unsigned int fs;
unsigned int gs;
};
#if !__DARWIN_UNIX03
struct x86_thread_state64
#else
struct __darwin_x86_thread_state64
#endif
{
uint64_t rax;
uint64_t rbx;
uint64_t rcx;
uint64_t rdx;
uint64_t rdi;
uint64_t rsi;
uint64_t rbp;
uint64_t rsp;
uint64_t r8;
uint64_t r9;
uint64_t r10;
uint64_t r11;
uint64_t r12;
uint64_t r13;
uint64_t r14;
uint64_t r15;
uint64_t rip;
uint64_t rflags;
uint64_t cs;
uint64_t fs;
uint64_t gs;
};
typedef struct fp_control {
unsigned short invalid :1,
denorm :1,
zdiv :1,
ovrfl :1,
undfl :1,
precis :1,
:2,
pc :2,
#define FP_PREC_24B 0
#define FP_PREC_53B 2
#define FP_PREC_64B 3
rc :2,
#define FP_RND_NEAR 0
#define FP_RND_DOWN 1
#define FP_RND_UP 2
#define FP_CHOP 3
:1,
:3;
} fp_control_t;
typedef struct fp_status {
unsigned short invalid :1,
denorm :1,
zdiv :1,
ovrfl :1,
undfl :1,
precis :1,
stkflt :1,
errsumm :1,
c0 :1,
c1 :1,
c2 :1,
tos :3,
c3 :1,
busy :1;
} fp_status_t;
struct mmst_reg {
char mmst_reg[10];
char mmst_rsrv[6];
};
struct xmm_reg {
char xmm_reg[16];
};
#define FP_STATE_BYTES 512
#if !__DARWIN_UNIX03
struct i386_float_state
#else
struct __darwin_i386_float_state
#endif
{
int fpu_reserved[2];
fp_control_t fpu_fcw;
fp_status_t fpu_fsw;
uint8_t fpu_ftw;
uint8_t fpu_rsrv1;
uint16_t fpu_fop;
uint32_t fpu_ip;
uint16_t fpu_cs;
uint16_t fpu_rsrv2;
uint32_t fpu_dp;
uint16_t fpu_ds;
uint16_t fpu_rsrv3;
uint32_t fpu_mxcsr;
uint32_t fpu_mxcsrmask;
struct mmst_reg fpu_stmm0;
struct mmst_reg fpu_stmm1;
struct mmst_reg fpu_stmm2;
struct mmst_reg fpu_stmm3;
struct mmst_reg fpu_stmm4;
struct mmst_reg fpu_stmm5;
struct mmst_reg fpu_stmm6;
struct mmst_reg fpu_stmm7;
struct xmm_reg fpu_xmm0;
struct xmm_reg fpu_xmm1;
struct xmm_reg fpu_xmm2;
struct xmm_reg fpu_xmm3;
struct xmm_reg fpu_xmm4;
struct xmm_reg fpu_xmm5;
struct xmm_reg fpu_xmm6;
struct xmm_reg fpu_xmm7;
char fpu_rsrv4[14*16];
int fpu_reserved1;
};
#if !__DARWIN_UNIX03
struct i386_exception_state
#else
struct __darwin_i386_exception_state
#endif
{
unsigned int trapno;
unsigned int err;
unsigned int faultvaddr;
};
#if !__DARWIN_UNIX03
struct x86_debug_state
#else
struct __darwin_x86_debug_state
#endif
{
unsigned int dr0;
unsigned int dr1;
unsigned int dr2;
unsigned int dr3;
unsigned int dr4;
unsigned int dr5;
unsigned int dr6;
unsigned int dr7;
};
#endif