From 61d16219da517feae994d025beb1d6856809a7e0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 24 Jun 2010 18:05:51 +0000 Subject: Attempt to fix compiling SSE detection on 32 bit linux. --- source/blender/blenlib/intern/cpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender') 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 */ -- cgit v1.2.3