From a4a6adfc5b550abb935008257644d056631020d9 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Sat, 26 May 1990 22:48:08 +0000
Subject: [PATCH] copy-more-arg didn't make sure that there were enough args to
 cover the fixed args.  If there weren't, it would calc the difference as
 being negative, and *shorten* the stack, instead of growing it.

---
 compiler/mips/call.lisp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/mips/call.lisp b/compiler/mips/call.lisp
index 72fc77be5..de915aa11 100644
--- a/compiler/mips/call.lisp
+++ b/compiler/mips/call.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman (FAHLMAN@CMUC). 
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.12 1990/05/25 12:25:27 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.13 1990/05/26 22:48:08 wlott Exp $
 ;;;
 ;;;    This file contains the VM definition of function call for the MIPS.
 ;;;
@@ -1002,9 +1002,13 @@ default-value-5
 	(move result csp-tn))
       ;; Allocate the space on the stack.
       (cond ((zerop fixed)
-	     (inst addu csp-tn csp-tn nargs-tn))
+	     (inst addu csp-tn csp-tn nargs-tn)
+	     (inst beq nargs-tn done)
+	     (inst nop))
 	    (t
 	     (inst addu count nargs-tn (fixnum (- fixed)))
+	     (inst blez count done)
+	     (inst nop)
 	     (inst addu csp-tn csp-tn count)))
       (when (< fixed register-arg-count)
 	;; We must stop when we run out of stack args, not when we run out of
-- 
GitLab