X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-darwin-os.h;h=f3b7311f7627a1d768e3400b72bc31506b0a4b10;hb=bf40ae88bc289fd765a33861cc4bc0853ed483ba;hp=4ad51e35e75f9c5c1d53843e10a5f48a4e59073b;hpb=18a22e950b490011aac1ecce4b5d8a86d333fd00;p=sbcl.git diff --git a/src/runtime/x86-darwin-os.h b/src/runtime/x86-darwin-os.h index 4ad51e3..f3b7311 100644 --- a/src/runtime/x86-darwin-os.h +++ b/src/runtime/x86-darwin-os.h @@ -16,14 +16,11 @@ static inline os_context_t *arch_os_get_context(void **void_context) void set_data_desc_size(data_desc_t* desc, unsigned long size); void set_data_desc_addr(data_desc_t* desc, void* addr); -#define DARWIN_FIX_CONTEXT(context) - -/* As of XCode 3.0, the field names for the thread state have changed - * and now are prepended with __. Use some #define hackery to deal - * with this. MAC_OS_X_VERSION_10_5 seems to be a good test to see if - * we need the new style field names. +/* On OS X 10.5, the field names for the thread state have changed and + * now are prepended with __. Use some #define hackery to deal with + * this. */ -#if MAC_OS_X_VERSION_10_5 +#if __DARWIN_UNIX03 #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->__ss.__##stem #define EIP __eip @@ -43,6 +40,8 @@ void set_data_desc_addr(data_desc_t* desc, void* addr); #define SS __ss #define GS __gs +#define FPU_FCW __fpu_fcw + #else #define CONTEXT_ADDR_FROM_STEM(stem) &context->uc_mcontext->ss.stem @@ -63,8 +62,11 @@ void set_data_desc_addr(data_desc_t* desc, void* addr); #define SS ss #define GS gs -#endif /* MAC_OS_X_VERSION_10_5 */ +#define FPU_FCW fpu_fcw +#endif /* __DARWIN_UNIX03 */ +#define RESTORE_FP_CONTROL_FROM_CONTEXT +void os_restore_fp_control(os_context_t *context); #endif /* _X86_DARWIN_OS_H */