+2014-09-08 Joseph Myers <joseph@codesourcery.com>
+
+ * 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.
+
2014-09-08 Richard Biener <rguenther@suse.de>
PR bootstrap/63204
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
#endif
-#define LARGEST_EXPONENT_IS_NORMAL(bits) \
- ((bits) == 16 && arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)
-
#ifndef ARM_DEFAULT_ABI
#define ARM_DEFAULT_ABI ARM_ABI_APCS
#endif
/* Which CPU version this is. The parsed and adjusted cris_cpu_str. */
extern int cris_cpu_version;
-/* Changing the order used to be necessary to put the fourth __make_dp
- argument (a DImode parameter) in registers, to fit with the libfunc
- parameter passing scheme used for intrinsic functions. FIXME: Check
- performance. */
-#ifdef IN_LIBGCC2
-#define __make_dp(a,b,c,d) __cris_make_dp(d,a,b,c)
-#endif
-
/* Node: Driver */
#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
#endif
-#ifndef LARGEST_EXPONENT_IS_NORMAL
-#define LARGEST_EXPONENT_IS_NORMAL(SIZE) 0
-#endif
-
-#ifndef ROUND_TOWARDS_ZERO
-#define ROUND_TOWARDS_ZERO 0
-#endif
-
#ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
#endif
The default is to use @code{word_mode}.
@end deftypefn
-@defmac ROUND_TOWARDS_ZERO
-If defined, this macro should be true if the prevailing rounding
-mode is towards zero.
-
-Defining this macro only affects the way @file{libgcc.a} emulates
-floating-point arithmetic.
-
-Not defining this macro is equivalent to returning zero.
-@end defmac
-
-@defmac LARGEST_EXPONENT_IS_NORMAL (@var{size})
-This macro should return true if floats with @var{size}
-bits do not have a NaN or infinity representation, but use the largest
-exponent for normal numbers instead.
-
-Defining this macro only affects the way @file{libgcc.a} emulates
-floating-point arithmetic.
-
-The default definition of this macro returns false for all sizes.
-@end defmac
-
@deftypefn {Target Hook} bool TARGET_MS_BITFIELD_LAYOUT_P (const_tree @var{record_type})
This target hook returns @code{true} if bit-fields in the given
@var{record_type} are to be laid out following the rules of Microsoft
@hook TARGET_UNWIND_WORD_MODE
-@defmac ROUND_TOWARDS_ZERO
-If defined, this macro should be true if the prevailing rounding
-mode is towards zero.
-
-Defining this macro only affects the way @file{libgcc.a} emulates
-floating-point arithmetic.
-
-Not defining this macro is equivalent to returning zero.
-@end defmac
-
-@defmac LARGEST_EXPONENT_IS_NORMAL (@var{size})
-This macro should return true if floats with @var{size}
-bits do not have a NaN or infinity representation, but use the largest
-exponent for normal numbers instead.
-
-Defining this macro only affects the way @file{libgcc.a} emulates
-floating-point arithmetic.
-
-The default definition of this macro returns false for all sizes.
-@end defmac
-
@hook TARGET_MS_BITFIELD_LAYOUT_P
@hook TARGET_DECIMAL_FLOAT_SUPPORTED_P
REG_CLASS_FROM_CONSTRAINT REG_CLASS_FOR_CONSTRAINT \
EXTRA_CONSTRAINT_STR EXTRA_MEMORY_CONSTRAINT \
EXTRA_ADDRESS_CONSTRAINT CONST_DOUBLE_OK_FOR_CONSTRAINT_P \
- CALLER_SAVE_PROFITABLE
+ CALLER_SAVE_PROFITABLE LARGEST_EXPONENT_IS_NORMAL \
+ ROUND_TOWARDS_ZERO
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
+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 ...
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. */
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;
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;
}
}
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)
low <<= 1;
}
- if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
+ if ((high & GARDMASK) == GARDMSB)
{
if (high & (1 << NGARDS))
{
numerator *= 2;
}
- if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
+ if ((quotient & GARDMASK) == GARDMSB)
{
if (quotient & (1 << NGARDS))
{