From: Guillermo J. Rozas Date: Wed, 12 Aug 1992 06:03:49 +0000 (+0000) Subject: Fix bug in flonum-negative?, flonum-zero?, flonum-less?, and X-Git-Tag: 20090517-FFI~9134 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2bb6803bc838593b38c6b88d611a5d0017e31578;p=mit-scheme.git Fix bug in flonum-negative?, flonum-zero?, flonum-less?, and flonum-equal? by which unordered comparisons always compared true, breaking code in runtime/dragon4.scm, for example. --- diff --git a/v7/src/compiler/machines/i386/rulflo.scm b/v7/src/compiler/machines/i386/rulflo.scm index 48c145b12..9ba8e8ed8 100644 --- a/v7/src/compiler/machines/i386/rulflo.scm +++ b/v7/src/compiler/machines/i386/rulflo.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulflo.scm,v 1.18 1992/08/12 02:41:48 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/i386/rulflo.scm,v 1.19 1992/08/12 06:03:49 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 @@ -534,14 +534,22 @@ MIT in each case. |# (case predicate ((FLONUM-EQUAL? FLONUM-ZERO?) (set-current-branches! (lambda (label) - (LAP (JE (@PCR ,label)))) + (let ((unordered (generate-label 'UNORDERED))) + (LAP (JP (@PCR ,unordered)) + (JE (@PCR ,label)) + (LABEL ,unordered)))) (lambda (label) - (LAP (JNE (@PCR ,label)))))) + (LAP (JNE (@PCR ,label)) + (JP (@PCR ,label)))))) ((FLONUM-LESS? FLONUM-NEGATIVE?) (set-current-branches! (lambda (label) - (LAP (JB (@PCR ,label)))) + (let ((unordered (generate-label 'UNORDERED))) + (LAP (JP (@PCR ,unordered)) + (JB (@PCR ,label)) + (LABEL ,unordered)))) (lambda (label) - (LAP (JAE (@PCR ,label)))))) + (LAP (JAE (@PCR ,label)) + (JP (@PCR ,label)))))) ((FLONUM-GREATER? FLONUM-POSITIVE?) (set-current-branches! (lambda (label) (LAP (JA (@PCR ,label))))