From 5f303a08745948e85b7eea33a1c2937bc70300fd Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Wed, 19 Jun 1991 16:39:21 +0000 Subject: [PATCH] Fixed a problem in EMIT-ARG-MOVES. If we do a coercion + move-arg, then the coercion would be inserted after the ALLOCATE-FRAME VOP, which caused register save computation to get confused. --- compiler/represent.lisp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/compiler/represent.lisp b/compiler/represent.lisp index 49250fb85..ecac6e48b 100644 --- a/compiler/represent.lisp +++ b/compiler/represent.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/represent.lisp,v 1.26 1991/05/03 12:55:18 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/represent.lisp,v 1.27 1991/06/19 16:39:21 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -514,7 +514,10 @@ ;;; ;;; Iterate over the more operands to a call VOP, emitting move-arg VOPs and ;;; any necessary coercions. We determine which FP to use by looking at the -;;; MOVE-ARGS annotation. +;;; MOVE-ARGS annotation. If the vop is a :LOCAL-CALL, we insert any needed +;;; coercions before the ALLOCATE-FRAME so that lifetime analysis doesn't get +;;; confused (since otherwise, only passing locations are written between A-F +;;; and call.) ;;; (defun emit-arg-moves (vop) (let* ((info (vop-info vop)) @@ -562,12 +565,18 @@ (assert (not (sc-number-stack-p (tn-sc nfp-tn)))) nfp-tn))) (new (emit-move-arg-template node block res val-tn this-fp - pass-tn vop))) + pass-tn vop)) + (after + (cond ((eq how :local-call) + (assert (eq (vop-info-name (vop-info prev)) + 'allocate-frame)) + prev) + (prev (vop-next prev)) + (t + (ir2-block-start-vop block))))) (coerce-some-operands (vop-args new) pass-tn (vop-info-arg-load-scs res) - (if prev - (vop-next prev) - (ir2-block-start-vop block))))))) + after))))) (undefined-value)) -- GitLab