summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-21 15:01:15 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-21 15:01:15 +0000
commit16505e54d862368f604d014034e556fb359b7754 (patch)
tree31e4e9742f330f0eb81d52e9f17c01cda5a74306 /libgfortran
parent41ac64ae1f281e5a657d87aeaadf1547b9b692b7 (diff)
downloadgcc-16505e54d862368f604d014034e556fb359b7754.tar.gz
2011-05-21 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173996 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173997 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog19
-rw-r--r--libgfortran/config/fpu-387.h4
-rw-r--r--libgfortran/config/fpu-aix.h10
-rw-r--r--libgfortran/config/fpu-generic.h6
-rw-r--r--libgfortran/config/fpu-glibc.h6
-rw-r--r--libgfortran/config/fpu-sysv.h6
-rw-r--r--libgfortran/configure.host12
7 files changed, 40 insertions, 23 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index a17ec2dd8ab..d0effacaa22 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,20 @@
+2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ PR libfortran/48977
+ * configure.host: Swap order of glibc and x86 tests.
+
+2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
+
+ * config/fpu-387.h (set_fpu): Use renamed inexact macro.
+ * config/fpu-aix.h (set_fpu): Clarify error messages, use renamed
+ inexact macro, set TRP_INEXACT for inexact exception instead of
+ TRP_UNDERFLOW.
+ * config/fpu-generic.h (set_fpu): Clarify error messages, use
+ renamed inexact macro.
+ * config/fpu-glibc.h (set_fpu): Likewise.
+ * config/fpu-sysv.h (set_fpu): Likewise.
+
2011-05-14 Tobias Burnus <burnus@net-b.de>
* runtime/stop.c (error_stop_string, error_stop_numeric):
@@ -175,7 +192,7 @@
* io/write_float.def (output_float_FMT_G): Use current rounding mode
to set the rounding parameters. (output_float): Skip rounding
if value is zero.
-
+
2011-04-16 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/date_and_time.c (date_and_time): Remove sprintf CPP
diff --git a/libgfortran/config/fpu-387.h b/libgfortran/config/fpu-387.h
index 2bd9efb5512..c3e57cba39b 100644
--- a/libgfortran/config/fpu-387.h
+++ b/libgfortran/config/fpu-387.h
@@ -110,7 +110,7 @@ void set_fpu (void)
if (options.fpe & GFC_FPE_ZERO) cw &= ~_FPU_MASK_ZM;
if (options.fpe & GFC_FPE_OVERFLOW) cw &= ~_FPU_MASK_OM;
if (options.fpe & GFC_FPE_UNDERFLOW) cw &= ~_FPU_MASK_UM;
- if (options.fpe & GFC_FPE_PRECISION) cw &= ~_FPU_MASK_PM;
+ if (options.fpe & GFC_FPE_INEXACT) cw &= ~_FPU_MASK_PM;
asm volatile ("fldcw %0" : : "m" (cw));
@@ -129,7 +129,7 @@ void set_fpu (void)
if (options.fpe & GFC_FPE_ZERO) cw_sse &= ~(_FPU_MASK_ZM << 7);
if (options.fpe & GFC_FPE_OVERFLOW) cw_sse &= ~(_FPU_MASK_OM << 7);
if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7);
- if (options.fpe & GFC_FPE_PRECISION) cw_sse &= ~(_FPU_MASK_PM << 7);
+ if (options.fpe & GFC_FPE_INEXACT) cw_sse &= ~(_FPU_MASK_PM << 7);
asm volatile ("ldmxcsr %0" : : "m" (cw_sse));
}
diff --git a/libgfortran/config/fpu-aix.h b/libgfortran/config/fpu-aix.h
index 262557b6d01..1348976c331 100644
--- a/libgfortran/config/fpu-aix.h
+++ b/libgfortran/config/fpu-aix.h
@@ -43,7 +43,7 @@ set_fpu (void)
#endif
if (options.fpe & GFC_FPE_DENORMAL)
- estr_write ("Fortran runtime warning: IEEE 'denormal number' "
+ estr_write ("Fortran runtime warning: Floating point 'denormal operand' "
"exception not supported.\n");
if (options.fpe & GFC_FPE_ZERO)
@@ -70,11 +70,11 @@ set_fpu (void)
"exception not supported.\n");
#endif
- if (options.fpe & GFC_FPE_PRECISION)
-#ifdef TRP_UNDERFLOW
- mode |= TRP_UNDERFLOW;
+ if (options.fpe & GFC_FPE_INEXACT)
+#ifdef TRP_INEXACT
+ mode |= TRP_INEXACT;
#else
- estr_write ("Fortran runtime warning: IEEE 'loss of precision' "
+ estr_write ("Fortran runtime warning: IEEE 'inexact' "
"exception not supported.\n");
#endif
diff --git a/libgfortran/config/fpu-generic.h b/libgfortran/config/fpu-generic.h
index 72de91b28c7..b64f90cc584 100644
--- a/libgfortran/config/fpu-generic.h
+++ b/libgfortran/config/fpu-generic.h
@@ -35,7 +35,7 @@ set_fpu (void)
estr_write ("Fortran runtime warning: IEEE 'invalid operation' "
"exception not supported.\n");
if (options.fpe & GFC_FPE_DENORMAL)
- estr_write ("Fortran runtime warning: IEEE 'denormal number' "
+ estr_write ("Fortran runtime warning: Floating point 'denormal operand' "
"exception not supported.\n");
if (options.fpe & GFC_FPE_ZERO)
estr_write ("Fortran runtime warning: IEEE 'division by zero' "
@@ -46,7 +46,7 @@ set_fpu (void)
if (options.fpe & GFC_FPE_UNDERFLOW)
estr_write ("Fortran runtime warning: IEEE 'underflow' "
"exception not supported.\n");
- if (options.fpe & GFC_FPE_PRECISION)
- estr_write ("Fortran runtime warning: IEEE 'loss of precision' "
+ if (options.fpe & GFC_FPE_INEXACT)
+ estr_write ("Fortran runtime warning: IEEE 'inexact' "
"exception not supported.\n");
}
diff --git a/libgfortran/config/fpu-glibc.h b/libgfortran/config/fpu-glibc.h
index 669b7ad98c1..7bdb7b76af6 100644
--- a/libgfortran/config/fpu-glibc.h
+++ b/libgfortran/config/fpu-glibc.h
@@ -49,7 +49,7 @@ void set_fpu (void)
#ifdef FE_DENORMAL
feenableexcept (FE_DENORMAL);
#else
- estr_write ("Fortran runtime warning: IEEE 'denormal number' "
+ estr_write ("Fortran runtime warning: Floating point 'denormal operand' "
"exception not supported.\n");
#endif
@@ -77,11 +77,11 @@ void set_fpu (void)
"exception not supported.\n");
#endif
- if (options.fpe & GFC_FPE_PRECISION)
+ if (options.fpe & GFC_FPE_INEXACT)
#ifdef FE_INEXACT
feenableexcept (FE_INEXACT);
#else
- estr_write ("Fortran runtime warning: IEEE 'loss of precision' "
+ estr_write ("Fortran runtime warning: IEEE 'inexact' "
"exception not supported.\n");
#endif
}
diff --git a/libgfortran/config/fpu-sysv.h b/libgfortran/config/fpu-sysv.h
index 477008968ba..8838f13016c 100644
--- a/libgfortran/config/fpu-sysv.h
+++ b/libgfortran/config/fpu-sysv.h
@@ -42,7 +42,7 @@ set_fpu (void)
#ifdef FP_X_DNML
cw |= FP_X_DNML;
#else
- estr_write ("Fortran runtime warning: IEEE 'denormal number' "
+ estr_write ("Fortran runtime warning: Floating point 'denormal operand' "
"exception not supported.\n");
#endif
@@ -70,11 +70,11 @@ set_fpu (void)
"exception not supported.\n");
#endif
- if (options.fpe & GFC_FPE_PRECISION)
+ if (options.fpe & GFC_FPE_INEXACT)
#ifdef FP_X_IMP
cw |= FP_X_IMP;
#else
- estr_write ("Fortran runtime warning: IEEE 'loss of precision' "
+ estr_write ("Fortran runtime warning: IEEE 'inexact' "
"exception not supported.\n");
#endif
diff --git a/libgfortran/configure.host b/libgfortran/configure.host
index eb68c934c39..92b6433b968 100644
--- a/libgfortran/configure.host
+++ b/libgfortran/configure.host
@@ -20,17 +20,17 @@
# DEFAULTS
fpu_host='fpu-generic'
-# HOST-SPECIFIC OVERRIDES
+if test "x${have_feenableexcept}" = "xyes"; then
+ fpu_host='fpu-glibc'
+fi
+
+# x86 asm should be used instead of glibc, since glibc doesn't support
+# the x86 denormal exception.
case "${host_cpu}" in
i?86 | x86_64)
fpu_host='fpu-387' ;;
esac
-# CONFIGURATION-SPECIFIC OVERRIDES
-if test "x${have_feenableexcept}" = "xyes"; then
- fpu_host='fpu-glibc'
-fi
-
if test "x${have_fpsetmask}" = "xyes"; then
fpu_host='fpu-sysv'
fi