+Mon Sep 13 10:01:33 1999 Nick Clifton <nickc@cygnus.com>
+
+ * 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 <schwab@suse.de>
* tree.c (fix_sizetype): Exchange the types for TYPE_SIZE and
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.
#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:
#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