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.

From-SVN: r215013
This commit is contained in:
Joseph Myers 2014-09-08 13:22:56 +01:00 committed by Joseph Myers
parent e45fcf805f
commit 9686a2e668
9 changed files with 40 additions and 103 deletions

View File

@ -1,3 +1,15 @@
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

View File

@ -440,9 +440,6 @@ extern int arm_fpu_attr;
#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

View File

@ -80,14 +80,6 @@ along with GCC; see the file COPYING3. If not see
/* 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 */

View File

@ -926,14 +926,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#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

View File

@ -1341,27 +1341,6 @@ Return machine mode to be used for @code{_Unwind_Word} type.
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

View File

@ -1255,27 +1255,6 @@ pattern needs to support both a 32- and a 64-bit mode.
@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

View File

@ -934,7 +934,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
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 \

View File

@ -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 ...

View File

@ -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;
}
else
{
/* Add a one to the guards to round up */
fraction += GARDROUND;
}
if (fraction >= IMPLICIT_2)
{
fraction >>= 1;
exp += 1;
}
fraction >>= NGARDS;
if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
{
/* Saturate on overflow. */
exp = EXPMAX;
fraction = ((fractype) 1 << FRACBITS) - 1;
}
}
}
@ -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))
{