From: Guillermo J. Rozas Date: Fri, 31 Jan 1992 13:35:37 +0000 (+0000) Subject: More changes. X-Git-Tag: 20090517-FFI~9909 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e8fc6d00b6a61fcbe20a64396cbf21f568d93ff0;p=mit-scheme.git More changes. --- diff --git a/v7/src/compiler/machines/i386/rulfix.scm b/v7/src/compiler/machines/i386/rulfix.scm index 5222c88ac..cb5d3f15c 100644 --- a/v7/src/compiler/machines/i386/rulfix.scm +++ b/v7/src/compiler/machines/i386/rulfix.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulfix.scm,v 1.8 1992/01/30 06:34:32 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulfix.scm,v 1.9 1992/01/31 13:35:37 jinx Exp $ $MC68020-Header: /scheme/src/compiler/machines/bobcat/RCS/rules1.scm,v 4.36 1991/10/25 06:49:58 cph Exp $ Copyright (c) 1992 Massachusetts Institute of Technology @@ -115,6 +115,18 @@ MIT in each case. |# overflow? ; ignored (fixnum-2-args/register*constant operator target source constant)) +(define-rule statement + (ASSIGN (REGISTER (? target)) + (FIXNUM-2-ARGS (? operator) + (OBJECT->FIXNUM (CONSTANT 0)) + (REGISTER (? source)) + (? overflow?))) + (QUALIFIER (not (fixnum-2-args/commutative? operator))) + overflow? ; ignored + (if (eq? operator 'MINUS-FIXNUM) + (fixnum-1-arg target source (fixnum-1-arg/operate 'FIXNUM-NEGATE)) + (load-fixnum-constant 0 (target-register-reference target)))) + (define-rule statement (ASSIGN (REGISTER (? target)) (FIXNUM-2-ARGS MULTIPLY-FIXNUM @@ -123,7 +135,7 @@ MIT in each case. |# (? overflow?))) overflow? ; ignored (convert-index->fixnum/register target source)) - + (define-rule statement (ASSIGN (REGISTER (? target)) (FIXNUM-2-ARGS MULTIPLY-FIXNUM @@ -132,8 +144,8 @@ MIT in each case. |# (? overflow?))) overflow? ; ignored (convert-index->fixnum/register target source)) - -;;;; Fixnum Predicates + +;;; Fixnum Predicates (define-rule predicate (FIXNUM-PRED-1-ARG (? predicate) (REGISTER (? register))) @@ -332,6 +344,10 @@ MIT in each case. |# (LAP (NOT W ,target) ,@(word->fixnum target)))) +(define-fixnum-method 'FIXNUM-NEGATE fixnum-methods/1-arg + (lambda (target) + (LAP (NEG W ,target)))) + (let-syntax ((binary-operation (macro (name instr idempotent?)