From 7ef819044d3e213ac523fbf601d9ff0073aafa36 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 3 Jun 1988 14:51:51 +0000 Subject: [PATCH] (add-pseudo-register-alias) Delete the alias from the register map first. This prevents the map from having two entries for the same alias, one of which is incorrect. --- v7/src/compiler/back/regmap.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/v7/src/compiler/back/regmap.scm b/v7/src/compiler/back/regmap.scm index c3cb8802e..d179eccd0 100644 --- a/v7/src/compiler/back/regmap.scm +++ b/v7/src/compiler/back/regmap.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/regmap.scm,v 4.2 1988/03/14 20:45:30 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/regmap.scm,v 4.3 1988/06/03 14:51:51 cph Exp $ Copyright (c) 1987 Massachusetts Institute of Technology @@ -340,10 +340,11 @@ REGISTER-RENUMBERs are equal. instructions)))) (define (add-pseudo-register-alias map register alias saved-into-home?) - (let ((entry (map-entries:find-home map register))) - (if entry - (register-map:add-alias map entry alias) - (register-map:add-home map register alias saved-into-home?)))) + (let ((map (delete-machine-register map alias))) + (let ((entry (map-entries:find-home map register))) + (if entry + (register-map:add-alias map entry alias) + (register-map:add-home map register alias saved-into-home?))))) (define (machine-register-contents map register) (let ((entry (map-entries:find-alias map register))) -- 2.25.1