From: Henry M. Wu Date: Tue, 3 May 1988 01:04:25 +0000 (+0000) Subject: Fixed bug with FIXNUM-CONSTANT not sign-extending. X-Git-Tag: 20090517-FFI~12786 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7106b6613f31d627fff87fbbcbac1bd9cdff6dfb;p=mit-scheme.git Fixed bug with FIXNUM-CONSTANT not sign-extending. --- diff --git a/v7/src/compiler/machines/bobcat/lapgen.scm b/v7/src/compiler/machines/bobcat/lapgen.scm index 64896e087..06511ad61 100644 --- a/v7/src/compiler/machines/bobcat/lapgen.scm +++ b/v7/src/compiler/machines/bobcat/lapgen.scm @@ -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