Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 952c3759 by Raymond Toy at 2021-01-03T15:33:35-08:00 Fix #90: Remove unused FP static symbols on x86
We no longer support x87, so the static symbols for the long float constants aren't used anymore. And we don't use `*fp-constant-1d0*` anywhere, so we can remove the constants for 1f0 and 1d0.
- - - - - 852e455b by Raymond Toy at 2021-01-04T09:18:59-08:00 Rename *fp-constant-0s0* to *fp-constant-0f0*
Besides the obvious, we need to update genesis to fill in the slot with the correct value.
- - - - - 18a3be34 by Raymond Toy at 2021-01-04T17:41:32+00:00 Merge branch 'issue-90-remove-unused-static-float-syms' into 'master'
Fix #90: Remove unused FP static symbols on x86
Closes #90
See merge request cmucl/cmucl!60 - - - - -
4 changed files:
- src/code/x86-vm.lisp - src/compiler/generic/new-genesis.lisp - src/compiler/x86/float-sse2.lisp - src/compiler/x86/parms.lisp
Changes:
===================================== src/code/x86-vm.lisp ===================================== @@ -430,18 +430,8 @@ ;;; cases. Note these are initialise by genesis as they are needed ;;; early. ;;; -(defvar *fp-constant-0s0*) -(defvar *fp-constant-1s0*) +(defvar *fp-constant-0f0*) (defvar *fp-constant-0d0*) -(defvar *fp-constant-1d0*) -;;; The long-float constants. -(defvar *fp-constant-0l0*) -(defvar *fp-constant-1l0*) -(defvar *fp-constant-pi*) -(defvar *fp-constant-l2t*) -(defvar *fp-constant-l2e*) -(defvar *fp-constant-lg2*) -(defvar *fp-constant-ln2*)
;;; The current alien stack pointer; saved/restored for non-local ;;; exits.
===================================== src/compiler/generic/new-genesis.lisp ===================================== @@ -914,22 +914,8 @@ (macrolet ((frob (name pkg value) `(cold-setq (cold-intern (intern ,name ,pkg)) ,value))) (frob "*FP-CONSTANT-0D0*" "X86" (number-to-core 0d0)) - (frob "*FP-CONSTANT-1D0*" "X86" (number-to-core 1d0)) - (frob "*FP-CONSTANT-0S0*" "X86" (number-to-core 0s0)) - (frob "*FP-CONSTANT-1S0*" "X86" (number-to-core 1s0)) - #+long-float - (when (c:backend-featurep :long-float) - (frob "*FP-CONSTANT-0L0*" "X86" (number-to-core 0l0)) - (frob "*FP-CONSTANT-1L0*" "X86" (number-to-core 1l0)) - (frob "*FP-CONSTANT-PI*" "X86" (number-to-core pi)) - (frob "*FP-CONSTANT-L2T*" "X86" (number-to-core (log 10l0 2l0))) - (frob "*FP-CONSTANT-L2E*" "X86" - (number-to-core - (log 2.718281828459045235360287471352662L0 2l0))) - (frob "*FP-CONSTANT-LG2*" "X86" (number-to-core (log 2l0 10l0))) - (frob "*FP-CONSTANT-LN2*" "X86" - (number-to-core - (log 2l0 2.718281828459045235360287471352662L0)))) + (frob "*FP-CONSTANT-0F0*" "X86" (number-to-core 0f0)) + (when (c:backend-featurep :gencgc) (frob "*SCAVENGE-READ-ONLY-SPACE*" "X86" (cold-intern nil)))))
===================================== src/compiler/x86/float-sse2.lisp ===================================== @@ -449,7 +449,7 @@ (:results (y :scs (descriptor-reg))) (:generator 2 (ecase (c::constant-value (c::tn-leaf x)) - (0f0 (load-symbol-value y *fp-constant-0s0*)) + (0f0 (load-symbol-value y *fp-constant-0f0*)) #+nil (1f0 (load-symbol-value y *fp-constant-1s0*)) (0d0 (load-symbol-value y *fp-constant-0d0*))
===================================== src/compiler/x86/parms.lisp ===================================== @@ -351,17 +351,7 @@
;; The FP constants *fp-constant-0d0* - *fp-constant-1d0* - *fp-constant-0s0* - *fp-constant-1s0* - ;; Following are all long-floats. - *fp-constant-0l0* - *fp-constant-1l0* - *fp-constant-pi* - *fp-constant-l2t* - *fp-constant-l2e* - *fp-constant-lg2* - *fp-constant-ln2* + *fp-constant-0f0*
;; Multi-process support. *control-stacks*
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/e7916afe7c6ab7ef60abd48...