Return the correct result when the same dividend and divisor are provided,

and they're negative numbers.
This commit is contained in:
Ulrich Drepper 2005-10-20 05:24:59 +00:00
parent eb34460f46
commit 011363465f
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ $y_is_neg:
/* If we get here, Y is so big that bit 63 is set. The results
from the divide will be completely wrong. Fortunately, the
quotient must be either 0 or 1, so just compute it directly. */
cmpult Y, X, RV
cmpule Y, X, RV
excb
mt_fpcr $f3
ldt $f0, 0(sp)

View File

@ -246,7 +246,7 @@ $y_is_neg:
from the divide will be completely wrong. Fortunately, the
quotient must be either 0 or 1, so the remainder must be X
or X-Y, so just compute it directly. */
cmpult Y, X, AT
cmpule Y, X, AT
subq X, Y, RV
ldt $f0, 0(sp)
cmoveq AT, X, RV