[Git][cmucl/cmucl][issue-425-correctly-rounded-math-functions] Remove the x87 precision stuff from call-out
Raymond Toy pushed to branch issue-425-correctly-rounded-math-functions at cmucl / cmucl Commits: 10c5d82f by Raymond Toy at 2026-01-28T09:19:54-08:00 Remove the x87 precision stuff from call-out It's not needed anymore because of a previous bug where the x87 precision was erroneously set to single. That error has been fixed. All tests pass still. - - - - - 1 changed file: - src/compiler/x86/sse2-c-call.lisp Changes: ===================================== src/compiler/x86/sse2-c-call.lisp ===================================== @@ -36,33 +36,12 @@ :from :eval :to :result) edx) (:temporary (:sc single-stack) temp-single) (:temporary (:sc double-stack) temp-double) - #+core-math - (:temporary (:sc unsigned-stack) save-fpu-cw) - #+core-math - (:temporary (:sc unsigned-stack) fpu-cw) - #+core-math - (:temporary (:sc unsigned-reg :offset esi-offset) temp-cw) (:node-var node) (:vop-var vop) (:save-p t) (:ignore args ecx edx) (:guard (backend-featurep :sse2)) (:generator 0 - #+core-math - (progn - ;; Save the x87 FPU control word. Then modify it to set the - ;; precision bits to 3 for 64-bit mantissas for 80-bit - ;; arithmetic. If we don't some of some special functions - ;; return incorrect values because the x87 precision was set to - ;; single. - (inst fnstcw save-fpu-cw) - (move temp-cw save-fpu-cw) - (inst and temp-cw (dpb 0 (byte 2 8) #xffff)) ; Zap the precision control bits - (inst or temp-cw (dpb 3 (byte 3 8) 0)) ; Set precision control bits - (move fpu-cw temp-cw) - (inst fldcw fpu-cw) ; New CW - ) - (cond ((policy node (> space speed)) (move eax function) (inst call (make-fixup (extern-alien-name "call_into_c") :foreign))) @@ -84,10 +63,7 @@ (inst movss xmm0-tn (ea-for-sf-stack temp-single))) (double-reg (inst fstpd (ea-for-df-stack temp-double)) - (inst movsd xmm0-tn (ea-for-df-stack temp-double))))) - ;; Restore the x87 FPU control settings - #+core-math - (inst fldcw save-fpu-cw))) + (inst movsd xmm0-tn (ea-for-df-stack temp-double))))))) (define-vop (alloc-number-stack-space) (:info amount) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/10c5d82f9f3ac80939604f44... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/10c5d82f9f3ac80939604f44... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)