diff options
author | dgp <dgp@noemail.net> | 2009-07-16 20:50:52 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-07-16 20:50:52 (GMT) |
commit | 342636ae9bdeb967fbe1e1d8614aaf2d934e7101 (patch) | |
tree | b5b2733030e6c8eea0ea745246839c42469ecc7c /generic/tclStrToD.c | |
parent | 11d8c72e0f6117c7d420b1484488d5d1bdfa4b1f (diff) | |
download | tcl-342636ae9bdeb967fbe1e1d8614aaf2d934e7101.zip tcl-342636ae9bdeb967fbe1e1d8614aaf2d934e7101.tar.gz tcl-342636ae9bdeb967fbe1e1d8614aaf2d934e7101.tar.bz2 |
* generic/tclCmdIL.c: Removed unused variables.
* generic/tclCompile.c:
* generic/tclVar.c:
* unix/tclUnixChan.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]
FossilOrigin-Name: 936f6911bda9859212bab127d1a62b6586977504
Diffstat (limited to 'generic/tclStrToD.c')
-rwxr-xr-x | generic/tclStrToD.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index c47c5f8..453a34c 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.33.2.1 2008/04/01 20:12:01 andreas_kupries Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.33.2.2 2009/07/16 20:50:54 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?) @@ -2158,6 +2166,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. */ |