Apply asm patch to work around bug exposed in Athlon + gcc (2.9x).

Also happens in other systems

Submitted by:	Matthew Reimer <mreimer@vpop.net>
Obtained from:	Quasar DV Codec Project
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2002-02-10 13:11:13 +00:00
parent 1190560cdc
commit 6c9544e7f0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54485
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,25 @@
--- libdv/mmx.h.orig Thu Apr 26 16:08:25 2001
+++ libdv/mmx.h Sun Feb 10 11:03:54 2002
@@ -72,6 +72,9 @@
__asm__ __volatile__ (
/* See if CPUID instruction is supported ... */
/* ... Get copies of EFLAGS into eax and ecx */
+ "pushl %%ebx\n\t"
+ "pushl %%ecx\n\t"
+ "pushl %%edx\n\t"
"pushf\n\t"
"popl %%eax\n\t"
"movl %%eax, %%ecx\n\t"
@@ -207,9 +210,11 @@
"movl $0, %0\n\n\t"
"Return:\n\t"
+ "popl %%edx\n\t"
+ "popl %%ecx\n\t"
+ "popl %%ebx\n\t"
: "=a" (rval)
: /* no input */
- : "ebx", "ecx", "edx"
);
/* Return */

View File

@ -0,0 +1,25 @@
--- libdv/mmx.h.orig Thu Apr 26 16:08:25 2001
+++ libdv/mmx.h Sun Feb 10 11:03:54 2002
@@ -72,6 +72,9 @@
__asm__ __volatile__ (
/* See if CPUID instruction is supported ... */
/* ... Get copies of EFLAGS into eax and ecx */
+ "pushl %%ebx\n\t"
+ "pushl %%ecx\n\t"
+ "pushl %%edx\n\t"
"pushf\n\t"
"popl %%eax\n\t"
"movl %%eax, %%ecx\n\t"
@@ -207,9 +210,11 @@
"movl $0, %0\n\n\t"
"Return:\n\t"
+ "popl %%edx\n\t"
+ "popl %%ecx\n\t"
+ "popl %%ebx\n\t"
: "=a" (rval)
: /* no input */
- : "ebx", "ecx", "edx"
);
/* Return */