summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-08 12:22:56 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-08 12:22:56 +0000
commit2aeea85514f49736b212694f4e4cd5fb2878beef (patch)
tree6dbbe825a64b695203807e29716fb3fb42988da6 /libgcc
parent21cf8b79605f1cce9d5039e28efd5d36322d973a (diff)
downloadgcc-2aeea85514f49736b212694f4e4cd5fb2878beef.tar.gz
Remove no-longer-needed fp-bit target macros.
gcc: * defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): Remove. * doc/tm.texi.in (ROUND_TOWARDS_ZERO, LARGEST_EXPONENT_IS_NORMAL): Remove. * doc/tm.texi: Regenerate. * system.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): Poison. * config/arm/arm.h (LARGEST_EXPONENT_IS_NORMAL): Remove. * config/cris/cris.h (__make_dp): Remove. libgcc: * fp-bit.c (pack_d, unpack_d): Remove LARGEST_EXPONENT_IS_NORMAL and ROUND_TOWARDS_ZERO conditionals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/fp-bit.c60
2 files changed, 25 insertions, 40 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 4ab05ef8f94..8133025a648 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * fp-bit.c (pack_d, unpack_d): Remove LARGEST_EXPONENT_IS_NORMAL
+ and ROUND_TOWARDS_ZERO conditionals.
+
2014-09-07 Nathan sidwell <nathan@acm.org>
* libgcov-interface.c (STRONG_ALIAS): Rename to ...
diff --git a/libgcc/fp-bit.c b/libgcc/fp-bit.c
index 4155fae28ca..5f67e07d57a 100644
--- a/libgcc/fp-bit.c
+++ b/libgcc/fp-bit.c
@@ -202,15 +202,7 @@ pack_d (const fp_number_type *src)
int sign = src->sign;
int exp = 0;
- if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
- {
- /* We can't represent these values accurately. By using the
- largest possible magnitude, we guarantee that the conversion
- of infinity is at least as big as any finite number. */
- exp = EXPMAX;
- fraction = ((fractype) 1 << FRACBITS) - 1;
- }
- else if (isnan (src))
+ if (isnan (src))
{
exp = EXPMAX;
/* Restore the NaN's payload. */
@@ -291,8 +283,7 @@ pack_d (const fp_number_type *src)
fraction >>= NGARDS;
#endif /* NO_DENORMALS */
}
- else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
- && __builtin_expect (src->normal_exp > EXPBIAS, 0))
+ else if (__builtin_expect (src->normal_exp > EXPBIAS, 0))
{
exp = EXPMAX;
fraction = 0;
@@ -300,35 +291,25 @@ pack_d (const fp_number_type *src)
else
{
exp = src->normal_exp + EXPBIAS;
- if (!ROUND_TOWARDS_ZERO)
+ /* IF the gard bits are the all zero, but the first, then we're
+ half way between two numbers, choose the one which makes the
+ lsb of the answer 0. */
+ if ((fraction & GARDMASK) == GARDMSB)
{
- /* IF the gard bits are the all zero, but the first, then we're
- half way between two numbers, choose the one which makes the
- lsb of the answer 0. */
- if ((fraction & GARDMASK) == GARDMSB)
- {
- if (fraction & (1 << NGARDS))
- fraction += GARDROUND + 1;
- }
- else
- {
- /* Add a one to the guards to round up */
- fraction += GARDROUND;
- }
- if (fraction >= IMPLICIT_2)
- {
- fraction >>= 1;
- exp += 1;
- }
+ if (fraction & (1 << NGARDS))
+ fraction += GARDROUND + 1;
}
- fraction >>= NGARDS;
-
- if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
+ else
+ {
+ /* Add a one to the guards to round up */
+ fraction += GARDROUND;
+ }
+ if (fraction >= IMPLICIT_2)
{
- /* Saturate on overflow. */
- exp = EXPMAX;
- fraction = ((fractype) 1 << FRACBITS) - 1;
+ fraction >>= 1;
+ exp += 1;
}
+ fraction >>= NGARDS;
}
}
@@ -556,8 +537,7 @@ unpack_d (FLO_union_type * src, fp_number_type * dst)
dst->fraction.ll = fraction;
}
}
- else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
- && __builtin_expect (exp == EXPMAX, 0))
+ else if (__builtin_expect (exp == EXPMAX, 0))
{
/* Huge exponent*/
if (fraction == 0)
@@ -915,7 +895,7 @@ _fpmul_parts ( fp_number_type * a,
low <<= 1;
}
- if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
+ if ((high & GARDMASK) == GARDMSB)
{
if (high & (1 << NGARDS))
{
@@ -1035,7 +1015,7 @@ _fpdiv_parts (fp_number_type * a,
numerator *= 2;
}
- if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
+ if ((quotient & GARDMASK) == GARDMSB)
{
if (quotient & (1 << NGARDS))
{