spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.

2006-10-13  Steven G. Kargl  <kargl@gcc.gnu.org>

        * m4/spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.
        * m4/rrspacing.m4: Ditto.
        * generated/spacing_r4.c: Regenerated.
        * generated/spacing_r8.c: Ditto.
        * generated/spacing_r10.c: Ditto.
        * generated/spacing_r16.c: Ditto.
        * generated/rrspacing_r4.c: Ditto.
        * generated/rrspacing_r8.c: Ditto.
        * generated/rrspacing_r10.c: Ditto.
        * generated/rrspacing_r16.c: Ditto.

From-SVN: r117703
This commit is contained in:
Steven G. Kargl 2006-10-13 19:08:37 +00:00
parent 1453564b3e
commit 4010308ce5
11 changed files with 68 additions and 10 deletions

View File

@ -1,3 +1,16 @@
2006-10-13 Steven G. Kargl <kargl@gcc.gnu.org>
* m4/spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.
* m4/rrspacing.m4: Ditto.
* generated/spacing_r4.c: Regenerated.
* generated/spacing_r8.c: Ditto.
* generated/spacing_r10.c: Ditto.
* generated/spacing_r16.c: Ditto.
* generated/rrspacing_r4.c: Ditto.
* generated/rrspacing_r8.c: Ditto.
* generated/rrspacing_r10.c: Ditto.
* generated/rrspacing_r16.c: Ditto.
2006-10-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/15441

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FABSL) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FABSL) && defined (HAVE_FREXPL)
extern GFC_REAL_10 rrspacing_r10 (GFC_REAL_10 s, int p);
export_proto(rrspacing_r10);
@ -47,7 +47,12 @@ rrspacing_r10 (GFC_REAL_10 s, int p)
if (x == 0.)
return 0.;
frexpl (s, &e);
#if defined (HAVE_LDEXPL)
return ldexpl (x, p - e);
#else
return scalbnl (x, p - e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FABSL) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FABSL) && defined (HAVE_FREXPL)
extern GFC_REAL_16 rrspacing_r16 (GFC_REAL_16 s, int p);
export_proto(rrspacing_r16);
@ -47,7 +47,12 @@ rrspacing_r16 (GFC_REAL_16 s, int p)
if (x == 0.)
return 0.;
frexpl (s, &e);
#if defined (HAVE_LDEXPL)
return ldexpl (x, p - e);
#else
return scalbnl (x, p - e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FABSF) && defined (HAVE_FREXPF) && defined (HAVE_LDEXPF)
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FABSF) && defined (HAVE_FREXPF)
extern GFC_REAL_4 rrspacing_r4 (GFC_REAL_4 s, int p);
export_proto(rrspacing_r4);
@ -47,7 +47,12 @@ rrspacing_r4 (GFC_REAL_4 s, int p)
if (x == 0.)
return 0.;
frexpf (s, &e);
#if defined (HAVE_LDEXPF)
return ldexpf (x, p - e);
#else
return scalbnf (x, p - e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FABS) && defined (HAVE_FREXP) && defined (HAVE_LDEXP)
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FABS) && defined (HAVE_FREXP)
extern GFC_REAL_8 rrspacing_r8 (GFC_REAL_8 s, int p);
export_proto(rrspacing_r8);
@ -47,7 +47,12 @@ rrspacing_r8 (GFC_REAL_8 s, int p)
if (x == 0.)
return 0.;
frexp (s, &e);
#if defined (HAVE_LDEXP)
return ldexp (x, p - e);
#else
return scalbn (x, p - e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
#if defined (HAVE_GFC_REAL_10) && defined (HAVE_FREXPL)
extern GFC_REAL_10 spacing_r10 (GFC_REAL_10 s, int p, int emin, GFC_REAL_10 tiny);
export_proto(spacing_r10);
@ -47,7 +47,11 @@ spacing_r10 (GFC_REAL_10 s, int p, int emin, GFC_REAL_10 tiny)
frexpl (s, &e);
e = e - p;
e = e > emin ? e : emin;
#if defined (HAVE_LDEXPL)
return ldexpl (1., e);
#else
return scalbnl (1., e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FREXPL) && defined (HAVE_LDEXPL)
#if defined (HAVE_GFC_REAL_16) && defined (HAVE_FREXPL)
extern GFC_REAL_16 spacing_r16 (GFC_REAL_16 s, int p, int emin, GFC_REAL_16 tiny);
export_proto(spacing_r16);
@ -47,7 +47,11 @@ spacing_r16 (GFC_REAL_16 s, int p, int emin, GFC_REAL_16 tiny)
frexpl (s, &e);
e = e - p;
e = e > emin ? e : emin;
#if defined (HAVE_LDEXPL)
return ldexpl (1., e);
#else
return scalbnl (1., e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF) && defined (HAVE_LDEXPF)
#if defined (HAVE_GFC_REAL_4) && defined (HAVE_FREXPF)
extern GFC_REAL_4 spacing_r4 (GFC_REAL_4 s, int p, int emin, GFC_REAL_4 tiny);
export_proto(spacing_r4);
@ -47,7 +47,11 @@ spacing_r4 (GFC_REAL_4 s, int p, int emin, GFC_REAL_4 tiny)
frexpf (s, &e);
e = e - p;
e = e > emin ? e : emin;
#if defined (HAVE_LDEXPF)
return ldexpf (1., e);
#else
return scalbnf (1., e);
#endif
}
#endif

View File

@ -33,7 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "libgfortran.h"
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP) && defined (HAVE_LDEXP)
#if defined (HAVE_GFC_REAL_8) && defined (HAVE_FREXP)
extern GFC_REAL_8 spacing_r8 (GFC_REAL_8 s, int p, int emin, GFC_REAL_8 tiny);
export_proto(spacing_r8);
@ -47,7 +47,11 @@ spacing_r8 (GFC_REAL_8 s, int p, int emin, GFC_REAL_8 tiny)
frexp (s, &e);
e = e - p;
e = e > emin ? e : emin;
#if defined (HAVE_LDEXP)
return ldexp (1., e);
#else
return scalbn (1., e);
#endif
}
#endif

View File

@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA. */
include(`mtype.m4')dnl
`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`)'
extern real_type rrspacing_r`'kind (real_type s, int p);
export_proto(rrspacing_r`'kind);
@ -48,7 +48,12 @@ rrspacing_r`'kind (real_type s, int p)
if (x == 0.)
return 0.;
frexp`'q (s, &e);
`#if defined (HAVE_LDEXP'Q`)'
return ldexp`'q (x, p - e);
#else
return scalbn`'q (x, p - e);
#endif
}
#endif

View File

@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA. */
include(`mtype.m4')dnl
`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`)'
extern real_type spacing_r`'kind (real_type s, int p, int emin, real_type tiny);
export_proto(spacing_r`'kind);
@ -48,7 +48,11 @@ spacing_r`'kind (real_type s, int p, int emin, real_type tiny)
frexp`'q (s, &e);
e = e - p;
e = e > emin ? e : emin;
`#if defined (HAVE_LDEXP'Q`)'
return ldexp`'q (1., e);
#else
return scalbn`'q (1., e);
#endif
}
#endif