summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-09-10 09:20:34 -0600
committerBrian Paul <[email protected]>2013-09-10 11:01:37 -0600
commit923d3467147dd301d94ed3e6b41295fb2bcd6f47 (patch)
treede9266674f4917d95fc31e744e72ccb882a42c84 /src/gallium/auxiliary
parent787ac4207e30a18b4286faa2140d06b6fb8daf36 (diff)
util: don't use _fxsave() with MSVC 2010 or older
And update _MSC_VER comments in p_config.h Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index 2ff40bb0050..8ac26cb3770 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -283,8 +283,11 @@ static INLINE boolean sse2_has_daz(void)
fxarea.mxcsr_mask = 0;
#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO))
__asm __volatile ("fxsave %0" : "+m" (fxarea));
-#elif (defined(PIPE_CC_MSVC) || defined(PIPE_CC_ICL))
+#elif (defined(PIPE_CC_MSVC) && _MSC_VER >= 1700)) || defined(PIPE_CC_ICL)
+ /* 1700 = Visual Studio 2012 */
_fxsave(&fxarea);
+#else
+ fxarea.mxcsr_mask = 0;
#endif
return !!(fxarea.mxcsr_mask & (1 << 6));
}