]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: dmix: assembly: give more freedom over the constraints
authorFrédéric Recoules <frederic.recoules@orange.fr>
Wed, 6 May 2020 17:19:24 +0000 (19:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 May 2020 20:27:40 +0000 (22:27 +0200)
Minor changes that could help the compiler to produce a
better (smaller/faster) code.

Signed-off-by: Frédéric Recoules <frederic.recoules@orange.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_dmix_i386.h
src/pcm/pcm_dmix_x86_64.h

index bd1d6644fcba9194869318c10914dcce6c571037..8dcba3d8151a43664ef1a450bffd11ddb483bf87 100644 (file)
@@ -149,13 +149,13 @@ static void MIX_AREAS_16(unsigned int size,
 #ifdef BOUNDED_EBX
                "\tmovl %[old_ebx], %%ebx\n"    /* ebx is GOT pointer (-fPIC) */
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_EBX
                  , [old_ebx] "=m" (old_ebx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "esi", "edi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_EBX
                  , "ebx"
@@ -248,13 +248,13 @@ static void MIX_AREAS_16_MMX(unsigned int size,
 #ifdef BOUNDED_EBX
                "\tmovl %[old_ebx], %%ebx\n"    /* ebx is GOT pointer (-fPIC) */
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_EBX
                  , [old_ebx] "=m" (old_ebx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "esi", "edi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_EBX
                  , "ebx"
@@ -376,13 +376,13 @@ static void MIX_AREAS_32(unsigned int size,
 #ifdef BOUNDED_EBX
                "\tmovl %[old_ebx], %%ebx\n"    /* ebx is GOT pointer (-fPIC) */
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_EBX
                  , [old_ebx] "=m" (old_ebx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "esi", "edi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_EBX
                  , "ebx"
@@ -491,13 +491,13 @@ static void MIX_AREAS_24(unsigned int size,
 #ifdef BOUNDED_EBX
                "\tmovl %[old_ebx], %%ebx\n"    /* ebx is GOT pointer (-fPIC) */
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_EBX
                  , [old_ebx] "=m" (old_ebx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "esi", "edi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_EBX
                  , "ebx"
@@ -599,13 +599,13 @@ static void MIX_AREAS_24_CMOV(unsigned int size,
 #ifdef BOUNDED_EBX
                "\tmovl %[old_ebx], %%ebx\n"    /* ebx is GOT pointer (-fPIC) */
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_EBX
                  , [old_ebx] "=m" (old_ebx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "esi", "edi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_EBX
                  , "ebx"
index fff07529e0042b58c0e726c8e9ca1acaca61a462..aef5d90ce6fb3bf4f03502b87a9165a3b8934d11 100644 (file)
@@ -121,13 +121,13 @@ static void MIX_AREAS_16(unsigned int size,
 #ifdef BOUNDED_RBX
                "\tmovq %[old_rbx], %%rbx\n"
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_RBX
                  , [old_rbx] "=m" (old_rbx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "rsi", "rdi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_RBX
                  , "rbx"
@@ -251,13 +251,13 @@ static void MIX_AREAS_32(unsigned int size,
 #ifdef BOUNDED_RBX
                "\tmovq %[old_rbx], %%rbx\n"
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_RBX
                  , [old_rbx] "=m" (old_rbx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "rsi", "rdi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_RBX
                  , "rbx"
@@ -363,13 +363,13 @@ static void MIX_AREAS_24(unsigned int size,
 #ifdef BOUNDED_RBX
                "\tmovq %[old_rbx], %%rbx\n"
 #endif
-               : [size] "+m" (size)
+               : [size] "+&rm" (size)
 #ifdef BOUNDED_RBX
                  , [old_rbx] "=m" (old_rbx)
 #endif
                : [dst] "m" (dst), [src] "m" (src), [sum] "m" (sum),
-                 [dst_step] "m" (dst_step),  [src_step] "m" (src_step),
-                 [sum_step] "m" (sum_step)
+                 [dst_step] "im" (dst_step),  [src_step] "im" (src_step),
+                 [sum_step] "im" (sum_step)
                : "rsi", "rdi", "edx", "ecx", "eax", "memory", "cc"
 #ifndef BOUNDED_RBX
                  , "rbx"