diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 5 | ||||
-rw-r--r-- | libgcc/config/rs6000/ibm-ldouble.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 0c32652..7fc4bd0 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2014-01-02 Joseph Myers <joseph@codesourcery.com> + + * config/rs6000/ibm-ldouble.c (__gcc_qdiv): Scale up arguments in + case of small numerator and finite nonzero result. + 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com> Update copyright years diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c index 089de7d..abcd3c5 100644 --- a/libgcc/config/rs6000/ibm-ldouble.c +++ b/libgcc/config/rs6000/ibm-ldouble.c @@ -190,7 +190,16 @@ __gcc_qdiv (double a, double b, double c, double d) || nonfinite (t)) return t; - /* Finite nonzero result requires corrections to the highest order term. */ + /* Finite nonzero result requires corrections to the highest order + term. These corrections require the low part of c * t to be + exactly represented in double. */ + if (fabs (a) <= 0x1p-969) + { + a *= 0x1p106; + b *= 0x1p106; + c *= 0x1p106; + d *= 0x1p106; + } s = c * t; /* (s,sigma) = c*t exactly. */ w = -(-b + d * t); /* Written to get fnmsub for speed, but not |