0.9.13.39:
authorJuho Snellman <jsnell@iki.fi>
Sat, 10 Jun 2006 00:26:14 +0000 (00:26 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sat, 10 Jun 2006 00:26:14 +0000 (00:26 +0000)
Fix FP exception handling on FreeBSD (patch by NIIMI Satoshi
on sbcl-devel)

NEWS
src/runtime/x86-bsd-os.c
src/runtime/x86-bsd-os.h
version.lisp-expr

diff --git a/NEWS b/NEWS
index b8a4906..758d07f 100644 (file)
--- 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
index 490c7cf..647eb52 100644 (file)
@@ -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
index e550f33..d03b8aa 100644 (file)
@@ -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 */
index 74edef4..1992f44 100644 (file)
@@ -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"