From 76e565dbd6c0f87d4b236448af8bf0643e330284 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 11 Jan 2016 19:50:26 +0300 Subject: [PATCH] Inherit thread FP masks on darwin. As is already done on win32. --- src/code/target-thread.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 1d3ffab4b..d049c5c66 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -1556,16 +1556,15 @@ See also: RETURN-FROM-THREAD, ABORT-THREAD." (let* ((setup-sem (make-semaphore :name "Thread setup semaphore")) (real-function (coerce function 'function)) (arguments (ensure-list arguments)) - #!+win32 + #!+(or win32 darwin) (fp-modes (dpb 0 sb!vm::float-sticky-bits ;; clear accrued bits (sb!vm:floating-point-modes))) ;; Allocate in the parent (thread-list (list thread thread))) (declare (dynamic-extent setup-sem)) (dx-flet ((initial-thread-function () - ;; Win32 doesn't inherit parent thread's FP modes, - ;; while it seems to happen everywhere else - #!+win32 + ;; Inherit parent thread's FP modes + #!+(or win32 darwin) (setf (sb!vm:floating-point-modes) fp-modes) ;; As it is, this lambda must not cons until we are ;; ready to run GC. Be very careful. -- 2.11.4.GIT