summaryrefslogtreecommitdiff
path: root/devel/libjit/patches/patch-aa
blob: 83b2ffdbffce40e571b246acff6cbe38997c194d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-aa,v 1.3 2006/01/09 19:00:43 joerg Exp $

--- jit/jit-cpuid-x86.c.orig	2006-01-09 18:53:59.000000000 +0000
+++ jit/jit-cpuid-x86.c
@@ -57,6 +57,7 @@ static void cpuid_query(unsigned int ind
 {
 #if defined(__GNUC__)
 	__asm__ __volatile__ (
+		"\tpushl %%ebx\n"
 		"\tmovl %0, %%eax\n"
 		"\txorl %%ebx, %%ebx\n"
 		"\txorl %%ecx, %%ecx\n"
@@ -68,7 +69,8 @@ static void cpuid_query(unsigned int ind
 		"\tmovl %%ebx, 4(%%esi)\n"
 		"\tmovl %%ecx, 8(%%esi)\n"
 		"\tmovl %%edx, 12(%%esi)\n"
-		: : "m"(index), "m"(info) : "eax", "ebx", "ecx", "edx", "esi"
+		"\tpopl %%ebx\n"
+		: : "m"(index), "m"(info) : "eax", "ecx", "edx", "esi"
 	);
 #endif
 }