Fix bug in multiply-fixnum-constant. There is no
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 18 Feb 1992 21:56:48 +0000 (21:56 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Tue, 18 Feb 1992 21:56:48 +0000 (21:56 +0000)
    (IMUL (R ?foo) (& ?bar))
instruction.  It is an assembler macro for
    (IMUL (R ?foo) (R ?foo) (& ?bar))

v7/src/compiler/machines/i386/rulfix.scm

index 32c5342d5f045e708e346feeeab68b0529be1db6..bb9cd17cd912e19039eaf9c64ef9d7777678bedf 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulfix.scm,v 1.20 1992/02/18 04:35:56 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulfix.scm,v 1.21 1992/02/18 21:56:48 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
@@ -287,7 +287,8 @@ MIT in each case. |#
                    (NEG W ,target))
               (LAP (SAL W ,target (& ,expt-of-2))))))
        (else
-        (LAP (IMUL W ,target (& ,constant))))))
+        ;; target must be a register!
+        (LAP (IMUL W ,target ,target (& ,constant))))))
 \f
 ;;;; Operation tables