From 0924404c5424a0cd34cfbc242d2d7ccf4ac80681 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 13 Sep 1999 09:14:21 +0000 Subject: [PATCH] Move definition of 'thenan' to its own object file in order to save space. From-SVN: r29371 --- gcc/ChangeLog | 11 +++++++++++ gcc/Makefile.in | 4 ++-- gcc/config/fp-bit.c | 24 +++++++++++++++++++++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa757515dc6..d0db78bd5ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +Mon Sep 13 10:01:33 1999 Nick Clifton + + * config/fp-bit.c: Define L_thenan_sf or L_thenan_df (as + appropriate) if FINE_GRAINED_LIBRARIES is not defined. + (nan): Return _thenan_sf or _thenan_df as appropriate. + (L_thenan_sf): Define _thenan_sf. + (L_thenan_df): Define _thenan_df. + + * Makefile.in (FPBIT_FUNCS): Add _thenan_sf. + (DPBIT_FUNCS): Add _thenan_df. + Mon Sep 13 09:38:53 1999 Andreas Schwab * tree.c (fix_sizetype): Exchange the types for TYPE_SIZE and diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 1799933d602..25a962fa7c6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -733,12 +733,12 @@ LIB2FUNCS_EH = _eh FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ _lt_sf _le_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ - _sf_to_df + _sf_to_df _thenan_sf DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ _lt_df _le_df _si_to_df _df_to_si _negate_df _make_df \ - _df_to_sf + _df_to_sf _thenan_df # The files that "belong" in CONFIG_H are deliberately omitted # because having them there would not be useful in actual practice. diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c index 25fe4ef451b..09825416786 100644 --- a/gcc/config/fp-bit.c +++ b/gcc/config/fp-bit.c @@ -90,6 +90,11 @@ Boston, MA 02111-1307, USA. */ #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 /* The following macros can be defined to change the behaviour of this file: @@ -389,13 +394,26 @@ FLO_union_type; #define isinf(x) 0 #else +#if defined L_thenan_sf +const fp_number_type __thenan_sf = { CLASS_SNAN }; +#elif defined L_thenan_df +const fp_number_type __thenan_df = { CLASS_SNAN }; +#elif defined FLOAT +extern const fp_number_type __thenan_sf; +#else +extern const fp_number_type __thenan_df; +#endif + INLINE static fp_number_type * nan () { - static fp_number_type thenan; - - return &thenan; + /* Discard the const qualifier... */ +#ifdef FLOAT + return (fp_number_type *) (& __thenan_sf); +#else + return (fp_number_type *) (& __thenan_df); +#endif } INLINE -- 2.30.2