From 4bbe1490f24ed6f3b42214d0c7c81cfdedb7388c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 3 Mar 1992 21:33:34 +0000 Subject: [PATCH] Don't generate rules with (MACHINE-CONSTANT 0) as a RHS; use (REGISTER 0) instead. --- v7/src/compiler/machines/mips/rulrew.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/v7/src/compiler/machines/mips/rulrew.scm b/v7/src/compiler/machines/mips/rulrew.scm index f9efb3227..8cfeed5c9 100644 --- a/v7/src/compiler/machines/mips/rulrew.scm +++ b/v7/src/compiler/machines/mips/rulrew.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/mips/rulrew.scm,v 1.2 1991/10/25 00:13:43 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/mips/rulrew.scm,v 1.3 1992/03/03 21:33:34 cph Exp $ -Copyright (c) 1990-91 Massachusetts Institute of Technology +Copyright (c) 1990-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -99,8 +99,6 @@ MIT in each case. |# (and (rtl:constant? expression) (non-pointer-object? (rtl:constant-value expression)))) -;; I've modified these rules from the MC68020. -- Jinx - ;;; These rules are losers because there's no abstract way to cons a ;;; statement or a predicate without also getting some CFG structure. @@ -108,19 +106,19 @@ MIT in each case. |# ;; Use register 0, always 0. (ASSIGN (? target) (REGISTER (? comparand register-known-value))) (QUALIFIER (rtl:immediate-zero-constant? comparand)) - (list 'ASSIGN target (rtl:make-machine-constant 0))) + (list 'ASSIGN target (rtl:make-machine-register 0))) (define-rule rewriting ;; Compare to register 0, always 0. (EQ-TEST (? source) (REGISTER (? comparand register-known-value))) (QUALIFIER (rtl:immediate-zero-constant? comparand)) - (list 'EQ-TEST source (rtl:make-machine-constant 0))) + (list 'EQ-TEST source (rtl:make-machine-register 0))) (define-rule rewriting ;; Compare to register 0, always 0. (EQ-TEST (REGISTER (? comparand register-known-value)) (? source)) (QUALIFIER (rtl:immediate-zero-constant? comparand)) - (list 'EQ-TEST source (rtl:make-machine-constant 0))) + (list 'EQ-TEST source (rtl:make-machine-register 0))) (define (rtl:immediate-zero-constant? expression) (cond ((rtl:constant? expression) -- 2.25.1