summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-07-16 21:24:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-07-16 21:24:38 (GMT)
commit47696f530aabf1a5ddab3d36eb8481b469d44397 (patch)
tree2212f61d925aabd55784a55ed9182b092a9bf383 /generic/tclStrToD.c
parentb5f035d9c80dbec4986ba4e7e2ba4a1881d90d38 (diff)
downloadtcl-47696f530aabf1a5ddab3d36eb8481b469d44397.zip
tcl-47696f530aabf1a5ddab3d36eb8481b469d44397.tar.gz
tcl-47696f530aabf1a5ddab3d36eb8481b469d44397.tar.bz2
* generic/tclBinary.c: Removed unused variables.
* generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
Diffstat (limited to 'generic/tclStrToD.c')
-rwxr-xr-xgeneric/tclStrToD.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 5db3d66..fbe4105 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStrToD.c,v 1.37 2009/01/09 11:21:46 dkf Exp $
+ * RCS: @(#) $Id: tclStrToD.c,v 1.38 2009/07/16 21:24:40 dgp Exp $
*
*----------------------------------------------------------------------
*/
@@ -68,6 +68,14 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
#if defined(__sun) && defined(__i386) && !defined(__GNUC__)
#include <sunmath.h>
#endif
+
+/*
+ * MIPS floating-point units need special settings in control registers
+ * to use gradual underflow as we expect.
+ */
+#if defined(__mips)
+#include <sys/fpu.h>
+#endif
/*
* HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN.
* Everyone else uses 7ff8000000000000. (Why, HP, why?)
@@ -2166,6 +2174,14 @@ TclInitDoubleConversion(void)
} bitwhack;
#endif
+#if defined(__mips)
+ union fpc_csr mipsCR;
+
+ mipsCR.fc_word = get_fpc_csr();
+ mipsCR.fc_struct.flush = 0;
+ set_fpc_csr(mipsCR.fc_word);
+#endif
+
/*
* Initialize table of powers of 10 expressed as wide integers.
*/