From 6c9544e7f0b73c26ca4aa88d4bfa06d0cb3b7009 Mon Sep 17 00:00:00 2001 From: Mario Sergio Fujikawa Ferreira Date: Sun, 10 Feb 2002 13:11:13 +0000 Subject: [PATCH] Apply asm patch to work around bug exposed in Athlon + gcc (2.9x). Also happens in other systems Submitted by: Matthew Reimer Obtained from: Quasar DV Codec Project --- graphics/libdv/files/patch-libdv:mmx.h | 25 ++++++++++++++++++++++++ multimedia/libdv/files/patch-libdv:mmx.h | 25 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 graphics/libdv/files/patch-libdv:mmx.h create mode 100644 multimedia/libdv/files/patch-libdv:mmx.h diff --git a/graphics/libdv/files/patch-libdv:mmx.h b/graphics/libdv/files/patch-libdv:mmx.h new file mode 100644 index 000000000000..7033e5772aa0 --- /dev/null +++ b/graphics/libdv/files/patch-libdv:mmx.h @@ -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 */ diff --git a/multimedia/libdv/files/patch-libdv:mmx.h b/multimedia/libdv/files/patch-libdv:mmx.h new file mode 100644 index 000000000000..7033e5772aa0 --- /dev/null +++ b/multimedia/libdv/files/patch-libdv:mmx.h @@ -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 */