From 185188f907ed1cbd99f9a766d65f00f6c43a7935 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Sat, 20 Oct 1990 16:26:02 +0000
Subject: [PATCH] Fixed return-multiple to compute the new stack pointer
 correctly, and deleted the load of a0 because the vop loads a0 for us.

---
 assembly/mips/assem-rtns.lisp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/assembly/mips/assem-rtns.lisp b/assembly/mips/assem-rtns.lisp
index 831eda116..7215a26a8 100644
--- a/assembly/mips/assem-rtns.lisp
+++ b/assembly/mips/assem-rtns.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman (FAHLMAN@CMUC). 
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/assem-rtns.lisp,v 1.24 1990/10/19 15:31:18 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/mips/assem-rtns.lisp,v 1.25 1990/10/20 16:26:02 wlott Exp $
 ;;;
 ;;;
 (in-package "C")
@@ -40,8 +40,10 @@
      (:temp a4 descriptor-reg a4-offset)
      (:temp a5 descriptor-reg a5-offset))
 
+  ;; Note, because of the way the return-multiple vop is written, we can
+  ;; assume that we are never called with nvals == 1 and that a0 has already
+  ;; been loaded.
   (inst blez nvals default-a0-and-on)
-  (inst lw a0 vals (* 0 vm:word-bytes))
   (inst subu count nvals (fixnum 2))
   (inst blez count default-a2-and-on)
   (inst lw a1 vals (* 1 vm:word-bytes))
@@ -89,7 +91,7 @@
   ;; Clear the stack.
   (move old-fp-tn fp-tn)
   (move fp-tn old-fp)
-  (inst addu csp-tn fp-tn nvals)
+  (inst addu csp-tn old-fp-tn nvals)
   
   ;; Return.
   (lisp-return lra lip))
-- 
GitLab