(st2 (flonum-source! source2)))
(cond ((zero? st1)
(flonum-branch! predicate
- (LAP (FCOM (ST 0) (ST ,st2)))))
+ (LAP (FUCOM (ST 0) (ST ,st2)))))
((zero? st2)
(flonum-branch! (commute-flonum-predicate predicate)
- (LAP (FCOM (ST 0) (ST ,st1)))))
+ (LAP (FUCOM (ST 0) (ST ,st1)))))
(else
(flonum-branch! predicate
(LAP (FLD (ST ,st1))
- (FCOMP (ST 0) (ST ,(1+ st2)))))))))
+ (FUCOMP (ST 0) (ST ,(1+ st2)))))))))
(define-rule predicate
(FLONUM-PRED-2-ARGS (? predicate)
\f
(define (flonum-compare-zero predicate source)
(let ((sti (flonum-source! source)))
- (if (zero? sti)
- (flonum-branch! predicate
- (LAP (FTST)))
- (flonum-branch! (commute-flonum-predicate predicate)
- (LAP (FLDZ)
- (FCOMP (ST 0) (ST ,(1+ sti))))))))
+ (flonum-branch! (commute-flonum-predicate predicate)
+ (LAP (FLDZ)
+ (FUCOMP (ST 0) (ST ,(1+ sti)))))))
(define (flonum-compare-one predicate source)
(let ((sti (flonum-source! source)))
(flonum-branch! (commute-flonum-predicate predicate)
(LAP (FLD1)
- (FCOMP (ST 0) (ST ,(1+ sti)))))))
+ (FUCOMP (ST 0) (ST ,(1+ sti)))))))
(define (commute-flonum-predicate pred)
(case pred
jne asm_generic_$1_fail
OP(and,l) TW(rmask,REG(edx))
OP(fld,l) DOF(4,REG(edx))
- ftst
+ fldz
+ fucomp ST(1)
fstsw REG(ax)
fstp ST(0)
sahf
OP(mov,l) TW(REG(ebx),REG(ecx))
OP(and,l) TW(rmask,REG(ecx))
OP(fld,l) DOF(4,REG(ecx)) # fldd
- ftst
+ fldz
+ fucomp ST(1)
fstsw REG(ax)
sahf
je asm_generic_divide_by_zero