From 230f89fec705495fab7a857d64da777ce106610a Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Fri, 4 Oct 1991 12:05:58 +0000
Subject: [PATCH] Fixed COMPUTE-OLD-NFP and ALLOCATE-FRAME to not store the NFP
 result if it wasn't computed (possible source of GC lossage.)

---
 compiler/rt/call.lisp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/rt/call.lisp b/compiler/rt/call.lisp
index 301e38ad7..349d1a9d4 100644
--- a/compiler/rt/call.lisp
+++ b/compiler/rt/call.lisp
@@ -163,7 +163,8 @@
 ;;; on the nstack.
 ;;;
 (define-vop (compute-old-nfp)
-  (:results (val :scs (word-pointer-reg)))
+  (:results (val :scs (word-pointer-reg)
+		 :load-if (current-nfp-tn vop)))
   (:vop-var vop)
   (:generator 1
     (let ((nfp (current-nfp-tn vop)))
@@ -214,7 +215,8 @@
 ;;;
 (define-vop (allocate-frame)
   (:results (res :scs (word-pointer-reg))
-	    (nfp :scs (word-pointer-reg)))
+	    (nfp :scs (word-pointer-reg)
+		 :load-if (ir2-environment-number-stack-p callee)))
   (:info callee)
   (:generator 2
     (move res csp-tn)
@@ -529,7 +531,6 @@ default-value-5
       (when cur-nfp
 	(load-stack-tn cur-nfp nfp-save)))))
 
-
 
 ;;;; Local call with known values return:
 
-- 
GitLab