Skip to content
Snippets Groups Projects
Commit d8421b5c authored by wlott's avatar wlott
Browse files

Fixed a lifetime problem with nvals != 1 return.

Don't load the old-fp if it is on the stack, 'cause we can just load it
into the passing location.
parent c2c09c0c
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC). ;;; Scott Fahlman (FAHLMAN@CMUC).
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.6 1990/05/09 06:39:00 wlott Exp $ ;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.7 1990/05/10 04:40:58 wlott Exp $
;;; ;;;
;;; This file contains the VM definition of function call for the MIPS. ;;; This file contains the VM definition of function call for the MIPS.
;;; ;;;
...@@ -797,8 +797,8 @@ default-value-5 ...@@ -797,8 +797,8 @@ default-value-5
(expand (expand
`(define-vop (return) `(define-vop (return)
(:args (:args
(old-fp :scs (descriptor-reg any-reg)) (old-fp :scs (any-reg) :load-if (not (sc-is old-fp control-stack)))
(return-pc :scs (descriptor-reg)) (return-pc :scs (descriptor-reg) :to (:eval 1))
(values :more t)) (values :more t))
(:ignore values) (:ignore values)
(:info nvals) (:info nvals)
...@@ -807,8 +807,8 @@ default-value-5 ...@@ -807,8 +807,8 @@ default-value-5
:from (:eval 0) :to (:eval 1)) :from (:eval 0) :to (:eval 1))
,name)) ,name))
register-arg-names register-arg-offsets) register-arg-names register-arg-offsets)
(:temporary (:sc descriptor-reg :offset nargs-offset) nargs) (:temporary (:sc any-reg :offset nargs-offset) nargs)
(:temporary (:sc descriptor-reg :offset old-fp-offset) val-ptr) (:temporary (:sc any-reg :offset old-fp-offset) val-ptr)
(:temporary (:scs (interior-reg) :type interior) lip) (:temporary (:scs (interior-reg) :type interior) lip)
(:vop-var vop) (:vop-var vop)
(:generator 6 (:generator 6
...@@ -817,7 +817,11 @@ default-value-5 ...@@ -817,7 +817,11 @@ default-value-5
(let ((cur-nfp (current-nfp-tn vop))) (let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp (when cur-nfp
(move nsp-tn cur-nfp))) (move nsp-tn cur-nfp)))
(move fp-tn old-fp) (sc-case old-fp
(any-reg
(move fp-tn old-fp))
(control-stack
(load-stack-tn fp-tn old-fp)))
(inst addu lip return-pc (- (* 3 word-bytes) other-pointer-type)) (inst addu lip return-pc (- (* 3 word-bytes) other-pointer-type))
(inst j lip) (inst j lip)
(move code-tn return-pc)) (move code-tn return-pc))
...@@ -825,7 +829,11 @@ default-value-5 ...@@ -825,7 +829,11 @@ default-value-5
(inst li nargs (fixnum nvals)) (inst li nargs (fixnum nvals))
(move val-ptr fp-tn) (move val-ptr fp-tn)
(inst addu csp-tn val-ptr (* nvals word-bytes)) (inst addu csp-tn val-ptr (* nvals word-bytes))
(move fp-tn old-fp) (sc-case old-fp
(any-reg
(move fp-tn old-fp))
(control-stack
(load-stack-tn fp-tn old-fp)))
(let ((cur-nfp (current-nfp-tn vop))) (let ((cur-nfp (current-nfp-tn vop)))
(when cur-nfp (when cur-nfp
(move nsp-tn cur-nfp))) (move nsp-tn cur-nfp)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment