X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/060df5ea7c632b1ac8cc8aac1fb59758165c2084..9d749ea394c01276fa19e397e70f46858e849c76:/osfmk/i386/fpu.h diff --git a/osfmk/i386/fpu.h b/osfmk/i386/fpu.h index a606aab41..84a03460d 100644 --- a/osfmk/i386/fpu.h +++ b/osfmk/i386/fpu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2012 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -61,19 +61,33 @@ * Macro definitions for routines to manipulate the * floating-point processor. */ -#include #include #include #include #include -#include -extern int fp_kind; +typedef enum { + FXSAVE32 = 1, + FXSAVE64 = 2, + XSAVE32 = 3, + XSAVE64 = 4, + FP_UNUSED = 5 + } fp_save_layout_t; + +typedef enum { + UNDEFINED, + FP, + AVX, +#if !defined(RC_HIDE_XNU_J137) + AVX512 +#endif +} xstate_t; extern void init_fpu(void); extern void fpu_module_init(void); extern void fpu_free( - void * fps); + thread_t thr_act, + void *fps); extern kern_return_t fpu_set_fxstate( thread_t thr_act, thread_state_t state, @@ -91,12 +105,17 @@ extern void fpexterrflt(void); extern void fpSSEexterrflt(void); extern void fpflush(thread_t); extern void fp_setvalid(boolean_t); -#ifdef __i386__ -extern void fxsave64(struct x86_fx_thread_state *); -extern void fxrstor64(struct x86_fx_thread_state *); -#endif -extern void clear_fpu(void); -extern void fpu_save_context(thread_t thread); +extern void clear_fpu(void); +extern void fpu_switch_context( + thread_t old, + thread_t new); +extern void fpu_switch_addrmode( + thread_t thread, + boolean_t is_64bit); + +extern xstate_t fpu_default; +extern xstate_t current_xstate(void); +extern void fpUDflt(user_addr_t rip); #endif /* _I386_FPU_H_ */