From: Taylor R Campbell <campbell@mumble.net>
Date: Sun, 30 Dec 2018 23:33:21 +0000 (+0000)
Subject: Use 32-bit xor rather than 64-bit xor for zeroing.
X-Git-Tag: mit-scheme-pucked-10.1.9~3^2~44
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1ed07ba10c48f2754a97e15502c717bf5d9e7a59;p=mit-scheme.git

Use 32-bit xor rather than 64-bit xor for zeroing.
---

diff --git a/src/compiler/machines/x86-64/lapgen.scm b/src/compiler/machines/x86-64/lapgen.scm
index 50312549c..0ca2495c2 100644
--- a/src/compiler/machines/x86-64/lapgen.scm
+++ b/src/compiler/machines/x86-64/lapgen.scm
@@ -290,7 +290,9 @@ USA.
 
 (define (load-signed-immediate target value)
   (cond ((zero? value)
-	 (LAP (XOR Q ,target ,target)))
+	 ;; This zeros the upper half of the target, and is a shorter
+	 ;; instruction than (XOR Q ...).
+	 (LAP (XOR L ,target ,target)))
 	((fits-in-signed-quad? value)
 	 (LAP (MOV Q ,target (& ,value))))
 	(else
@@ -298,7 +300,9 @@ USA.
 
 (define (load-unsigned-immediate target value)
   (cond ((zero? value)
-	 (LAP (XOR Q ,target ,target)))
+	 ;; This zeros the upper half of the target, and is a shorter
+	 ;; instruction than (XOR Q ...).
+	 (LAP (XOR L ,target ,target)))
 	((fits-in-unsigned-quad? value)
 	 (LAP (MOV Q ,target (&U ,value))))
 	(else