summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 12:55:45 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 12:55:45 +0000
commit98b28ab670569a961b4f56a5d4bca75fea37cadc (patch)
tree7735a57324efcc39f0b3ab6c3034917ad7641e3b /libgfortran
parentc9819bb0b71ef1482e77c91e7959500fcf261de0 (diff)
downloadgcc-98b28ab670569a961b4f56a5d4bca75fea37cadc.tar.gz
Clarify FP exception documentation and messages
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog11
-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
6 files changed, 27 insertions, 16 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index a17ec2dd8ab..9147014a21a 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,14 @@
+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):
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