Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-06-24 22:05:51 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-06-24 22:05:51 +0400
commit61d16219da517feae994d025beb1d6856809a7e0 (patch)
tree04c7eea8837cf98e00838b2214bc899ce19b6d99 /source/blender/blenlib
parent93238c3a3d7d986d8a6debccc8d3ace8294a7437 (diff)
Attempt to fix compiling SSE detection on 32 bit linux.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/cpu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/cpu.c b/source/blender/blenlib/intern/cpu.c
index 490e1c3f02a..65e6b34488c 100644
--- a/source/blender/blenlib/intern/cpu.c
+++ b/source/blender/blenlib/intern/cpu.c
@@ -30,8 +30,13 @@ int BLI_cpu_support_sse2(void)
return 1;
#elif defined(__GNUC__) && defined(i386)
/* for GCC x86 we check cpuid */
- unsigned int a, b, c, d;
- __asm__("cpuid": "=a"(a), "=b"(b), "=c"(c), "=d"(d): "a"(1));
+ unsigned int d;
+ __asm__(
+ "pushl %%ebx\n\t"
+ "cpuid\n\t"
+ "popl %%ebx\n\t"
+ : "=d"(d)
+ : "a"(1));
return (d & 0x04000000) != 0;
#elif (defined(_MSC_VER) && defined(_M_IX86))
/* also check cpuid for MSVC x86 */