master: Remove #+#. from x86-64 files
snuglas via Sbcl-commits <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via f5e063c351a102bda16b9d8d250bec26af00f05f (commit)
from a3dbf9924e56ca70d023f9db3b335b0ef4d251f3 (commit)
- Log -----------------------------------------------------------------
commit f5e063c351a102bda16b9d8d250bec26af00f05f
Author: Douglas Katzman <[email protected]>
Date: Wed Aug 19 13:43:34 2026 -0400
Remove #+#. from x86-64 files
We can safely assume n-fixnum-tag-bits = 1. Revision a369686d which gave 1 more
bit of precision theorized that a build-time choice could be made within a
particular backend. While that was true for a while after the commit, x86-64
is now so ingrained with the belief that fixnums are 63 bits that it can't
reasonably be changed. While we should prefer the symbolic constant in lieu
of a literal 1, that style does not imply that littering up the source with
illegible "#+#.(cl:if)" around vops that can't be enabled is sound practice.
---
src/assembly/x86-64/assem-rtns.lisp | 1 -
src/compiler/x86-64/call.lisp | 3 ---
src/compiler/x86-64/move.lisp | 22 ----------------------
src/compiler/x86-64/type-vops.lisp | 17 -----------------
src/compiler/x86-64/values.lisp | 1 -
5 files changed, 44 deletions(-)
diff --git a/src/assembly/x86-64/assem-rtns.lisp b/src/assembly/x86-64/assem-rtns.lisp
index f1d24d7c8..abcf39a4b 100644
--- a/src/assembly/x86-64/assem-rtns.lisp
+++ b/src/assembly/x86-64/assem-rtns.lisp
@@ -130,7 +130,6 @@
;; Calculate NARGS (as a fixnum)
(move nargs rsi)
(inst sub nargs rsp-tn)
- #-#.(cl:if (cl:= sb-vm:word-shift sb-vm:n-fixnum-tag-bits) '(and) '(or))
(inst shr nargs (- word-shift n-fixnum-tag-bits))
;; Check for all the args fitting the registers.
diff --git a/src/compiler/x86-64/call.lisp b/src/compiler/x86-64/call.lisp
index 4f10b3b43..06a08144c 100644
--- a/src/compiler/x86-64/call.lisp
+++ b/src/compiler/x86-64/call.lisp
@@ -487,9 +487,6 @@
register-arg-count)
(inst cmp :dword nargs (fixnumize register-arg-count))
(inst jmp :g stack-values)
- #+#.(cl:if (cl:= sb-vm:word-shift sb-vm:n-fixnum-tag-bits) '(and) '(or))
- (inst sub rsp-tn nargs)
- #-#.(cl:if (cl:= sb-vm:word-shift sb-vm:n-fixnum-tag-bits) '(and) '(or))
(let ((sub nargs))
(unless unused-count-p
(inst mov :dword (setf sub rax-tn) nargs))
diff --git a/src/compiler/x86-64/move.lisp b/src/compiler/x86-64/move.lisp
index f8cb9f657..7fc41974e 100644
--- a/src/compiler/x86-64/move.lisp
+++ b/src/compiler/x86-64/move.lisp
@@ -203,28 +203,6 @@
;;; Arg is a fixnum or bignum, figure out which and load if necessary.
-#-#.(cl:if (cl:= sb-vm:n-fixnum-tag-bits 1) '(:and) '(:or))
-(define-vop (move-to-word/integer)
- (:args (x :scs (descriptor-reg) :target rax))
- (:results (y :scs (signed-reg unsigned-reg)))
- (:note "integer to untagged word coercion")
- ;; I'm not convinced that increasing the demand for rAX is
- ;; better than adding 1 byte to some instruction encodings.
- ;; I'll leave it alone though.
- (:temporary (:sc unsigned-reg :offset rax-offset
- :from (:argument 0) :to (:result 0) :target y) rax)
- (:generator 4
- (move rax x)
- (inst test :byte rax fixnum-tag-mask)
- (inst jmp :z FIXNUM)
- (loadw y rax bignum-digits-offset other-pointer-lowtag)
- (inst jmp DONE)
- FIXNUM
- (inst sar rax n-fixnum-tag-bits)
- (move y rax)
- DONE))
-
-#+#.(cl:if (cl:= sb-vm:n-fixnum-tag-bits 1) '(:and) '(:or))
(define-vop (move-to-word/integer)
(:args (x :scs (descriptor-reg) :target y))
(:results (y :scs (signed-reg unsigned-reg)))
diff --git a/src/compiler/x86-64/type-vops.lisp b/src/compiler/x86-64/type-vops.lisp
index 0005e9528..b747823d3 100644
--- a/src/compiler/x86-64/type-vops.lisp
+++ b/src/compiler/x86-64/type-vops.lisp
@@ -306,23 +306,6 @@
(move tmp value)
(inst shr tmp n-positive-fixnum-bits)))
-#-#.(cl:if (cl:= sb-vm:n-fixnum-tag-bits 1) '(:and) '(:or))
-(define-vop (fixnump/signed-byte-64 simple-type-predicate)
- (:args (value :scs (signed-reg)))
- (:conditional :z)
- (:temporary (:sc unsigned-reg) temp)
- (:arg-types signed-num)
- (:translate fixnump)
- (:generator 3
- ;; Hackers Delight, p. 53: signed
- ;; a <= x <= a + 2^n - 1
- ;; is equivalent to unsigned
- ;; ((x-a) >> n) = 0
- (inst mov temp #.(- most-negative-fixnum))
- (inst add temp value)
- (inst shr temp n-fixnum-bits)))
-
-#+#.(cl:if (cl:= sb-vm:n-fixnum-tag-bits 1) '(:and) '(:or))
(define-vop (fixnump/signed-byte-64 simple-type-predicate)
(:args (value :scs (signed-reg) :target temp))
(:conditional :no)
diff --git a/src/compiler/x86-64/values.lisp b/src/compiler/x86-64/values.lisp
index f8a741b95..571a32ef1 100644
--- a/src/compiler/x86-64/values.lisp
+++ b/src/compiler/x86-64/values.lisp
@@ -119,7 +119,6 @@
(unless (eq (tn-kind count) :unused)
(inst mov count start) ; start is high address
(inst sub count rsp-tn) ; stackp is low address
- #-#.(cl:if (cl:= sb-vm:word-shift sb-vm:n-fixnum-tag-bits) '(and) '(or))
(inst shr count (- word-shift n-fixnum-tag-bits)))))
;;; Copy the more arg block to the top of the stack so we can use them
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL