Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25597

Modified Files:
        pcm_dmix_x86_64.h 
Log Message:
Don't use stack to save rbx register

Index: pcm_dmix_x86_64.h
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dmix_x86_64.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pcm_dmix_x86_64.h   9 Feb 2004 18:07:47 -0000       1.2
+++ pcm_dmix_x86_64.h   13 Mar 2004 14:24:07 -0000      1.3
@@ -35,10 +35,12 @@
                       volatile signed int *sum, size_t dst_step,
                       size_t src_step, size_t sum_step)
 {
+       unsigned long long old_rbx;
+
        /*
-        *  ESI - src
-        *  EDI - dst
-        *  EBX - sum
+        *  RSI - src
+        *  RDI - dst
+        *  RBX - sum
         *  ECX - old sample
         *  EAX - sample / temporary
         *  EDX - temporary
@@ -46,9 +48,9 @@
        __asm__ __volatile__ (
                "\n"
 
-               "\tpush %%rbx\n"
+               "\tmovq %%rbx, %7\n"
                /*
-                *  initialization, load ESI, EDI, EBX registers
+                *  initialization, load RSI, RDI, RBX registers
                 */
                "\tmovq %1, %%rdi\n"
                "\tmovq %2, %%rsi\n"
@@ -106,16 +108,17 @@
                "\tadd %6, %%rbx\n"
                "\tdecl %0\n"
                "\tjnz 1b\n"
-               "\tjmp 6f\n"
 
                "6:"
                
                "\temms\n"
-               "\tpop %%rbx\n"
+               "\tmovq %7, %%rbx\n"
 
                : /* no output regs */
-               : "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" 
(src_step), "m" (sum_step)
-               : "rsi", "rdi", "edx", "ecx", "rbx", "eax"
+               : "m" (size), "m" (dst), "m" (src),
+                 "m" (sum), "m" (dst_step), "m" (src_step),
+                 "m" (sum_step), "m" (old_rbx)
+               : "rsi", "rdi", "edx", "ecx", "eax"
        );
 }
 
@@ -127,10 +130,12 @@
                       volatile signed int *sum, size_t dst_step,
                       size_t src_step, size_t sum_step)
 {
+       unsigned long long old_rbx;
+
        /*
-        *  ESI - src
-        *  EDI - dst
-        *  EBX - sum
+        *  RSI - src
+        *  RDI - dst
+        *  RBX - sum
         *  ECX - old sample
         *  EAX - sample / temporary
         *  EDX - temporary
@@ -138,7 +143,7 @@
        __asm__ __volatile__ (
                "\n"
 
-               "\tpush %%rbx\n"
+               "\tmovq %%rbx, %7\n"
                /*
                 *  initialization, load ESI, EDI, EBX registers
                 */
@@ -220,14 +225,15 @@
                "\tadd %6, %%rbx\n"
                "\tdecl %0\n"
                "\tjnz 1b\n"
-               // "\tjmp 6f\n"
                
                "6:"
-               "\tpop %%rbx\n"
+               "\tmovq %7, %%rbx\n"
 
                : /* no output regs */
-               : "m" (size), "m" (dst), "m" (src), "m" (sum), "m" (dst_step), "m" 
(src_step), "m" (sum_step)
-               : "rsi", "rdi", "edx", "ecx", "rbx", "eax"
+               : "m" (size), "m" (dst), "m" (src),
+                 "m" (sum), "m" (dst_step), "m" (src_step),
+                 "m" (sum_step), "m" (old_rbx)
+               : "rsi", "rdi", "edx", "ecx", "eax"
        );
 }
 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to