Package: kwave
Version: 0.7.3-4
Severity: important
Tags: patch

Hi,

It seems that #288781 is back, let's try to fix this for good
now.

Using push/pop on an int isn't going to work, we need something
that is 64 bit.  So I've changed it to use a int64_t instead of
an int, which should hopefully work as expected.

All the registers probably don't need to be 64 bit, eax was
probably enough.

At startup, I'm seeing this:
Benchmarking memcpy methods (smaller is better):
        libc memcpy() : 248273109
        linux kernel memcpy() : 269018605
        MMX optimized memcpy() : -4046833690
        MMXEXT optimized memcpy() : 157412020
using -> 'MMXEXT optimized memcpy()'

And have to wonder why mmx has a negative number there.


Kurt

--- libkwave/cputest.c.old      2005-09-10 16:38:49.231573224 +0200
+++ libkwave/cputest.c  2005-09-10 16:44:48.560946856 +0200
@@ -58,20 +58,20 @@
 int mm_support(void)
 {
     int rval;
-    int eax, ebx, ecx, edx;
 
 #if defined(ARCH_X86_64)
     /* use 64bit pushq / popq */
+    int64_t eax, ebx, ecx, edx;
     __asm__ __volatile__ (
                           /* See if CPUID instruction is supported ... */
                           /* ... Get copies of EFLAGS into eax and ecx */
                           "pushf\n\t"
                           "popq %0\n\t"
-                          "movl %0, %1\n\t"
+                          "movq %0, %1\n\t"
 
                           /* ... Toggle the ID bit in one copy and store */
                           /*     to the EFLAGS reg */
-                          "xorl $0x200000, %0\n\t"
+                          "xorq $0x200000, %0\n\t"
                           "pushq %0\n\t"
                           "popf\n\t"
 
@@ -84,6 +84,7 @@
                           );
 #else
     /* use 32bit push / pop */
+    int eax, ebx, ecx, edx;
     __asm__ __volatile__ (
                           /* See if CPUID instruction is supported ... */
                           /* ... Get copies of EFLAGS into eax and ecx */

Reply via email to