Mesa (master): mesa: Rely on USE_X86_64_ASM.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu May 22 21:40:24 UTC 2014


Module: Mesa
Branch: master
Commit: cfec135de7f604ffe14f7a7a78157697911519ec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfec135de7f604ffe14f7a7a78157697911519ec

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu May 22 20:43:55 2014 +0100

mesa: Rely on USE_X86_64_ASM.

This fixes MinGW x64 builds.  We don't use assembly on any of the
Windows builds, to avoid divergence between MSVC and MinGW when testing.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/main/cpuinfo.c   |    2 +-
 src/mesa/main/cpuinfo.h   |    2 +-
 src/mesa/x86/common_x86.c |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/cpuinfo.c b/src/mesa/main/cpuinfo.c
index 73e295c..0755d6b 100644
--- a/src/mesa/main/cpuinfo.c
+++ b/src/mesa/main/cpuinfo.c
@@ -34,7 +34,7 @@
 void
 _mesa_get_cpu_features(void)
 {
-#if defined USE_X86_ASM || (defined __x86_64__ && !defined _MSC_VER)
+#if defined USE_X86_ASM || defined USE_X86_64_ASM
    _mesa_get_x86_features();
 #endif
 }
diff --git a/src/mesa/main/cpuinfo.h b/src/mesa/main/cpuinfo.h
index fcd611e..57925e8 100644
--- a/src/mesa/main/cpuinfo.h
+++ b/src/mesa/main/cpuinfo.h
@@ -27,7 +27,7 @@
 #define CPUINFO_H
 
 
-#if defined USE_X86_ASM || (defined __x86_64__ && !defined _MSC_VER)
+#if defined USE_X86_ASM || defined USE_X86_64_ASM
 #include "x86/common_x86_asm.h"
 #endif
 
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index a55c48e..9c12339 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -47,7 +47,7 @@
 #include <sys/sysctl.h>
 #include <machine/cpu.h>
 #endif
-#if defined(__x86_64__) && !defined(_MSC_VER)
+#if defined(USE_X86_64_ASM)
 #include <cpuid.h>
 #endif
 
@@ -336,7 +336,7 @@ _mesa_get_x86_features(void)
    }
 #endif
 
-#elif defined(__x86_64__) && !defined(_MSC_VER)
+#elif defined(USE_X86_64_ASM)
    unsigned int uninitialized_var(eax), uninitialized_var(ebx),
                 uninitialized_var(ecx), uninitialized_var(edx);
 
@@ -347,7 +347,7 @@ _mesa_get_x86_features(void)
 
    if (ecx & bit_SSE4_1)
       _mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
-#endif /* USE_X86_ASM */
+#endif /* USE_X86_64_ASM */
 
    (void) detection_debug;
 }




More information about the mesa-commit mailing list