[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29672] trunk/blender/source/blender/ blenlib/intern/cpu.c: Attempt to fix compiling SSE detection on 32 bit linux.
Brecht Van Lommel
brecht at blender.org
Thu Jun 24 20:05:52 CEST 2010
Revision: 29672
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29672
Author: blendix
Date: 2010-06-24 20:05:51 +0200 (Thu, 24 Jun 2010)
Log Message:
-----------
Attempt to fix compiling SSE detection on 32 bit linux.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/cpu.c
Modified: trunk/blender/source/blender/blenlib/intern/cpu.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/cpu.c 2010-06-24 17:34:36 UTC (rev 29671)
+++ trunk/blender/source/blender/blenlib/intern/cpu.c 2010-06-24 18:05:51 UTC (rev 29672)
@@ -30,8 +30,13 @@
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 */
More information about the Bf-blender-cvs
mailing list