From 742d9767b4f0824de42730171e9a14bb5e547566 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Wed, 9 May 1990 06:31:59 +0000
Subject: [PATCH] Rob added code to keep it from spilling the NFP.

---
 compiler/pack.lisp | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/compiler/pack.lisp b/compiler/pack.lisp
index 3c271d57b..48de5e7fc 100644
--- a/compiler/pack.lisp
+++ b/compiler/pack.lisp
@@ -811,6 +811,11 @@
 ;;; the TN in that location.  There must be some TN live in every location,
 ;;; since normal load TN packing failed.
 ;;;
+;;; We never spill component TNs, since there are used magically within VOPs.
+;;;
+;;; ### Somewhat dubious to spill environment TNs, but we would get in
+;;; ### trouble if we never did.
+;;;
 ;;;     Spilling is done using the same mechanism as register saving.
 ;;;
 (defun spill-and-pack-load-tn (sc op)
@@ -818,7 +823,7 @@
   (let ((vop (tn-ref-vop op))
 	(sb (sc-sb sc)))
     (event spill-tn (vop-node vop))
-
+    
     (dolist (loc (sc-locations sc)
 		 (failed-to-pack-load-tn-error op))
       (when (do ((ref (vop-refs vop) (tn-ref-next-ref ref)))
@@ -834,13 +839,14 @@
 		  (return nil))))
 	(let ((victim (svref (finite-sb-live-tns sb) loc)))
 	  (assert victim)
-	  (save-complex-writer-tn victim vop)
-	  (when (eq (template-result-types (vop-info vop)) :conditional)
-	    (spill-conditional-arg-tn victim vop)))
-	
-	(let ((res (make-tn 0 :load nil sc)))
-	  (setf (tn-offset res) loc)
-	  (return res))))))
+	  (unless (eq (tn-kind victim) :component)
+	    (save-complex-writer-tn victim vop)
+	    (when (eq (template-result-types (vop-info vop)) :conditional)
+	      (spill-conditional-arg-tn victim vop))
+	    
+	    (let ((res (make-tn 0 :load nil sc)))
+	      (setf (tn-offset res) loc)
+	      (return res))))))))
 
 
 ;;; Pack-Load-TN  --  Internal
-- 
GitLab