[Numpy-svn] r6462 - in branches/coremath: . numpy/core/include/numpy

numpy-svn@scip... numpy-svn@scip...
Mon Feb 23 11:10:20 CST 2009


Author: cdavid
Date: 2009-02-23 11:10:02 -0600 (Mon, 23 Feb 2009)
New Revision: 6462

Modified:
   branches/coremath/
   branches/coremath/numpy/core/include/numpy/mingw_amd64_fenv.h
Log:
Merged revisions 6461 via svnmerge from 
http://svn.scipy.org/svn/numpy/trunk

........
  r6461 | cdavid | 2009-02-24 01:32:46 +0900 (Tue, 24 Feb 2009) | 1 line
  
  Add fesetexceptflag func for mingw-w64 support.
........



Property changes on: branches/coremath
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/fix_float_format:1-6359 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6459
   + /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/fix_float_format:1-6359 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6461

Modified: branches/coremath/numpy/core/include/numpy/mingw_amd64_fenv.h
===================================================================
--- branches/coremath/numpy/core/include/numpy/mingw_amd64_fenv.h	2009-02-23 16:32:46 UTC (rev 6461)
+++ branches/coremath/numpy/core/include/numpy/mingw_amd64_fenv.h	2009-02-23 17:10:02 UTC (rev 6462)
@@ -66,13 +66,20 @@
 }
 
 static __inline int
-npy_fegetexceptflag(npy_fexcept_t *__flagp, int __excepts)
+npy_fesetexceptflag(const npy_fexcept_t *flagp, int excepts)
 {
-	int __mxcsr, __status;
+	npy_fenv_t env;
 
-	__stmxcsr(&__mxcsr);
-	__fnstsw(&__status);
-	*__flagp = (__mxcsr | __status) & __excepts;
+	__fnstenv(&env.__x87);
+	env.__x87.__status &= ~excepts;
+	env.__x87.__status |= *flagp & excepts;
+	__fldenv(env.__x87);
+
+	__stmxcsr(&env.__mxcsr);
+	env.__mxcsr &= ~excepts;
+	env.__mxcsr |= *flagp & excepts;
+	__ldmxcsr(env.__mxcsr);
+
 	return (0);
 }
 



More information about the Numpy-svn mailing list