From: Juho Snellman Date: Sat, 10 Jun 2006 00:26:14 +0000 (+0000) Subject: 0.9.13.39: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=000e9e0b51a505e1e9079891d53317a9b8d8e807;p=sbcl.git 0.9.13.39: Fix FP exception handling on FreeBSD (patch by NIIMI Satoshi on sbcl-devel) --- diff --git a/NEWS b/NEWS index b8a4906..758d07f 100644 --- a/NEWS +++ b/NEWS @@ -34,13 +34,16 @@ changes in sbcl-0.9.14 relative to sbcl-0.9.13: * bug fix: NAME-CHAR on an invalid symbol no longer signals an error (patch by Robert J. Macomber) * feature: TIME now displays the amount of run-time spent in GC - * fixed some bugs revealed by Paul Dietz' test suite: - ** MISC.641: LET-conversion were not supposed to work in late - compilation stages. * bug fix: The debugger now does a better job of respecting (PUSH '(*PRINT-CIRCLE* . T) SB-DEBUG:*DEBUG-PRINT-VARIABLE-ALIST*) when printing SB-DEBUG:*DEBUG-CONDITION*. (This is a debugger-only workaround for bug 403.) + * bug fix: floating point exception handling now works on FreeBSD + (thanks to NIIMI Satoshi) + * fixed some bugs revealed by Paul Dietz' test suite: + ** MISC.641: LET-conversion were not supposed to work in late + compilation stages. + changes in sbcl-0.9.13 relative to sbcl-0.9.12: * new feature: source path information is generated for macro-expansion diff --git a/src/runtime/x86-bsd-os.c b/src/runtime/x86-bsd-os.c index 490c7cf..647eb52 100644 --- a/src/runtime/x86-bsd-os.c +++ b/src/runtime/x86-bsd-os.c @@ -194,7 +194,12 @@ int arch_os_thread_cleanup(struct thread *thread) { void os_restore_fp_control(os_context_t *context) { + /* FPU state is saved per context on post-KSE systems. + * On earlier systems, it is shared in a whole process. + */ +#if defined(__FreeBSD_version) && __FreeBSD_version >= 500040 struct envxmm *ex = (struct envxmm*)(&context->uc_mcontext.mc_fpstate); asm ("fldcw %0" : : "m" (ex->en_cw)); +#endif } #endif diff --git a/src/runtime/x86-bsd-os.h b/src/runtime/x86-bsd-os.h index e550f33..d03b8aa 100644 --- a/src/runtime/x86-bsd-os.h +++ b/src/runtime/x86-bsd-os.h @@ -19,14 +19,9 @@ static inline os_context_t *arch_os_get_context(void **void_context) { #error unsupported BSD variant #endif -#if defined(LISP_FEATURE_SB_THREAD) - #if defined LISP_FEATURE_FREEBSD -/* FIXME: why is this only done for SB-THREAD? */ #define RESTORE_FP_CONTROL_FROM_CONTEXT void os_restore_fp_control(os_context_t *context); #endif -#endif - #endif /* _X86_BSD_OS_H */ diff --git a/version.lisp-expr b/version.lisp-expr index 74edef4..1992f44 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.13.38" +"0.9.13.39"