Hello community, here is the log from the commit of package djvulibre for openSUSE:Factory checked in at Fri Jun 10 09:29:09 CEST 2011. -------- --- djvulibre/djvulibre.changes 2011-05-02 16:50:50.000000000 +0200 +++ /mounts/work_src_done/STABLE/djvulibre/djvulibre.changes 2011-06-09 12:42:38.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jun 9 10:22:43 UTC 2011 - pgajdos@novell.com + +- Fix MMX code when using gcc-4.6 [bnc#696824] + * adjusted gcc46.patch + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ djvulibre.spec ++++++ --- /var/tmp/diff_new_pack.RfyA1z/_old 2011-06-10 09:27:57.000000000 +0200 +++ /var/tmp/diff_new_pack.RfyA1z/_new 2011-06-10 09:27:57.000000000 +0200 @@ -24,7 +24,7 @@ Group: Productivity/Graphics/Other AutoReqProv: on Version: 3.5.24 -Release: 2 +Release: 5 Url: http://djvu.sourceforge.net Summary: An Open Source Implementation of DjVu Source: %{name}-%{version}.tar.bz2 ++++++ djvulibre-3.5.23-gcc46.patch ++++++ --- /var/tmp/diff_new_pack.RfyA1z/_old 2011-06-10 09:27:57.000000000 +0200 +++ /var/tmp/diff_new_pack.RfyA1z/_new 2011-06-10 09:27:57.000000000 +0200 @@ -10,3 +10,60 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp +index 528dab6..e70fdd8 100644 +--- a/libdjvu/MMX.cpp ++++ b/libdjvu/MMX.cpp +@@ -167,8 +167,23 @@ MMXControl::enable_mmx() + : "=m" (cpuflags) : + : "eax","ecx","edx"); + #endif ++#if defined(MMX) && defined(__GNUC__) && defined(__x86_64__) ++ // Detection of MMX for GCC ++ __asm__ volatile (// Check that CR0:EM is clear ++ "xorl %%edx,%%edx\n\t" ++ "smsw %%ax\n\t" ++ "andl $4,%%eax\n\t" ++ "jnz 1f\n\t" ++ // Execute CPUID ++ "movl $1,%%eax\n\t" ++ "cpuid\n" ++ // Finish ++ "1:\tmovl %%edx, %0" ++ : "=m" (cpuflags) : ++ : "eax","ebx","ecx","edx"); ++#endif + #if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86) +- // Detection of MMX for MSVC ++ // Detection of MMX for MSVC 32 bits + __asm { pushfd + pop ecx + xor edx,edx +diff --git a/libdjvu/MMX.h b/libdjvu/MMX.h +index b0af5e5..f8780af 100644 +--- a/libdjvu/MMX.h ++++ b/libdjvu/MMX.h +@@ -143,17 +143,18 @@ class MMXControl + + #ifndef NO_MMX + +-#if defined(__GNUC__) && defined(__i386__) ++#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) ++typedef struct{ char c[8]; } MMX_t; + #define MMXemms \ + __asm__ volatile("emms" : : : "memory" ) + #define MMXrr(op,src,dst) \ +- __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory") ++ __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory" ) + #define MMXir(op,imm,dst) \ +- __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory") ++ __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory" ) + #define MMXar(op,addr,dst) \ +- __asm__ volatile( #op " %0,%%" #dst : : "m" (*(addr)) : "memory") ++ __asm__ volatile( #op " %0,%%" #dst : : "m" (*(MMX_t*)(addr)) : "memory" ) + #define MMXra(op,src,addr) \ +- __asm__ volatile( #op " %%" #src ",%0" : : "m" (*(addr)) : "memory") ++ __asm__ volatile( #op " %%" #src ",%0" : "=m" (*(MMX_t*)(addr)) : : "memory") + #define MMX 1 + #endif + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org