master: De-obfuscate a loop

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  69ad1e7908467dc303edce6b0ccfe58b73526b42 (commit)
      from  5a5ce63459a20a66cbc528bcc2295282fee331a6 (commit)

- Log -----------------------------------------------------------------
commit 69ad1e7908467dc303edce6b0ccfe58b73526b42
Author: Douglas Katzman <[email protected]>
Date:   Sun Aug 30 00:47:13 2026 -0400

    De-obfuscate a loop
    
    It avoided emitting a load of NIL more than once, but not relevant now.
---
 src/compiler/x86-64/call.lisp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/compiler/x86-64/call.lisp b/src/compiler/x86-64/call.lisp
index 06a08144c..997d21f74 100644
--- a/src/compiler/x86-64/call.lisp
+++ b/src/compiler/x86-64/call.lisp
@@ -1040,11 +1040,8 @@
         (inst mov rcx (fixnumize nvals)))
     ;; Pre-default any argument register that need it.
     (when (< nvals register-arg-count)
-      (let* ((arg-tns (nthcdr nvals (list a0 a1 a2)))
-             (first (first arg-tns)))
-        (inst mov first null-tn)
-        (dolist (tn (cdr arg-tns))
-          (inst mov tn first))))
+      (dolist (tn (nthcdr nvals (list a0 a1 a2)))
+        (move tn null-tn)))
     ;; Set the multiple value return flag.
     (inst stc)
     ;; And away we go. Except that return-pc is still on the

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.