From: Taylor R Campbell Date: Wed, 12 Dec 2018 22:33:57 +0000 (+0000) Subject: Use FCOM, not FUCOM, for ordered comparisons. X-Git-Tag: mit-scheme-pucked-10.1.9~3^2~35^2~24 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=53843ccd34320deb563d69af5cf08cff006fafbb;p=mit-scheme.git Use FCOM, not FUCOM, for ordered comparisons. --- diff --git a/src/compiler/machines/i386/rulflo.scm b/src/compiler/machines/i386/rulflo.scm index 2f35bce7e..7bd2aaf69 100644 --- a/src/compiler/machines/i386/rulflo.scm +++ b/src/compiler/machines/i386/rulflo.scm @@ -667,14 +667,14 @@ USA. (st2 (flonum-source! source2))) (cond ((zero? st1) (flonum-branch! predicate - (LAP (FUCOM (ST 0) (ST ,st2))))) + (LAP (FCOM (ST 0) (ST ,st2))))) ((zero? st2) (flonum-branch! (commute-flonum-predicate predicate) - (LAP (FUCOM (ST 0) (ST ,st1))))) + (LAP (FCOM (ST 0) (ST ,st1))))) (else (flonum-branch! predicate (LAP (FLD (ST ,st1)) - (FUCOMP (ST 0) (ST ,(1+ st2))))))))) + (FCOMP (ST 0) (ST ,(1+ st2))))))))) (define-rule predicate (FLONUM-PRED-2-ARGS (? predicate) @@ -704,13 +704,13 @@ USA. (let ((sti (flonum-source! source))) (flonum-branch! (commute-flonum-predicate predicate) (LAP (FLDZ) - (FUCOMP (ST 0) (ST ,(1+ sti))))))) + (FCOMP (ST 0) (ST ,(1+ sti))))))) (define (flonum-compare-one predicate source) (let ((sti (flonum-source! source))) (flonum-branch! (commute-flonum-predicate predicate) (LAP (FLD1) - (FUCOMP (ST 0) (ST ,(1+ sti))))))) + (FCOMP (ST 0) (ST ,(1+ sti))))))) ;;; For predicate giving (if (predicate x y) a b), return predicate* so ;;; that (if (predicate* y x) a b) is equivalent. diff --git a/tests/microcode/test-flonum-except.scm b/tests/microcode/test-flonum-except.scm index 6b9b026cc..783596a33 100644 --- a/tests/microcode/test-flonum-except.scm +++ b/tests/microcode/test-flonum-except.scm @@ -291,7 +291,7 @@ USA. ;; XXX sinh, cosh, tanh, asinh, acosh, atanh (let ((expect-failure - (if (and (eq? microcode-id/compiled-code-type 'x86-64) + (if (and (memq microcode-id/compiled-code-type '(x86-64 i386)) (compiled-procedure? flo:=)) #!default expect-failure)))