diff options
author | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-13 19:08:37 +0000 |
---|---|---|
committer | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-13 19:08:37 +0000 |
commit | bd73b22890e7fc448463453750725dcc302c5e11 (patch) | |
tree | ceddc742dee64e48de195e4172c71053db2f476e /libgfortran/m4 | |
parent | cbd898871890b31a53bc51356b8b43cffd82731e (diff) | |
download | gcc-bd73b22890e7fc448463453750725dcc302c5e11.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/m4')
-rw-r--r-- | libgfortran/m4/rrspacing.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/spacing.m4 | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/libgfortran/m4/rrspacing.m4 b/libgfortran/m4/rrspacing.m4 index 6b3ccd55ec1..34ff98eb698 100644 --- a/libgfortran/m4/rrspacing.m4 +++ b/libgfortran/m4/rrspacing.m4 @@ -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 diff --git a/libgfortran/m4/spacing.m4 b/libgfortran/m4/spacing.m4 index 4aa4e19250f..77b7a38e550 100644 --- a/libgfortran/m4/spacing.m4 +++ b/libgfortran/m4/spacing.m4 @@ -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 |