summaryrefslogtreecommitdiff
blob: b3c1dcf9605c80c846bd78d51e73d63ec893e782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Make sure we don't clobber %ebx (important with PIC).

http://bugs.gentoo.org/77079

--- ode-0.5/ode/src/timer.cpp
+++ ode-0.5/ode/src/timer.cpp
@@ -117,9 +117,11 @@ static inline void getClockCount (unsign
 static inline void serialize()
 {
   asm volatile (
+	"mov %%ebx,%%edi\n"
 	"mov $0,%%eax\n"
 	"cpuid\n"
-	: : : "%eax","%ebx","%ecx","%edx","cc","memory");
+	"mov %%edi,%%ebx\n"
+	: : : "%eax","%edi","%ecx","%edx","cc","memory");
 }