diff options
Diffstat (limited to 'gcc/config')
45 files changed, 32 insertions, 2988 deletions
diff --git a/gcc/config/arm/t-strongarm-elf b/gcc/config/arm/t-strongarm-elf index 6af4f52dc18..4a4f4533ec1 100644 --- a/gcc/config/arm/t-strongarm-elf +++ b/gcc/config/arm/t-strongarm-elf @@ -19,25 +19,6 @@ LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _clzsi2 _clzdi2 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifndef __ARMEB__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifndef __ARMEB__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - MULTILIB_OPTIONS = mlittle-endian/mbig-endian mfloat-abi=hard/mfloat-abi=soft MULTILIB_DIRNAMES = le be fpu soft MULTILIB_EXCEPTIONS = diff --git a/gcc/config/arm/t-vxworks b/gcc/config/arm/t-vxworks index af01ac412db..8ac0d9bcec5 100644 --- a/gcc/config/arm/t-vxworks +++ b/gcc/config/arm/t-vxworks @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2003, 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -18,24 +18,6 @@ LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifndef __ARMEB__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifndef __ARMEB__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - MULTILIB_OPTIONS = \ mrtp fPIC \ t4/t4be/t4t/t4tbe/t5/t5be/t5t/t5tbe/tstrongarm/txscale/txscalebe diff --git a/gcc/config/arm/t-wince-pe b/gcc/config/arm/t-wince-pe index 5aebc44c4c1..9ce1f313140 100644 --- a/gcc/config/arm/t-wince-pe +++ b/gcc/config/arm/t-wince-pe @@ -19,25 +19,6 @@ LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifndef __ARMEB__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifndef __ARMEB__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - pe.o: $(srcdir)/config/arm/pe.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) output.h flags.h $(TREE_H) expr.h $(TM_P_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index d79dd5a47b6..85f374527b3 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -91,19 +91,6 @@ LIB2FUNCS_EXCLUDE = \ # so use -mcall-prologues for smaller code size. TARGET_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc -mcall-prologues -Os -fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/avr/t-avr - echo '#define FLOAT' > fp-bit.c - echo '#define FLOAT_ONLY' >> fp-bit.c - echo '#define CMPtype QItype' >> fp-bit.c - echo '#define DF SF' >> fp-bit.c - echo '#define DI SI' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#define SMALL_MACHINE' >> fp-bit.c - echo 'typedef int QItype __attribute__ ((mode (QI)));' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -FPBIT = fp-bit.c - MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6 MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 diff --git a/gcc/config/bfin/t-bfin b/gcc/config/bfin/t-bfin index 90ee8f2c1f7..730043e4b63 100644 --- a/gcc/config/bfin/t-bfin +++ b/gcc/config/bfin/t-bfin @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -24,16 +24,6 @@ LIB1ASMFUNCS += _smulsi3_highpart EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Assemble startup files. $(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ diff --git a/gcc/config/bfin/t-bfin-elf b/gcc/config/bfin/t-bfin-elf index 867a71dce77..61797bfad2a 100644 --- a/gcc/config/bfin/t-bfin-elf +++ b/gcc/config/bfin/t-bfin-elf @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux index 65d8f7a97f3..e7e705ef1d4 100644 --- a/gcc/config/bfin/t-bfin-linux +++ b/gcc/config/bfin/t-bfin-linux @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux index 9990c0d4f2b..a46d7b3ac15 100644 --- a/gcc/config/bfin/t-bfin-uclinux +++ b/gcc/config/bfin/t-bfin-uclinux @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -22,16 +22,6 @@ LIB1ASMSRC = bfin/lib1funcs.asm LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart LIB1ASMFUNCS += _smulsi3_highpart -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - CRTSTUFF_T_CFLAGS = -fpic TARGET_LIBGCC2_CFLAGS = -fpic diff --git a/gcc/config/cris/t-cris b/gcc/config/cris/t-cris index 1630acbcc24..19d44ce8320 100644 --- a/gcc/config/cris/t-cris +++ b/gcc/config/cris/t-cris @@ -3,7 +3,7 @@ # # The Makefile fragment to include when compiling gcc et al for CRIS. # -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -28,23 +28,6 @@ LIB2FUNCS_EXTRA = _udivsi3.c _divsi3.c _umodsi3.c _modsi3.c CRIS_LIB1CSRC = $(srcdir)/config/cris/arit.c -FPBIT = tmplibgcc_fp_bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -# Use another name to avoid confusing SUN make, if support for -# it is reinstated elsewhere. Prefixed with "tmplibgcc" means -# "make clean" will wipe it. We define a few L_ thingies -# because we can't select them individually through FPBIT_FUNCS; -# see above. -tmplibgcc_fp_bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' > $@ - echo '#define FLOAT' >> $@ - cat $(srcdir)/config/fp-bit.c >> $@ - # The fixed-point arithmetic code is in one file, arit.c, # similar to libgcc2.c (or the old libgcc1.c). We need to # "split it up" with one file per define. diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c deleted file mode 100644 index 82d924ec2bf..00000000000 --- a/gcc/config/fp-bit.c +++ /dev/null @@ -1,1657 +0,0 @@ -/* This is a software floating point library which can be used - for targets without hardware floating point. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, - 2004, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* This implements IEEE 754 format arithmetic, but does not provide a - mechanism for setting the rounding mode, or for generating or handling - exceptions. - - The original code by Steve Chamberlain, hacked by Mark Eichin and Jim - Wilson, all of Cygnus Support. */ - -/* The intended way to use this file is to make two copies, add `#define FLOAT' - to one copy, then compile both copies and add them to libgcc.a. */ - -#include "tconfig.h" -#include "coretypes.h" -#include "tm.h" -#include "config/fp-bit.h" - -/* The following macros can be defined to change the behavior of this file: - FLOAT: Implement a `float', aka SFmode, fp library. If this is not - defined, then this file implements a `double', aka DFmode, fp library. - FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e. - don't include float->double conversion which requires the double library. - This is useful only for machines which can't support doubles, e.g. some - 8-bit processors. - CMPtype: Specify the type that floating point compares should return. - This defaults to SItype, aka int. - _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding - two integers to the FLO_union_type. - NO_DENORMALS: Disable handling of denormals. - NO_NANS: Disable nan and infinity handling - SMALL_MACHINE: Useful when operations on QIs and HIs are faster - than on an SI */ - -/* We don't currently support extended floats (long doubles) on machines - without hardware to deal with them. - - These stubs are just to keep the linker from complaining about unresolved - references which can be pulled in from libio & libstdc++, even if the - user isn't using long doubles. However, they may generate an unresolved - external to abort if abort is not used by the function, and the stubs - are referenced from within libc, since libgcc goes before and after the - system library. */ - -#ifdef DECLARE_LIBRARY_RENAMES - DECLARE_LIBRARY_RENAMES -#endif - -#ifdef EXTENDED_FLOAT_STUBS -extern void abort (void); -void __extendsfxf2 (void) { abort(); } -void __extenddfxf2 (void) { abort(); } -void __truncxfdf2 (void) { abort(); } -void __truncxfsf2 (void) { abort(); } -void __fixxfsi (void) { abort(); } -void __floatsixf (void) { abort(); } -void __addxf3 (void) { abort(); } -void __subxf3 (void) { abort(); } -void __mulxf3 (void) { abort(); } -void __divxf3 (void) { abort(); } -void __negxf2 (void) { abort(); } -void __eqxf2 (void) { abort(); } -void __nexf2 (void) { abort(); } -void __gtxf2 (void) { abort(); } -void __gexf2 (void) { abort(); } -void __lexf2 (void) { abort(); } -void __ltxf2 (void) { abort(); } - -void __extendsftf2 (void) { abort(); } -void __extenddftf2 (void) { abort(); } -void __trunctfdf2 (void) { abort(); } -void __trunctfsf2 (void) { abort(); } -void __fixtfsi (void) { abort(); } -void __floatsitf (void) { abort(); } -void __addtf3 (void) { abort(); } -void __subtf3 (void) { abort(); } -void __multf3 (void) { abort(); } -void __divtf3 (void) { abort(); } -void __negtf2 (void) { abort(); } -void __eqtf2 (void) { abort(); } -void __netf2 (void) { abort(); } -void __gttf2 (void) { abort(); } -void __getf2 (void) { abort(); } -void __letf2 (void) { abort(); } -void __lttf2 (void) { abort(); } -#else /* !EXTENDED_FLOAT_STUBS, rest of file */ - -/* IEEE "special" number predicates */ - -#ifdef NO_NANS - -#define nan() 0 -#define isnan(x) 0 -#define isinf(x) 0 -#else - -#if defined L_thenan_sf -const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; -#elif defined L_thenan_df -const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} }; -#elif defined L_thenan_tf -const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} }; -#elif defined TFLOAT -extern const fp_number_type __thenan_tf; -#elif defined FLOAT -extern const fp_number_type __thenan_sf; -#else -extern const fp_number_type __thenan_df; -#endif - -INLINE -static const fp_number_type * -makenan (void) -{ -#ifdef TFLOAT - return & __thenan_tf; -#elif defined FLOAT - return & __thenan_sf; -#else - return & __thenan_df; -#endif -} - -INLINE -static int -isnan (const fp_number_type *x) -{ - return __builtin_expect (x->class == CLASS_SNAN || x->class == CLASS_QNAN, - 0); -} - -INLINE -static int -isinf (const fp_number_type * x) -{ - return __builtin_expect (x->class == CLASS_INFINITY, 0); -} - -#endif /* NO_NANS */ - -INLINE -static int -iszero (const fp_number_type * x) -{ - return x->class == CLASS_ZERO; -} - -INLINE -static void -flip_sign ( fp_number_type * x) -{ - x->sign = !x->sign; -} - -/* Count leading zeroes in N. */ -INLINE -static int -clzusi (USItype n) -{ - extern int __clzsi2 (USItype); - if (sizeof (USItype) == sizeof (unsigned int)) - return __builtin_clz (n); - else if (sizeof (USItype) == sizeof (unsigned long)) - return __builtin_clzl (n); - else if (sizeof (USItype) == sizeof (unsigned long long)) - return __builtin_clzll (n); - else - return __clzsi2 (n); -} - -extern FLO_type pack_d (const fp_number_type * ); - -#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf) -FLO_type -pack_d (const fp_number_type *src) -{ - FLO_union_type dst; - fractype fraction = src->fraction.ll; /* wasn't unsigned before? */ - 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)) - { - exp = EXPMAX; - if (src->class == CLASS_QNAN || 1) - { -#ifdef QUIET_NAN_NEGATED - fraction |= QUIET_NAN - 1; -#else - fraction |= QUIET_NAN; -#endif - } - } - else if (isinf (src)) - { - exp = EXPMAX; - fraction = 0; - } - else if (iszero (src)) - { - exp = 0; - fraction = 0; - } - else if (fraction == 0) - { - exp = 0; - } - else - { - if (__builtin_expect (src->normal_exp < NORMAL_EXPMIN, 0)) - { -#ifdef NO_DENORMALS - /* Go straight to a zero representation if denormals are not - supported. The denormal handling would be harmless but - isn't unnecessary. */ - exp = 0; - fraction = 0; -#else /* NO_DENORMALS */ - /* This number's exponent is too low to fit into the bits - available in the number, so we'll store 0 in the exponent and - shift the fraction to the right to make up for it. */ - - int shift = NORMAL_EXPMIN - src->normal_exp; - - exp = 0; - - if (shift > FRAC_NBITS - NGARDS) - { - /* No point shifting, since it's more that 64 out. */ - fraction = 0; - } - else - { - int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0; - fraction = (fraction >> shift) | lowbit; - } - if ((fraction & GARDMASK) == GARDMSB) - { - if ((fraction & (1 << NGARDS))) - fraction += GARDROUND + 1; - } - else - { - /* Add to the guards to round up. */ - fraction += GARDROUND; - } - /* Perhaps the rounding means we now need to change the - exponent, because the fraction is no longer denormal. */ - if (fraction >= IMPLICIT_1) - { - exp += 1; - } - fraction >>= NGARDS; -#endif /* NO_DENORMALS */ - } - else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) - && __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 (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; - } - } - } - - /* We previously used bitfields to store the number, but this doesn't - handle little/big endian systems conveniently, so use shifts and - masks */ -#ifdef FLOAT_BIT_ORDER_MISMATCH - dst.bits.fraction = fraction; - dst.bits.exp = exp; - dst.bits.sign = sign; -#else -# if defined TFLOAT && defined HALFFRACBITS - { - halffractype high, low, unity; - int lowsign, lowexp; - - unity = (halffractype) 1 << HALFFRACBITS; - - /* Set HIGH to the high double's significand, masking out the implicit 1. - Set LOW to the low double's full significand. */ - high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1); - low = fraction & (unity * 2 - 1); - - /* Get the initial sign and exponent of the low double. */ - lowexp = exp - HALFFRACBITS - 1; - lowsign = sign; - - /* HIGH should be rounded like a normal double, making |LOW| <= - 0.5 ULP of HIGH. Assume round-to-nearest. */ - if (exp < EXPMAX) - if (low > unity || (low == unity && (high & 1) == 1)) - { - /* Round HIGH up and adjust LOW to match. */ - high++; - if (high == unity) - { - /* May make it infinite, but that's OK. */ - high = 0; - exp++; - } - low = unity * 2 - low; - lowsign ^= 1; - } - - high |= (halffractype) exp << HALFFRACBITS; - high |= (halffractype) sign << (HALFFRACBITS + EXPBITS); - - if (exp == EXPMAX || exp == 0 || low == 0) - low = 0; - else - { - while (lowexp > 0 && low < unity) - { - low <<= 1; - lowexp--; - } - - if (lowexp <= 0) - { - halffractype roundmsb, round; - int shift; - - shift = 1 - lowexp; - roundmsb = (1 << (shift - 1)); - round = low & ((roundmsb << 1) - 1); - - low >>= shift; - lowexp = 0; - - if (round > roundmsb || (round == roundmsb && (low & 1) == 1)) - { - low++; - if (low == unity) - /* LOW rounds up to the smallest normal number. */ - lowexp++; - } - } - - low &= unity - 1; - low |= (halffractype) lowexp << HALFFRACBITS; - low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS); - } - dst.value_raw = ((fractype) high << HALFSHIFT) | low; - } -# else - dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1); - dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS; - dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS); -# endif -#endif - -#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT) -#ifdef TFLOAT - { - qrtrfractype tmp1 = dst.words[0]; - qrtrfractype tmp2 = dst.words[1]; - dst.words[0] = dst.words[3]; - dst.words[1] = dst.words[2]; - dst.words[2] = tmp2; - dst.words[3] = tmp1; - } -#else - { - halffractype tmp = dst.words[0]; - dst.words[0] = dst.words[1]; - dst.words[1] = tmp; - } -#endif -#endif - - return dst.value; -} -#endif - -#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf) -void -unpack_d (FLO_union_type * src, fp_number_type * dst) -{ - /* We previously used bitfields to store the number, but this doesn't - handle little/big endian systems conveniently, so use shifts and - masks */ - fractype fraction; - int exp; - int sign; - -#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT) - FLO_union_type swapped; - -#ifdef TFLOAT - swapped.words[0] = src->words[3]; - swapped.words[1] = src->words[2]; - swapped.words[2] = src->words[1]; - swapped.words[3] = src->words[0]; -#else - swapped.words[0] = src->words[1]; - swapped.words[1] = src->words[0]; -#endif - src = &swapped; -#endif - -#ifdef FLOAT_BIT_ORDER_MISMATCH - fraction = src->bits.fraction; - exp = src->bits.exp; - sign = src->bits.sign; -#else -# if defined TFLOAT && defined HALFFRACBITS - { - halffractype high, low; - - high = src->value_raw >> HALFSHIFT; - low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1); - - fraction = high & ((((fractype)1) << HALFFRACBITS) - 1); - fraction <<= FRACBITS - HALFFRACBITS; - exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1); - sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1; - - if (exp != EXPMAX && exp != 0 && low != 0) - { - int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1); - int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1; - int shift; - fractype xlow; - - xlow = low & ((((fractype)1) << HALFFRACBITS) - 1); - if (lowexp) - xlow |= (((halffractype)1) << HALFFRACBITS); - else - lowexp = 1; - shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp); - if (shift > 0) - xlow <<= shift; - else if (shift < 0) - xlow >>= -shift; - if (sign == lowsign) - fraction += xlow; - else if (fraction >= xlow) - fraction -= xlow; - else - { - /* The high part is a power of two but the full number is lower. - This code will leave the implicit 1 in FRACTION, but we'd - have added that below anyway. */ - fraction = (((fractype) 1 << FRACBITS) - xlow) << 1; - exp--; - } - } - } -# else - fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1); - exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1); - sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1; -# endif -#endif - - dst->sign = sign; - if (exp == 0) - { - /* Hmm. Looks like 0 */ - if (fraction == 0 -#ifdef NO_DENORMALS - || 1 -#endif - ) - { - /* tastes like zero */ - dst->class = CLASS_ZERO; - } - else - { - /* Zero exponent with nonzero fraction - it's denormalized, - so there isn't a leading implicit one - we'll shift it so - it gets one. */ - dst->normal_exp = exp - EXPBIAS + 1; - fraction <<= NGARDS; - - dst->class = CLASS_NUMBER; -#if 1 - while (fraction < IMPLICIT_1) - { - fraction <<= 1; - dst->normal_exp--; - } -#endif - dst->fraction.ll = fraction; - } - } - else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) - && __builtin_expect (exp == EXPMAX, 0)) - { - /* Huge exponent*/ - if (fraction == 0) - { - /* Attached to a zero fraction - means infinity */ - dst->class = CLASS_INFINITY; - } - else - { - /* Nonzero fraction, means nan */ -#ifdef QUIET_NAN_NEGATED - if ((fraction & QUIET_NAN) == 0) -#else - if (fraction & QUIET_NAN) -#endif - { - dst->class = CLASS_QNAN; - } - else - { - dst->class = CLASS_SNAN; - } - /* Keep the fraction part as the nan number */ - dst->fraction.ll = fraction; - } - } - else - { - /* Nothing strange about this number */ - dst->normal_exp = exp - EXPBIAS; - dst->class = CLASS_NUMBER; - dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1; - } -} -#endif /* L_unpack_df || L_unpack_sf */ - -#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf) -static const fp_number_type * -_fpadd_parts (fp_number_type * a, - fp_number_type * b, - fp_number_type * tmp) -{ - intfrac tfraction; - - /* Put commonly used fields in local variables. */ - int a_normal_exp; - int b_normal_exp; - fractype a_fraction; - fractype b_fraction; - - if (isnan (a)) - { - return a; - } - if (isnan (b)) - { - return b; - } - if (isinf (a)) - { - /* Adding infinities with opposite signs yields a NaN. */ - if (isinf (b) && a->sign != b->sign) - return makenan (); - return a; - } - if (isinf (b)) - { - return b; - } - if (iszero (b)) - { - if (iszero (a)) - { - *tmp = *a; - tmp->sign = a->sign & b->sign; - return tmp; - } - return a; - } - if (iszero (a)) - { - return b; - } - - /* Got two numbers. shift the smaller and increment the exponent till - they're the same */ - { - int diff; - int sdiff; - - a_normal_exp = a->normal_exp; - b_normal_exp = b->normal_exp; - a_fraction = a->fraction.ll; - b_fraction = b->fraction.ll; - - diff = a_normal_exp - b_normal_exp; - sdiff = diff; - - if (diff < 0) - diff = -diff; - if (diff < FRAC_NBITS) - { - if (sdiff > 0) - { - b_normal_exp += diff; - LSHIFT (b_fraction, diff); - } - else if (sdiff < 0) - { - a_normal_exp += diff; - LSHIFT (a_fraction, diff); - } - } - else - { - /* Somethings's up.. choose the biggest */ - if (a_normal_exp > b_normal_exp) - { - b_normal_exp = a_normal_exp; - b_fraction = 0; - } - else - { - a_normal_exp = b_normal_exp; - a_fraction = 0; - } - } - } - - if (a->sign != b->sign) - { - if (a->sign) - { - tfraction = -a_fraction + b_fraction; - } - else - { - tfraction = a_fraction - b_fraction; - } - if (tfraction >= 0) - { - tmp->sign = 0; - tmp->normal_exp = a_normal_exp; - tmp->fraction.ll = tfraction; - } - else - { - tmp->sign = 1; - tmp->normal_exp = a_normal_exp; - tmp->fraction.ll = -tfraction; - } - /* and renormalize it */ - - while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll) - { - tmp->fraction.ll <<= 1; - tmp->normal_exp--; - } - } - else - { - tmp->sign = a->sign; - tmp->normal_exp = a_normal_exp; - tmp->fraction.ll = a_fraction + b_fraction; - } - tmp->class = CLASS_NUMBER; - /* Now the fraction is added, we have to shift down to renormalize the - number */ - - if (tmp->fraction.ll >= IMPLICIT_2) - { - LSHIFT (tmp->fraction.ll, 1); - tmp->normal_exp++; - } - return tmp; -} - -FLO_type -add (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - fp_number_type tmp; - const fp_number_type *res; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - res = _fpadd_parts (&a, &b, &tmp); - - return pack_d (res); -} - -FLO_type -sub (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - fp_number_type tmp; - const fp_number_type *res; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - b.sign ^= 1; - - res = _fpadd_parts (&a, &b, &tmp); - - return pack_d (res); -} -#endif /* L_addsub_sf || L_addsub_df */ - -#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf) -static inline __attribute__ ((__always_inline__)) const fp_number_type * -_fpmul_parts ( fp_number_type * a, - fp_number_type * b, - fp_number_type * tmp) -{ - fractype low = 0; - fractype high = 0; - - if (isnan (a)) - { - a->sign = a->sign != b->sign; - return a; - } - if (isnan (b)) - { - b->sign = a->sign != b->sign; - return b; - } - if (isinf (a)) - { - if (iszero (b)) - return makenan (); - a->sign = a->sign != b->sign; - return a; - } - if (isinf (b)) - { - if (iszero (a)) - { - return makenan (); - } - b->sign = a->sign != b->sign; - return b; - } - if (iszero (a)) - { - a->sign = a->sign != b->sign; - return a; - } - if (iszero (b)) - { - b->sign = a->sign != b->sign; - return b; - } - - /* Calculate the mantissa by multiplying both numbers to get a - twice-as-wide number. */ - { -#if defined(NO_DI_MODE) || defined(TFLOAT) - { - fractype x = a->fraction.ll; - fractype ylow = b->fraction.ll; - fractype yhigh = 0; - int bit; - - /* ??? This does multiplies one bit at a time. Optimize. */ - for (bit = 0; bit < FRAC_NBITS; bit++) - { - int carry; - - if (x & 1) - { - carry = (low += ylow) < ylow; - high += yhigh + carry; - } - yhigh <<= 1; - if (ylow & FRACHIGH) - { - yhigh |= 1; - } - ylow <<= 1; - x >>= 1; - } - } -#elif defined(FLOAT) - /* Multiplying two USIs to get a UDI, we're safe. */ - { - UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll; - - high = answer >> BITS_PER_SI; - low = answer; - } -#else - /* fractype is DImode, but we need the result to be twice as wide. - Assuming a widening multiply from DImode to TImode is not - available, build one by hand. */ - { - USItype nl = a->fraction.ll; - USItype nh = a->fraction.ll >> BITS_PER_SI; - USItype ml = b->fraction.ll; - USItype mh = b->fraction.ll >> BITS_PER_SI; - UDItype pp_ll = (UDItype) ml * nl; - UDItype pp_hl = (UDItype) mh * nl; - UDItype pp_lh = (UDItype) ml * nh; - UDItype pp_hh = (UDItype) mh * nh; - UDItype res2 = 0; - UDItype res0 = 0; - UDItype ps_hh__ = pp_hl + pp_lh; - if (ps_hh__ < pp_hl) - res2 += (UDItype)1 << BITS_PER_SI; - pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI; - res0 = pp_ll + pp_hl; - if (res0 < pp_ll) - res2++; - res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh; - high = res2; - low = res0; - } -#endif - } - - tmp->normal_exp = a->normal_exp + b->normal_exp - + FRAC_NBITS - (FRACBITS + NGARDS); - tmp->sign = a->sign != b->sign; - while (high >= IMPLICIT_2) - { - tmp->normal_exp++; - if (high & 1) - { - low >>= 1; - low |= FRACHIGH; - } - high >>= 1; - } - while (high < IMPLICIT_1) - { - tmp->normal_exp--; - - high <<= 1; - if (low & FRACHIGH) - high |= 1; - low <<= 1; - } - - if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB) - { - if (high & (1 << NGARDS)) - { - /* Because we're half way, we would round to even by adding - GARDROUND + 1, except that's also done in the packing - function, and rounding twice will lose precision and cause - the result to be too far off. Example: 32-bit floats with - bit patterns 0xfff * 0x3f800400 ~= 0xfff (less than 0.5ulp - off), not 0x1000 (more than 0.5ulp off). */ - } - else if (low) - { - /* We're a further than half way by a small amount corresponding - to the bits set in "low". Knowing that, we round here and - not in pack_d, because there we don't have "low" available - anymore. */ - high += GARDROUND + 1; - - /* Avoid further rounding in pack_d. */ - high &= ~(fractype) GARDMASK; - } - } - tmp->fraction.ll = high; - tmp->class = CLASS_NUMBER; - return tmp; -} - -FLO_type -multiply (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - fp_number_type tmp; - const fp_number_type *res; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - res = _fpmul_parts (&a, &b, &tmp); - - return pack_d (res); -} -#endif /* L_mul_sf || L_mul_df || L_mul_tf */ - -#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf) -static inline __attribute__ ((__always_inline__)) const fp_number_type * -_fpdiv_parts (fp_number_type * a, - fp_number_type * b) -{ - fractype bit; - fractype numerator; - fractype denominator; - fractype quotient; - - if (isnan (a)) - { - return a; - } - if (isnan (b)) - { - return b; - } - - a->sign = a->sign ^ b->sign; - - if (isinf (a) || iszero (a)) - { - if (a->class == b->class) - return makenan (); - return a; - } - - if (isinf (b)) - { - a->fraction.ll = 0; - a->normal_exp = 0; - return a; - } - if (iszero (b)) - { - a->class = CLASS_INFINITY; - return a; - } - - /* Calculate the mantissa by multiplying both 64bit numbers to get a - 128 bit number */ - { - /* quotient = - ( numerator / denominator) * 2^(numerator exponent - denominator exponent) - */ - - a->normal_exp = a->normal_exp - b->normal_exp; - numerator = a->fraction.ll; - denominator = b->fraction.ll; - - if (numerator < denominator) - { - /* Fraction will be less than 1.0 */ - numerator *= 2; - a->normal_exp--; - } - bit = IMPLICIT_1; - quotient = 0; - /* ??? Does divide one bit at a time. Optimize. */ - while (bit) - { - if (numerator >= denominator) - { - quotient |= bit; - numerator -= denominator; - } - bit >>= 1; - numerator *= 2; - } - - if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB) - { - if (quotient & (1 << NGARDS)) - { - /* Because we're half way, we would round to even by adding - GARDROUND + 1, except that's also done in the packing - function, and rounding twice will lose precision and cause - the result to be too far off. */ - } - else if (numerator) - { - /* We're a further than half way by the small amount - corresponding to the bits set in "numerator". Knowing - that, we round here and not in pack_d, because there we - don't have "numerator" available anymore. */ - quotient += GARDROUND + 1; - - /* Avoid further rounding in pack_d. */ - quotient &= ~(fractype) GARDMASK; - } - } - - a->fraction.ll = quotient; - return (a); - } -} - -FLO_type -divide (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - const fp_number_type *res; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - res = _fpdiv_parts (&a, &b); - - return pack_d (res); -} -#endif /* L_div_sf || L_div_df */ - -#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \ - || defined(L_fpcmp_parts_tf) -/* according to the demo, fpcmp returns a comparison with 0... thus - a<b -> -1 - a==b -> 0 - a>b -> +1 - */ - -int -__fpcmp_parts (fp_number_type * a, fp_number_type * b) -{ -#if 0 - /* either nan -> unordered. Must be checked outside of this routine. */ - if (isnan (a) && isnan (b)) - { - return 1; /* still unordered! */ - } -#endif - - if (isnan (a) || isnan (b)) - { - return 1; /* how to indicate unordered compare? */ - } - if (isinf (a) && isinf (b)) - { - /* +inf > -inf, but +inf != +inf */ - /* b \a| +inf(0)| -inf(1) - ______\+--------+-------- - +inf(0)| a==b(0)| a<b(-1) - -------+--------+-------- - -inf(1)| a>b(1) | a==b(0) - -------+--------+-------- - So since unordered must be nonzero, just line up the columns... - */ - return b->sign - a->sign; - } - /* but not both... */ - if (isinf (a)) - { - return a->sign ? -1 : 1; - } - if (isinf (b)) - { - return b->sign ? 1 : -1; - } - if (iszero (a) && iszero (b)) - { - return 0; - } - if (iszero (a)) - { - return b->sign ? 1 : -1; - } - if (iszero (b)) - { - return a->sign ? -1 : 1; - } - /* now both are "normal". */ - if (a->sign != b->sign) - { - /* opposite signs */ - return a->sign ? -1 : 1; - } - /* same sign; exponents? */ - if (a->normal_exp > b->normal_exp) - { - return a->sign ? -1 : 1; - } - if (a->normal_exp < b->normal_exp) - { - return a->sign ? 1 : -1; - } - /* same exponents; check size. */ - if (a->fraction.ll > b->fraction.ll) - { - return a->sign ? -1 : 1; - } - if (a->fraction.ll < b->fraction.ll) - { - return a->sign ? 1 : -1; - } - /* after all that, they're equal. */ - return 0; -} -#endif - -#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf) -CMPtype -compare (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - return __fpcmp_parts (&a, &b); -} -#endif /* L_compare_sf || L_compare_df */ - -/* These should be optimized for their specific tasks someday. */ - -#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf) -CMPtype -_eq_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return 1; /* false, truth == 0 */ - - return __fpcmp_parts (&a, &b) ; -} -#endif /* L_eq_sf || L_eq_df */ - -#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf) -CMPtype -_ne_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return 1; /* true, truth != 0 */ - - return __fpcmp_parts (&a, &b) ; -} -#endif /* L_ne_sf || L_ne_df */ - -#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf) -CMPtype -_gt_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return -1; /* false, truth > 0 */ - - return __fpcmp_parts (&a, &b); -} -#endif /* L_gt_sf || L_gt_df */ - -#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf) -CMPtype -_ge_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return -1; /* false, truth >= 0 */ - return __fpcmp_parts (&a, &b) ; -} -#endif /* L_ge_sf || L_ge_df */ - -#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf) -CMPtype -_lt_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return 1; /* false, truth < 0 */ - - return __fpcmp_parts (&a, &b); -} -#endif /* L_lt_sf || L_lt_df */ - -#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf) -CMPtype -_le_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - if (isnan (&a) || isnan (&b)) - return 1; /* false, truth <= 0 */ - - return __fpcmp_parts (&a, &b) ; -} -#endif /* L_le_sf || L_le_df */ - -#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf) -CMPtype -_unord_f2 (FLO_type arg_a, FLO_type arg_b) -{ - fp_number_type a; - fp_number_type b; - FLO_union_type au, bu; - - au.value = arg_a; - bu.value = arg_b; - - unpack_d (&au, &a); - unpack_d (&bu, &b); - - return (isnan (&a) || isnan (&b)); -} -#endif /* L_unord_sf || L_unord_df */ - -#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf) -FLO_type -si_to_float (SItype arg_a) -{ - fp_number_type in; - - in.class = CLASS_NUMBER; - in.sign = arg_a < 0; - if (!arg_a) - { - in.class = CLASS_ZERO; - } - else - { - USItype uarg; - int shift; - in.normal_exp = FRACBITS + NGARDS; - if (in.sign) - { - /* Special case for minint, since there is no +ve integer - representation for it */ - if (arg_a == (- MAX_SI_INT - 1)) - { - return (FLO_type)(- MAX_SI_INT - 1); - } - uarg = (-arg_a); - } - else - uarg = arg_a; - - in.fraction.ll = uarg; - shift = clzusi (uarg) - (BITS_PER_SI - 1 - FRACBITS - NGARDS); - if (shift > 0) - { - in.fraction.ll <<= shift; - in.normal_exp -= shift; - } - } - return pack_d (&in); -} -#endif /* L_si_to_sf || L_si_to_df */ - -#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf) -FLO_type -usi_to_float (USItype arg_a) -{ - fp_number_type in; - - in.sign = 0; - if (!arg_a) - { - in.class = CLASS_ZERO; - } - else - { - int shift; - in.class = CLASS_NUMBER; - in.normal_exp = FRACBITS + NGARDS; - in.fraction.ll = arg_a; - - shift = clzusi (arg_a) - (BITS_PER_SI - 1 - FRACBITS - NGARDS); - if (shift < 0) - { - fractype guard = in.fraction.ll & (((fractype)1 << -shift) - 1); - in.fraction.ll >>= -shift; - in.fraction.ll |= (guard != 0); - in.normal_exp -= shift; - } - else if (shift > 0) - { - in.fraction.ll <<= shift; - in.normal_exp -= shift; - } - } - return pack_d (&in); -} -#endif - -#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si) -SItype -float_to_si (FLO_type arg_a) -{ - fp_number_type a; - SItype tmp; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &a); - - if (iszero (&a)) - return 0; - if (isnan (&a)) - return 0; - /* get reasonable MAX_SI_INT... */ - if (isinf (&a)) - return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT; - /* it is a number, but a small one */ - if (a.normal_exp < 0) - return 0; - if (a.normal_exp > BITS_PER_SI - 2) - return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT; - tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp); - return a.sign ? (-tmp) : (tmp); -} -#endif /* L_sf_to_si || L_df_to_si */ - -#if defined(L_tf_to_usi) -USItype -float_to_usi (FLO_type arg_a) -{ - fp_number_type a; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &a); - - if (iszero (&a)) - return 0; - if (isnan (&a)) - return 0; - /* it is a negative number */ - if (a.sign) - return 0; - /* get reasonable MAX_USI_INT... */ - if (isinf (&a)) - return MAX_USI_INT; - /* it is a number, but a small one */ - if (a.normal_exp < 0) - return 0; - if (a.normal_exp > BITS_PER_SI - 1) - return MAX_USI_INT; - else if (a.normal_exp > (FRACBITS + NGARDS)) - return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS)); - else - return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp); -} -#endif /* L_tf_to_usi */ - -#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf) -FLO_type -negate (FLO_type arg_a) -{ - fp_number_type a; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &a); - - flip_sign (&a); - return pack_d (&a); -} -#endif /* L_negate_sf || L_negate_df */ - -#ifdef FLOAT - -#if defined(L_make_sf) -SFtype -__make_fp(fp_class_type class, - unsigned int sign, - int exp, - USItype frac) -{ - fp_number_type in; - - in.class = class; - in.sign = sign; - in.normal_exp = exp; - in.fraction.ll = frac; - return pack_d (&in); -} -#endif /* L_make_sf */ - -#ifndef FLOAT_ONLY - -/* This enables one to build an fp library that supports float but not double. - Otherwise, we would get an undefined reference to __make_dp. - This is needed for some 8-bit ports that can't handle well values that - are 8-bytes in size, so we just don't support double for them at all. */ - -#if defined(L_sf_to_df) -DFtype -sf_to_df (SFtype arg_a) -{ - fp_number_type in; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - return __make_dp (in.class, in.sign, in.normal_exp, - ((UDItype) in.fraction.ll) << F_D_BITOFF); -} -#endif /* L_sf_to_df */ - -#if defined(L_sf_to_tf) && defined(TMODES) -TFtype -sf_to_tf (SFtype arg_a) -{ - fp_number_type in; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - return __make_tp (in.class, in.sign, in.normal_exp, - ((UTItype) in.fraction.ll) << F_T_BITOFF); -} -#endif /* L_sf_to_df */ - -#endif /* ! FLOAT_ONLY */ -#endif /* FLOAT */ - -#ifndef FLOAT - -extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype); - -#if defined(L_make_df) -DFtype -__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac) -{ - fp_number_type in; - - in.class = class; - in.sign = sign; - in.normal_exp = exp; - in.fraction.ll = frac; - return pack_d (&in); -} -#endif /* L_make_df */ - -#if defined(L_df_to_sf) -SFtype -df_to_sf (DFtype arg_a) -{ - fp_number_type in; - USItype sffrac; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - sffrac = in.fraction.ll >> F_D_BITOFF; - - /* We set the lowest guard bit in SFFRAC if we discarded any non - zero bits. */ - if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0) - sffrac |= 1; - - return __make_fp (in.class, in.sign, in.normal_exp, sffrac); -} -#endif /* L_df_to_sf */ - -#if defined(L_df_to_tf) && defined(TMODES) \ - && !defined(FLOAT) && !defined(TFLOAT) -TFtype -df_to_tf (DFtype arg_a) -{ - fp_number_type in; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - return __make_tp (in.class, in.sign, in.normal_exp, - ((UTItype) in.fraction.ll) << D_T_BITOFF); -} -#endif /* L_sf_to_df */ - -#ifdef TFLOAT -#if defined(L_make_tf) -TFtype -__make_tp(fp_class_type class, - unsigned int sign, - int exp, - UTItype frac) -{ - fp_number_type in; - - in.class = class; - in.sign = sign; - in.normal_exp = exp; - in.fraction.ll = frac; - return pack_d (&in); -} -#endif /* L_make_tf */ - -#if defined(L_tf_to_df) -DFtype -tf_to_df (TFtype arg_a) -{ - fp_number_type in; - UDItype sffrac; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - sffrac = in.fraction.ll >> D_T_BITOFF; - - /* We set the lowest guard bit in SFFRAC if we discarded any non - zero bits. */ - if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0) - sffrac |= 1; - - return __make_dp (in.class, in.sign, in.normal_exp, sffrac); -} -#endif /* L_tf_to_df */ - -#if defined(L_tf_to_sf) -SFtype -tf_to_sf (TFtype arg_a) -{ - fp_number_type in; - USItype sffrac; - FLO_union_type au; - - au.value = arg_a; - unpack_d (&au, &in); - - sffrac = in.fraction.ll >> F_T_BITOFF; - - /* We set the lowest guard bit in SFFRAC if we discarded any non - zero bits. */ - if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0) - sffrac |= 1; - - return __make_fp (in.class, in.sign, in.normal_exp, sffrac); -} -#endif /* L_tf_to_sf */ -#endif /* TFLOAT */ - -#endif /* ! FLOAT */ -#endif /* !EXTENDED_FLOAT_STUBS */ diff --git a/gcc/config/fp-bit.h b/gcc/config/fp-bit.h deleted file mode 100644 index f0b07e91fb6..00000000000 --- a/gcc/config/fp-bit.h +++ /dev/null @@ -1,499 +0,0 @@ -/* Header file for fp-bit.c. */ -/* Copyright (C) 2000, 2002, 2003, 2006, 2009, 2010 - Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#ifndef GCC_FP_BIT_H -#define GCC_FP_BIT_H - -/* Defining FINE_GRAINED_LIBRARIES allows one to select which routines - from this file are compiled via additional -D options. - - This avoids the need to pull in the entire fp emulation library - when only a small number of functions are needed. - - If FINE_GRAINED_LIBRARIES is not defined, then compile every - suitable routine. */ -#ifndef FINE_GRAINED_LIBRARIES -#define L_pack_df -#define L_unpack_df -#define L_pack_sf -#define L_unpack_sf -#define L_addsub_sf -#define L_addsub_df -#define L_mul_sf -#define L_mul_df -#define L_div_sf -#define L_div_df -#define L_fpcmp_parts_sf -#define L_fpcmp_parts_df -#define L_compare_sf -#define L_compare_df -#define L_eq_sf -#define L_eq_df -#define L_ne_sf -#define L_ne_df -#define L_gt_sf -#define L_gt_df -#define L_ge_sf -#define L_ge_df -#define L_lt_sf -#define L_lt_df -#define L_le_sf -#define L_le_df -#define L_unord_sf -#define L_unord_df -#define L_usi_to_sf -#define L_usi_to_df -#define L_si_to_sf -#define L_si_to_df -#define L_sf_to_si -#define L_df_to_si -#define L_f_to_usi -#define L_df_to_usi -#define L_negate_sf -#define L_negate_df -#define L_make_sf -#define L_make_df -#define L_sf_to_df -#define L_df_to_sf -#ifdef FLOAT -#define L_thenan_sf -#else -#define L_thenan_df -#endif -#endif /* ! FINE_GRAINED_LIBRARIES */ - -#if __LDBL_MANT_DIG__ == 113 || __LDBL_MANT_DIG__ == 106 -# if defined(TFLOAT) || defined(L_sf_to_tf) || defined(L_df_to_tf) -# define TMODES -# endif -#endif - -typedef float SFtype __attribute__ ((mode (SF))); -typedef float DFtype __attribute__ ((mode (DF))); -#ifdef TMODES -typedef float TFtype __attribute__ ((mode (TF))); -#endif - -typedef int HItype __attribute__ ((mode (HI))); -typedef int SItype __attribute__ ((mode (SI))); -typedef int DItype __attribute__ ((mode (DI))); -#ifdef TMODES -typedef int TItype __attribute__ ((mode (TI))); -#endif - -/* The type of the result of a floating point comparison. This must - match `__libgcc_cmp_return__' in GCC for the target. */ -#ifndef CMPtype -typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); -#endif - -typedef unsigned int UHItype __attribute__ ((mode (HI))); -typedef unsigned int USItype __attribute__ ((mode (SI))); -typedef unsigned int UDItype __attribute__ ((mode (DI))); -#ifdef TMODES -typedef unsigned int UTItype __attribute__ ((mode (TI))); -#endif - -#define MAX_USI_INT (~(USItype)0) -#define MAX_SI_INT ((SItype) (MAX_USI_INT >> 1)) -#define BITS_PER_SI (4 * BITS_PER_UNIT) -#ifdef TMODES -#define MAX_UDI_INT (~(UDItype)0) -#define MAX_DI_INT ((DItype) (MAX_UDI_INT >> 1)) -#define BITS_PER_DI (8 * BITS_PER_UNIT) -#endif - -#ifdef FLOAT_ONLY -#define NO_DI_MODE -#endif - -#ifdef TFLOAT -# ifndef TMODES -# error "TFLOAT requires long double to have 113 bits of mantissa" -# endif - -# define PREFIXFPDP tp -# define PREFIXSFDF tf -# define NGARDS 10L /* Is this right? */ -# define GARDROUND 0x1ff -# define GARDMASK 0x3ff -# define GARDMSB 0x200 -# define FRAC_NBITS 128 - -# if __LDBL_MANT_DIG__ == 113 /* IEEE quad */ -# define EXPBITS 15 -# define EXPBIAS 16383 -# define EXPMAX (0x7fff) -# define QUIET_NAN ((TItype)0x8 << 108) -# define FRACHIGH ((TItype)0x8 << 124) -# define FRACHIGH2 ((TItype)0xc << 124) -# define FRACBITS 112 -# endif - -# if __LDBL_MANT_DIG__ == 106 /* IBM extended (double+double) */ -# define EXPBITS 11 -# define EXPBIAS 1023 -# define EXPMAX (0x7ff) -# define QUIET_NAN ((TItype)0x8 << (48 + 64)) -# define FRACHIGH ((TItype)0x8 << 124) -# define FRACHIGH2 ((TItype)0xc << 124) -# define FRACBITS 105 -# define HALFFRACBITS 52 -# define HALFSHIFT 64 -# endif - -# define pack_d __pack_t -# define unpack_d __unpack_t -# define __fpcmp_parts __fpcmp_parts_t - typedef UTItype fractype; - typedef UDItype halffractype; - typedef USItype qrtrfractype; -#define qrtrfractype qrtrfractype - typedef TFtype FLO_type; - typedef TItype intfrac; -#elif defined FLOAT -# define NGARDS 7L -# define GARDROUND 0x3f -# define GARDMASK 0x7f -# define GARDMSB 0x40 -# define EXPBITS 8 -# define EXPBIAS 127 -# define FRACBITS 23 -# define EXPMAX (0xff) -# define QUIET_NAN 0x100000L -# define FRAC_NBITS 32 -# define FRACHIGH 0x80000000L -# define FRACHIGH2 0xc0000000L -# define pack_d __pack_f -# define unpack_d __unpack_f -# define __fpcmp_parts __fpcmp_parts_f - typedef USItype fractype; - typedef UHItype halffractype; - typedef SFtype FLO_type; - typedef SItype intfrac; - -#else -# define PREFIXFPDP dp -# define PREFIXSFDF df -# define NGARDS 8L -# define GARDROUND 0x7f -# define GARDMASK 0xff -# define GARDMSB 0x80 -# define EXPBITS 11 -# define EXPBIAS 1023 -# define FRACBITS 52 -# define EXPMAX (0x7ff) -# define QUIET_NAN 0x8000000000000LL -# define FRAC_NBITS 64 -# define FRACHIGH 0x8000000000000000LL -# define FRACHIGH2 0xc000000000000000LL -# define pack_d __pack_d -# define unpack_d __unpack_d -# define __fpcmp_parts __fpcmp_parts_d - typedef UDItype fractype; - typedef USItype halffractype; - typedef DFtype FLO_type; - typedef DItype intfrac; -#endif /* FLOAT */ - -#ifdef TFLOAT -# define add __addtf3 -# define sub __subtf3 -# define multiply __multf3 -# define divide __divtf3 -# define compare __cmptf2 -# define _eq_f2 __eqtf2 -# define _ne_f2 __netf2 -# define _gt_f2 __gttf2 -# define _ge_f2 __getf2 -# define _lt_f2 __lttf2 -# define _le_f2 __letf2 -# define _unord_f2 __unordtf2 -# define usi_to_float __floatunsitf -# define si_to_float __floatsitf -# define float_to_si __fixtfsi -# define float_to_usi __fixunstfsi -# define negate __negtf2 -# define tf_to_sf __trunctfsf2 -# define tf_to_df __trunctfdf2 -#elif defined FLOAT -# define add __addsf3 -# define sub __subsf3 -# define multiply __mulsf3 -# define divide __divsf3 -# define compare __cmpsf2 -# define _eq_f2 __eqsf2 -# define _ne_f2 __nesf2 -# define _gt_f2 __gtsf2 -# define _ge_f2 __gesf2 -# define _lt_f2 __ltsf2 -# define _le_f2 __lesf2 -# define _unord_f2 __unordsf2 -# define usi_to_float __floatunsisf -# define si_to_float __floatsisf -# define float_to_si __fixsfsi -# define float_to_usi __fixunssfsi -# define negate __negsf2 -# define sf_to_df __extendsfdf2 -# define sf_to_tf __extendsftf2 -#else -# define add __adddf3 -# define sub __subdf3 -# define multiply __muldf3 -# define divide __divdf3 -# define compare __cmpdf2 -# define _eq_f2 __eqdf2 -# define _ne_f2 __nedf2 -# define _gt_f2 __gtdf2 -# define _ge_f2 __gedf2 -# define _lt_f2 __ltdf2 -# define _le_f2 __ledf2 -# define _unord_f2 __unorddf2 -# define usi_to_float __floatunsidf -# define si_to_float __floatsidf -# define float_to_si __fixdfsi -# define float_to_usi __fixunsdfsi -# define negate __negdf2 -# define df_to_sf __truncdfsf2 -# define df_to_tf __extenddftf2 -#endif /* FLOAT */ - -#ifndef INLINE -#define INLINE __inline__ -#endif - -/* Preserve the sticky-bit when shifting fractions to the right. */ -#define LSHIFT(a, s) { a = (a >> s) | !!(a & (((fractype) 1 << s) - 1)); } - -/* numeric parameters */ -/* F_D_BITOFF is the number of bits offset between the MSB of the mantissa - of a float and of a double. Assumes there are only two float types. - (double::FRAC_BITS+double::NGARDS-(float::FRAC_BITS-float::NGARDS)) - */ -#define F_D_BITOFF (52+8-(23+7)) - -#ifdef TMODES -# define F_T_BITOFF (__LDBL_MANT_DIG__-1+10-(23+7)) -# define D_T_BITOFF (__LDBL_MANT_DIG__-1+10-(52+8)) -#endif - - -#define NORMAL_EXPMIN (-(EXPBIAS)+1) -#define IMPLICIT_1 ((fractype)1<<(FRACBITS+NGARDS)) -#define IMPLICIT_2 ((fractype)1<<(FRACBITS+1+NGARDS)) - -/* common types */ - -typedef enum -{ - CLASS_SNAN, - CLASS_QNAN, - CLASS_ZERO, - CLASS_NUMBER, - CLASS_INFINITY -} fp_class_type; - -typedef struct -{ -#ifdef SMALL_MACHINE - char class; - unsigned char sign; - short normal_exp; -#else - fp_class_type class; - unsigned int sign; - int normal_exp; -#endif - - union - { - fractype ll; - halffractype l[2]; - } fraction; -} fp_number_type; - -typedef union -{ - FLO_type value; - fractype value_raw; - -#ifndef FLOAT -# ifdef qrtrfractype - qrtrfractype qwords[4]; -# else - halffractype words[2]; -# endif -#endif - -#ifdef FLOAT_BIT_ORDER_MISMATCH - struct - { - fractype fraction:FRACBITS __attribute__ ((packed)); - unsigned int exp:EXPBITS __attribute__ ((packed)); - unsigned int sign:1 __attribute__ ((packed)); - } - bits; -#endif - -#ifdef _DEBUG_BITFLOAT - struct - { - unsigned int sign:1 __attribute__ ((packed)); - unsigned int exp:EXPBITS __attribute__ ((packed)); - fractype fraction:FRACBITS __attribute__ ((packed)); - } - bits_big_endian; - - struct - { - fractype fraction:FRACBITS __attribute__ ((packed)); - unsigned int exp:EXPBITS __attribute__ ((packed)); - unsigned int sign:1 __attribute__ ((packed)); - } - bits_little_endian; -#endif -} -FLO_union_type; - -/* Prototypes. */ - -#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf) -extern FLO_type pack_d (const fp_number_type *); -#endif - -extern void unpack_d (FLO_union_type *, fp_number_type *); - -#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf) -extern FLO_type add (FLO_type, FLO_type); -extern FLO_type sub (FLO_type, FLO_type); -#endif - -#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf) -extern FLO_type multiply (FLO_type, FLO_type); -#endif - -#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf) -extern FLO_type divide (FLO_type, FLO_type); -#endif - -extern int __fpcmp_parts (fp_number_type *, fp_number_type *); - -#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compare_tf) -extern CMPtype compare (FLO_type, FLO_type); -#endif - -#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf) -extern CMPtype _eq_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf) -extern CMPtype _ne_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf) -extern CMPtype _gt_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf) -extern CMPtype _ge_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf) -extern CMPtype _lt_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf) -extern CMPtype _le_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf) -extern CMPtype _unord_f2 (FLO_type, FLO_type); -#endif - -#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf) -extern FLO_type si_to_float (SItype); -#endif - -#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si) -extern SItype float_to_si (FLO_type); -#endif - -#if defined(L_tf_to_usi) -extern USItype float_to_usi (FLO_type); -#endif - -#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf) -extern FLO_type usi_to_float (USItype); -#endif - -#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf) -extern FLO_type negate (FLO_type); -#endif - -#ifdef FLOAT -#if defined(L_make_sf) -extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype); -#endif -#ifndef FLOAT_ONLY -extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype); -#if defined(L_sf_to_df) -extern DFtype sf_to_df (SFtype); -#endif -#if defined(L_sf_to_tf) && defined(TMODES) -extern TFtype sf_to_tf (SFtype); -#endif -#endif /* ! FLOAT_ONLY */ -#endif /* FLOAT */ - -#ifndef FLOAT -extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype); -#if defined(L_make_df) -extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype); -#endif -#if defined(L_df_to_sf) -extern SFtype df_to_sf (DFtype); -#endif -#if defined(L_df_to_tf) && defined(TMODES) -extern TFtype df_to_tf (DFtype); -#endif -#endif /* ! FLOAT */ - -#ifdef TMODES -extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype); -extern TFtype __make_tp (fp_class_type, unsigned int, int, UTItype); -#ifdef TFLOAT -#if defined(L_tf_to_sf) -extern SFtype tf_to_sf (TFtype); -#endif -#if defined(L_tf_to_df) -extern DFtype tf_to_df (TFtype); -#endif -#if defined(L_di_to_tf) -extern TFtype di_to_df (DItype); -#endif -#endif /* TFLOAT */ -#endif /* TMODES */ - -#endif /* ! GCC_FP_BIT_H */ diff --git a/gcc/config/fr30/t-fr30 b/gcc/config/fr30/t-fr30 index 0270292231c..fa786d6e50a 100644 --- a/gcc/config/fr30/t-fr30 +++ b/gcc/config/fr30/t-fr30 @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001, 2007, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -26,22 +26,10 @@ $(T)crti.o: $(srcdir)/config/fr30/crti.asm $(GCC_PASSES) $(T)crtn.o: $(srcdir)/config/fr30/crtn.asm $(GCC_PASSES) $(GCC_FOR_TARGET) -c -o $(T)crtn.o -x assembler $(srcdir)/config/fr30/crtn.asm -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - # If any special flags are necessary when building libgcc2 put them here. # # TARGET_LIBGCC2_CFLAGS -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # Enable the following if multilibs are needed. # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a # description of the options and their values. diff --git a/gcc/config/frv/t-frv b/gcc/config/frv/t-frv index 2729008879c..395a679747a 100644 --- a/gcc/config/frv/t-frv +++ b/gcc/config/frv/t-frv @@ -27,23 +27,9 @@ LIB1ASMSRC = frv/lib1funcs.asm LIB1ASMFUNCS = _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov LIB2FUNCS_EXTRA = cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - # If any special flags are necessary when building libgcc2 put them here. TARGET_LIBGCC2_CFLAGS = -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#include "config/frv/frv-abi.h"' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#include "config/frv/frv-abi.h"' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - cmovh.c: $(srcdir)/config/frv/cmovh.c $(LN_S) $(srcdir)/config/frv/cmovh.c . diff --git a/gcc/config/h8300/t-h8300 b/gcc/config/h8300/t-h8300 index 57015788748..616849007b4 100644 --- a/gcc/config/h8300/t-h8300 +++ b/gcc/config/h8300/t-h8300 @@ -1,5 +1,5 @@ # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, -# 2004 Free Software Foundation, Inc. +# 2004, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -31,21 +31,6 @@ LIB2FUNCS_EXTRA = \ # We do not have DF type, so fake out the libgcc2 compilation. TARGET_LIBGCC2_CFLAGS = -DDF=SF -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#define FLOAT_ONLY' >> fp-bit.c - echo '#define SMALL_MACHINE' >> fp-bit.c - echo '#ifdef __H8300__' >> fp-bit.c - echo '#define CMPtype HItype' >> fp-bit.c - echo '#else' >> fp-bit.c - echo '#define CMPtype SItype' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - MULTILIB_OPTIONS = mh/ms/msx mn mint32 MULTILIB_DIRNAMES = h8300h h8300s h8sx normal int32 MULTILIB_EXCEPTIONS = mint32 mn mn/mint32 diff --git a/gcc/config/iq2000/t-iq2000 b/gcc/config/iq2000/t-iq2000 index 0f28f7458c0..03d8c703f86 100644 --- a/gcc/config/iq2000/t-iq2000 +++ b/gcc/config/iq2000/t-iq2000 @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -23,18 +23,6 @@ CROSS_LIBGCC1 = LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/divmod.c $(srcdir)/config/udivmodsi4.c $(srcdir)/config/iq2000/lib2extra-funcs.c -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # Enable the following if multilibs are needed. # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a # description of the options and their values. diff --git a/gcc/config/m32c/t-m32c b/gcc/config/m32c/t-m32c index 30b8f6f0b45..e39fdf3a0aa 100644 --- a/gcc/config/m32c/t-m32c +++ b/gcc/config/m32c/t-m32c @@ -1,5 +1,5 @@ # Target Makefile Fragment for R8C/M16C/M32C -# Copyright (C) 2005, 2006, 2007, 2008, 2009 +# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 # Free Software Foundation, Inc. # Contributed by Red Hat. # @@ -31,18 +31,6 @@ LIB1ASMFUNCS = \ LIB2FUNCS_EXTRA = $(srcdir)/config/m32c/m32c-lib2.c $(srcdir)/config/m32c/m32c-lib2-trapv.c -# floating point emulation libraries - -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # target-specific files md_file = md diff --git a/gcc/config/m32r/t-linux b/gcc/config/m32r/t-linux index dc8c8c4d267..6de9c781a67 100644 --- a/gcc/config/m32r/t-linux +++ b/gcc/config/m32r/t-linux @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2009, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -19,23 +19,11 @@ # lib1funcs.asm is currently empty. CROSS_LIBGCC1 = -# These are really part of libgcc1, but this will cause them to be -# built correctly, so... - -LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c - # Turn off the SDA while compiling libgcc2. There are no headers for it # and we want maximal upward compatibility here. TARGET_LIBGCC2_CFLAGS = -G 0 -fPIC -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # We need to use -fpic when we are using gcc to compile the routines in # initfini.c. This is only really needed when we are going to use gcc/g++ # to produce a shared library, but since we don't know ahead of time when diff --git a/gcc/config/m32r/t-m32r b/gcc/config/m32r/t-m32r index 17e1e3145c5..44090658838 100644 --- a/gcc/config/m32r/t-m32r +++ b/gcc/config/m32r/t-m32r @@ -1,4 +1,5 @@ -# Copyright (C) 1997, 1998, 1999, 2001, 2003 Free Software Foundation, Inc. +# Copyright (C) 1997, 1998, 1999, 2001, 2003, 2011 +# Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,23 +17,11 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - # Turn off the SDA while compiling libgcc2. There are no headers for it # and we want maximal upward compatibility here. TARGET_LIBGCC2_CFLAGS = -G 0 -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # We need to use -fpic when we are using gcc to compile the routines in # initfini.c. This is only really needed when we are going to use gcc/g++ # to produce a shared library, but since we don't know ahead of time when diff --git a/gcc/config/mcore/t-mcore b/gcc/config/mcore/t-mcore index 8277239688e..5533211a5d2 100644 --- a/gcc/config/mcore/t-mcore +++ b/gcc/config/mcore/t-mcore @@ -1,4 +1,4 @@ -# Copyright (C) 2000, 2001, 2008 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -28,22 +28,6 @@ $(T)crtn.o: $(srcdir)/config/mcore/crtn.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mcore/crtn.asm -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/mcore/t-mcore - rm -f dp-bit.c - echo '' > dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/mcore/t-mcore - rm -f fp-bit.c - echo '' > fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # could use -msifilter to be safe from interrupt/jmp interactions and others. TARGET_LIBGCC2_CFLAGS=-O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter diff --git a/gcc/config/mep/t-mep b/gcc/config/mep/t-mep index fac6dad4239..29c75457241 100644 --- a/gcc/config/mep/t-mep +++ b/gcc/config/mep/t-mep @@ -1,6 +1,6 @@ # -*- makefile -*- # GCC makefile fragment for MeP -# Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010 +# Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010, 2011 # Free Software Foundation, Inc. # Contributed by Red Hat Inc # @@ -54,18 +54,6 @@ LIB2FUNCS_EXTRA = \ $(srcdir)/config/mep/mep-lib2.c \ $(srcdir)/config/mep/mep-tramp.c -# floating point emulation libraries - -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - MULTILIB_OPTIONS = mel mall-opts mfar MULTILIB_DIRNAMES = el allopt far diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze index 021dbbe3e76..8c8767f9baa 100644 --- a/gcc/config/microblaze/t-microblaze +++ b/gcc/config/microblaze/t-microblaze @@ -14,17 +14,6 @@ microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/microblaze/microblaze-c.c -# Build soft FP routines. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - # Assemble startup files $(T)crti$(objext): $(srcdir)/config/microblaze/crti.s $(GCC_FOR_TARGET) -c $(srcdir)/config/microblaze/crti.s -o $(T)crti$(objext) diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 index 326e6465afe..e23743d3cb0 100644 --- a/gcc/config/mips/t-linux64 +++ b/gcc/config/mips/t-linux64 @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -25,15 +25,3 @@ endif MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o - -TPBIT = tp-bit.c - -tp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > tp-bit.c - echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c - echo '#endif' >> tp-bit.c - echo '#if __LDBL_MANT_DIG__ == 113' >> tp-bit.c - echo '#define QUIET_NAN_NEGATED' >> tp-bit.c - echo '# define TFLOAT' >> tp-bit.c - cat $(srcdir)/config/fp-bit.c >> tp-bit.c - echo '#endif' >> tp-bit.c diff --git a/gcc/config/mips/t-mips b/gcc/config/mips/t-mips index 521738a9445..53993e9d3c0 100644 --- a/gcc/config/mips/t-mips +++ b/gcc/config/mips/t-mips @@ -16,28 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# fp-bit and dp-bit are really part of libgcc1, but this will cause -# them to be built correctly, so... [taken from t-sparclite] -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - echo '#define QUIET_NAN_NEGATED' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - echo '#define QUIET_NAN_NEGATED' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - LIB2_SIDITI_CONV_FUNCS=yes $(srcdir)/config/mips/mips-tables.opt: $(srcdir)/config/mips/genopt.sh \ diff --git a/gcc/config/mips/t-sdemtk b/gcc/config/mips/t-sdemtk index 40a8294fd6b..decbcf3101c 100644 --- a/gcc/config/mips/t-sdemtk +++ b/gcc/config/mips/t-sdemtk @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -38,7 +38,3 @@ stmp-sdefixinc: gsyslimits.h cp $(srcdir)/gsyslimits.h include/syslimits.h chmod a+r include/syslimits.h $(STAMP) stmp-sdefixinc - -# Don't build FPBIT and DPBIT; we'll be using the SDE soft-float library. -FPBIT = -DPBIT = diff --git a/gcc/config/mips/t-sr71k b/gcc/config/mips/t-sr71k index 5eb96a12e43..44b69402e62 100644 --- a/gcc/config/mips/t-sr71k +++ b/gcc/config/mips/t-sr71k @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -38,26 +38,6 @@ $(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) # without the $gp register. TARGET_LIBGCC2_CFLAGS = -G 0 -# fp-bit and dp-bit are really part of libgcc1, but this will cause -# them to be built correctly, so... [taken from t-sparclite] -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __MIPSEL__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for both hard and soft floating point MULTILIB_OPTIONS = EL/EB msoft-float mips2 diff --git a/gcc/config/mn10300/t-linux b/gcc/config/mn10300/t-linux deleted file mode 100644 index 61ed88e663e..00000000000 --- a/gcc/config/mn10300/t-linux +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2003 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff --git a/gcc/config/mn10300/t-mn10300 b/gcc/config/mn10300/t-mn10300 index eeefeb602a2..c62c56f2013 100644 --- a/gcc/config/mn10300/t-mn10300 +++ b/gcc/config/mn10300/t-mn10300 @@ -1,5 +1,5 @@ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, -# 2003, 2010 Free Software Foundation, Inc. +# 2003, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,18 +17,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - MULTILIB_OPTIONS = mam33/mam33-2/mam34 MULTILIB_DIRNAMES = am33 am33-2 am34 diff --git a/gcc/config/pdp11/t-pdp11 b/gcc/config/pdp11/t-pdp11 index 67441a0d20e..032084b381b 100644 --- a/gcc/config/pdp11/t-pdp11 +++ b/gcc/config/pdp11/t-pdp11 @@ -1,5 +1,5 @@ # Copyright (C) 1995, 1997, 1998, 2001, 2002, -# 2004, 2010 Free Software Foundation, Inc. +# 2004, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -21,17 +21,6 @@ TARGET_LIBGCC2_CFLAGS = -O2 -mfloat32 LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/udivmodsi4.c \ $(srcdir)/config/memcmp.c $(srcdir)/config/memcpy.c \ $(srcdir)/config/memmove.c $(srcdir)/config/memset.c -# floating point emulation libraries - -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c MULTILIB_OPTIONS = msoft-float diff --git a/gcc/config/picochip/t-picochip b/gcc/config/picochip/t-picochip index 4df74a01fc6..222d7a646b9 100644 --- a/gcc/config/picochip/t-picochip +++ b/gcc/config/picochip/t-picochip @@ -61,16 +61,3 @@ MULTILIB_OPTIONS = mmul-type=none/mmul-type=mac/mmul-type=mul mno-byte-access/mb # Using a mul unit (currently) implies that byte access is available. MULTILIB_EXCEPTIONS = mmul-type=mul/mno-byte-access - -# We want fine grained libraries, so use the new code -# to build the floating point emulation libraries. -FPBIT = fp-bit.c - -# Software floating point support. Floating point is not properly -# supported, but is existence can be useful for some types of testing. -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#define FLOAT_ONLY' >> fp-bit.c - echo '#define SMALL_MACHINE' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - diff --git a/gcc/config/rs6000/ppc64-fp.c b/gcc/config/rs6000/ppc64-fp.c deleted file mode 100644 index 62861ee16fd..00000000000 --- a/gcc/config/rs6000/ppc64-fp.c +++ /dev/null @@ -1,239 +0,0 @@ -/* Functions needed for soft-float on powerpc64-linux, copied from - libgcc2.c with macros expanded to force the use of specific types. - - Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2006, 2009 Free Software Foundation, - Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 3, or (at your option) any later -version. - -GCC is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -#if defined(__powerpc64__) || defined (__64BIT__) || defined(__ppc64__) -#define TMODES -#include "config/fp-bit.h" - -extern DItype __fixtfdi (TFtype); -extern DItype __fixdfdi (DFtype); -extern DItype __fixsfdi (SFtype); -extern USItype __fixunsdfsi (DFtype); -extern USItype __fixunssfsi (SFtype); -extern TFtype __floatditf (DItype); -extern TFtype __floatunditf (UDItype); -extern DFtype __floatdidf (DItype); -extern DFtype __floatundidf (UDItype); -extern SFtype __floatdisf (DItype); -extern SFtype __floatundisf (UDItype); -extern DItype __fixunstfdi (TFtype); - -static DItype local_fixunssfdi (SFtype); -static DItype local_fixunsdfdi (DFtype); - -DItype -__fixtfdi (TFtype a) -{ - if (a < 0) - return - __fixunstfdi (-a); - return __fixunstfdi (a); -} - -DItype -__fixdfdi (DFtype a) -{ - if (a < 0) - return - local_fixunsdfdi (-a); - return local_fixunsdfdi (a); -} - -DItype -__fixsfdi (SFtype a) -{ - if (a < 0) - return - local_fixunssfdi (-a); - return local_fixunssfdi (a); -} - -USItype -__fixunsdfsi (DFtype a) -{ - if (a >= - (DFtype) (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) - return (SItype) (a + (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) - - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1); - return (SItype) a; -} - -USItype -__fixunssfsi (SFtype a) -{ - if (a >= - (SFtype) (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) - return (SItype) (a + (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1)) - - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 1); - return (SItype) a; -} - -TFtype -__floatditf (DItype u) -{ - DFtype dh, dl; - - dh = (SItype) (u >> (sizeof (SItype) * 8)); - dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return (TFtype) dh + (TFtype) dl; -} - -TFtype -__floatunditf (UDItype u) -{ - DFtype dh, dl; - - dh = (USItype) (u >> (sizeof (SItype) * 8)); - dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return (TFtype) dh + (TFtype) dl; -} - -DFtype -__floatdidf (DItype u) -{ - DFtype d; - - d = (SItype) (u >> (sizeof (SItype) * 8)); - d *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return d; -} - -DFtype -__floatundidf (UDItype u) -{ - DFtype d; - - d = (USItype) (u >> (sizeof (SItype) * 8)); - d *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return d; -} - -SFtype -__floatdisf (DItype u) -{ - DFtype f; - - if (53 < (sizeof (DItype) * 8) - && 53 > ((sizeof (DItype) * 8) - 53 + 24)) - { - if (! (- ((DItype) 1 << 53) < u - && u < ((DItype) 1 << 53))) - { - if ((UDItype) u & (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1)) - { - u &= ~ (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1); - u |= ((UDItype) 1 << ((sizeof (DItype) * 8) - 53)); - } - } - } - f = (SItype) (u >> (sizeof (SItype) * 8)); - f *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - f += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return (SFtype) f; -} - -SFtype -__floatundisf (UDItype u) -{ - DFtype f; - - if (53 < (sizeof (DItype) * 8) - && 53 > ((sizeof (DItype) * 8) - 53 + 24)) - { - if (u >= ((UDItype) 1 << 53)) - { - if ((UDItype) u & (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1)) - { - u &= ~ (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1); - u |= ((UDItype) 1 << ((sizeof (DItype) * 8) - 53)); - } - } - } - f = (USItype) (u >> (sizeof (SItype) * 8)); - f *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); - f += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); - - return (SFtype) f; -} - -DItype -__fixunstfdi (TFtype a) -{ - if (a < 0) - return 0; - - /* Compute high word of result, as a flonum. */ - const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8))); - /* Convert that to fixed (but not to DItype!), - and shift it into the high word. */ - UDItype v = (USItype) b; - v <<= (sizeof (SItype) * 8); - /* Remove high part from the TFtype, leaving the low part as flonum. */ - a -= (TFtype) v; - /* Convert that to fixed (but not to DItype!) and add it in. - Sometimes A comes out negative. This is significant, since - A has more bits than a long int does. */ - if (a < 0) - v -= (USItype) (-a); - else - v += (USItype) a; - return v; -} - -/* This version is needed to prevent recursion; fixunsdfdi in libgcc - calls fixdfdi, which in turn calls calls fixunsdfdi. */ - -static DItype -local_fixunsdfdi (DFtype a) -{ - USItype hi, lo; - - hi = a / (((UDItype) 1) << (sizeof (SItype) * 8)); - lo = (a - ((DFtype) hi) * (((UDItype) 1) << (sizeof (SItype) * 8))); - return ((UDItype) hi << (sizeof (SItype) * 8)) | lo; -} - -/* This version is needed to prevent recursion; fixunssfdi in libgcc - calls fixsfdi, which in turn calls calls fixunssfdi. */ - -static DItype -local_fixunssfdi (SFtype original_a) -{ - DFtype a = original_a; - USItype hi, lo; - - hi = a / (((UDItype) 1) << (sizeof (SItype) * 8)); - lo = (a - ((DFtype) hi) * (((UDItype) 1) << (sizeof (SItype) * 8))); - return ((UDItype) hi << (sizeof (SItype) * 8)) | lo; -} - -#endif /* __powerpc64__ */ diff --git a/gcc/config/rs6000/t-aix43 b/gcc/config/rs6000/t-aix43 index 705e053122d..4e38ece4678 100644 --- a/gcc/config/rs6000/t-aix43 +++ b/gcc/config/rs6000/t-aix43 @@ -1,5 +1,5 @@ # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -# 2006 Free Software Foundation, Inc. +# 2006, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,18 +17,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for pthread and all of the # different processor models @@ -86,8 +74,7 @@ SHLIB_MAPFILES = $$(libgcc_objdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc SHLIB_NM_FLAGS = -Bpg -X32_64 # GCC 128-bit long double support routines. -LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/ppc64-fp.c \ - $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c TARGET_LIBGCC2_CFLAGS = -mlong-double-128 # Either 32-bit and 64-bit objects in archives. diff --git a/gcc/config/rs6000/t-aix52 b/gcc/config/rs6000/t-aix52 index e918a2e13a1..3ef61e9cf0f 100644 --- a/gcc/config/rs6000/t-aix52 +++ b/gcc/config/rs6000/t-aix52 @@ -1,5 +1,5 @@ # Copyright (C) 2002, 2003, 2004, 2005, 2006, -# 2008 Free Software Foundation, Inc. +# 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,18 +17,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build the libraries for pthread and all of the # different processor models @@ -67,8 +55,7 @@ SHLIB_MAPFILES = $$(libgcc_objdir)/libgcc-std.ver $(srcdir)/config/rs6000/libgcc SHLIB_NM_FLAGS = -Bpg -X32_64 # GCC 128-bit long double support routines. -LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/ppc64-fp.c \ - $(srcdir)/config/rs6000/darwin-ldouble.c +LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c TARGET_LIBGCC2_CFLAGS = -mlong-double-128 # Either 32-bit and 64-bit objects in archives. diff --git a/gcc/config/rs6000/t-darwin b/gcc/config/rs6000/t-darwin index 27fc07b69b3..4ba07a14867 100644 --- a/gcc/config/rs6000/t-darwin +++ b/gcc/config/rs6000/t-darwin @@ -18,7 +18,6 @@ # <http://www.gnu.org/licenses/>. LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-tramp.asm \ - $(srcdir)/config/rs6000/ppc64-fp.c \ $(srcdir)/config/darwin-64.c \ $(srcdir)/config/rs6000/darwin-ldouble.c \ $(srcdir)/config/rs6000/darwin-world.asm diff --git a/gcc/config/rs6000/t-fprules-fpbit b/gcc/config/rs6000/t-fprules-fpbit deleted file mode 100644 index a6c7246fa93..00000000000 --- a/gcc/config/rs6000/t-fprules-fpbit +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 index 6a2235ff11a..3ae05fdad7b 100644 --- a/gcc/config/rs6000/t-linux64 +++ b/gcc/config/rs6000/t-linux64 @@ -1,7 +1,7 @@ #rs6000/t-linux64 # Copyright (C) 2002, 2003, 2004, 2006, 2007, -# 2009 Free Software Foundation, Inc. +# 2009, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -19,9 +19,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -LIB2FUNCS_EXTRA += $(srcdir)/config/rs6000/ppc64-fp.c -LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA)) - TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc # On Debian, Ubuntu and other derivative distributions, the 32bit libraries diff --git a/gcc/config/rs6000/t-lynx b/gcc/config/rs6000/t-lynx index 4befd5e7df5..768856e06eb 100644 --- a/gcc/config/rs6000/t-lynx +++ b/gcc/config/rs6000/t-lynx @@ -1,4 +1,4 @@ -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -21,16 +21,6 @@ LIB2FUNCS_EXTRA = tramp.S tramp.S: $(srcdir)/config/rs6000/tramp.asm cat $(srcdir)/config/rs6000/tramp.asm > tramp.S -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/rs6000/t-spe b/gcc/config/rs6000/t-spe index 480553c50ed..cbbac79f661 100644 --- a/gcc/config/rs6000/t-spe +++ b/gcc/config/rs6000/t-spe @@ -18,16 +18,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/sh/t-netbsd b/gcc/config/sh/t-netbsd index b2794a00645..11bfe31458e 100644 --- a/gcc/config/sh/t-netbsd +++ b/gcc/config/sh/t-netbsd @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2004, 2009 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2009, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -22,10 +22,3 @@ LIB1ASMFUNCS_CACHE = _ic_invalidate LIB2FUNCS_EXTRA= EXTRA_MULTILIB_PARTS= - -# NetBSD's C library includes a fast software FP library that -# has support for setting/setting the rounding mode, exception -# mask, etc. Therefore, we don't want to include software FP -# in libgcc. -FPBIT = -DPBIT = diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh index 27cbd3d3e88..e63131a5348 100644 --- a/gcc/config/sh/t-sh +++ b/gcc/config/sh/t-sh @@ -31,24 +31,6 @@ LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array TARGET_LIBGCC2_CFLAGS = -mieee -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - DEFAULT_ENDIAN = $(word 1,$(TM_ENDIAN_CONFIG)) OTHER_ENDIAN = $(word 2,$(TM_ENDIAN_CONFIG)) diff --git a/gcc/config/sparc/t-elf b/gcc/config/sparc/t-elf index 962d0009f9b..7073bcb7721 100644 --- a/gcc/config/sparc/t-elf +++ b/gcc/config/sparc/t-elf @@ -20,18 +20,6 @@ LIB1ASMSRC = sparc/lb1spc.asm LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - MULTILIB_OPTIONS = msoft-float mcpu=v8 mflat MULTILIB_DIRNAMES = soft v8 flat MULTILIB_MATCHES = msoft-float=mno-fpu diff --git a/gcc/config/sparc/t-leon b/gcc/config/sparc/t-leon index e3ab3bc9893..4f9d0a9e797 100644 --- a/gcc/config/sparc/t-leon +++ b/gcc/config/sparc/t-leon @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -19,18 +19,6 @@ LIB1ASMSRC = sparc/lb1spc.asm LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Multilibs for LEON # LEON is a SPARC-V8, but the AT697 implementation has a bug in the # V8-specific instructions. diff --git a/gcc/config/sparc/t-leon3 b/gcc/config/sparc/t-leon3 index ce57d16751b..0e7e45cc594 100644 --- a/gcc/config/sparc/t-leon3 +++ b/gcc/config/sparc/t-leon3 @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,18 +16,6 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Multilibs for LEON3 MULTILIB_OPTIONS = msoft-float MULTILIB_DIRNAMES = soft diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf index ab680f5be88..3f9510112f7 100644 --- a/gcc/config/spu/t-spu-elf +++ b/gcc/config/spu/t-spu-elf @@ -30,10 +30,6 @@ TARGET_LIBGCC2_CFLAGS = -fPIC -mwarn-reloc -D__IN_LIBGCC2 # own versions below and/or via direct expansion. LIB2FUNCS_EXCLUDE = _floatdisf _floatundisf _floattisf _floatunstisf -# We provide our own version of __divdf3 that performs better and has -# better support for non-default rounding modes. -DPBIT_FUNCS := $(filter-out _div_df, $(DPBIT_FUNCS)) - LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \ $(srcdir)/config/spu/float_unsdidf.c \ $(srcdir)/config/spu/float_unsdisf.c \ @@ -47,18 +43,6 @@ LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \ $(srcdir)/config/spu/divmodti4.c \ $(srcdir)/config/spu/divv2df3.c -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/spu/t-spu-elf - cat $(srcdir)/config/fp-bit.c > dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/spu/t-spu-elf - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Build TImode conversion routines to support Fortran 128-bit # integer data types. LIB2_SIDITI_CONV_FUNCS=yes diff --git a/gcc/config/stormy16/t-stormy16 b/gcc/config/stormy16/t-stormy16 index 62b4e9fa1b0..c2b6c2a5573 100644 --- a/gcc/config/stormy16/t-stormy16 +++ b/gcc/config/stormy16/t-stormy16 @@ -1,6 +1,6 @@ # -*- makefile -*- # -# Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001, 2004, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -36,15 +36,4 @@ LIB2FUNCS_EXTRA = \ $(srcdir)/config/stormy16/stormy16-lib2-cmpsi2.c \ $(srcdir)/config/stormy16/stormy16-lib2-ucmpsi2.c -# Floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - cat $(srcdir)/config/fp-bit.c > dp-bit.c - TARGET_LIBGCC2_CFLAGS = -O2 diff --git a/gcc/config/v850/t-v850 b/gcc/config/v850/t-v850 index 076b00d60ff..fcd3b841e30 100644 --- a/gcc/config/v850/t-v850 +++ b/gcc/config/v850/t-v850 @@ -1,5 +1,5 @@ -# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -78,24 +78,6 @@ LIB1ASMFUNCS = _mulsi3 \ _ucmpdi2 \ _muldi3 -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - # Create target-specific versions of the libraries MULTILIB_OPTIONS = mv850/mv850e/mv850e2/mv850e2v3 MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3 |