summaryrefslogtreecommitdiff
path: root/devel/libjit/patches/patch-aa
diff options
context:
space:
mode:
authorjoerg <joerg>2006-01-09 19:00:43 +0000
committerjoerg <joerg>2006-01-09 19:00:43 +0000
commitf90c4f791feb99cc10e15bcd736b411546f6fd5c (patch)
treebce28125031a7337c8fb1701885d3511f6db5ea1 /devel/libjit/patches/patch-aa
parentda9cd1eebc69cfee598a7430526b54236b75d40d (diff)
downloadpkgsrc-f90c4f791feb99cc10e15bcd736b411546f6fd5c.tar.gz
Fix GCC 3.4+: Don't clobber %ebx on IA32.
Diffstat (limited to 'devel/libjit/patches/patch-aa')
-rw-r--r--devel/libjit/patches/patch-aa22
1 files changed, 22 insertions, 0 deletions
diff --git a/devel/libjit/patches/patch-aa b/devel/libjit/patches/patch-aa
new file mode 100644
index 00000000000..83b2ffdbffc
--- /dev/null
+++ b/devel/libjit/patches/patch-aa
@@ -0,0 +1,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
+ }