Fixed bug with FIXNUM-CONSTANT not sign-extending.
authorHenry M. Wu <edu/mit/csail/zurich/mhwu>
Tue, 3 May 1988 01:04:25 +0000 (01:04 +0000)
committerHenry M. Wu <edu/mit/csail/zurich/mhwu>
Tue, 3 May 1988 01:04:25 +0000 (01:04 +0000)
v7/src/compiler/machines/bobcat/lapgen.scm

index 64896e087903e905bc15032b158afd1f9cd2d4e8..06511ad6109d8d437808389fd6e0ef349fc65220 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 4.4 1988/04/22 16:23:56 markf Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 4.5 1988/05/03 01:04:25 mhwu Exp $
 
 Copyright (c) 1987 Massachusetts Institute of Technology
 
@@ -311,8 +311,10 @@ MIT in each case. |#
                 ,effective-address))
       (INST (MOV B (& ,type-code) ,effective-address))))
             
-(define fixnum-constant primitive-datum)
-
+(define (fixnum-constant x)
+  (if (<= (abs x) maximum-positive-fixnum)
+      x
+      (error "Not a fixnum" x)))
 
 (define (fixnum-expression? expression)
 ;;; input: an rtl expression