All of lore.kernel.org
 help / color / mirror / Atom feed
From: frederic.recoules@univ-grenoble-alpes.fr
To: alsa-devel@alsa-project.org
Cc: "Frédéric Recoules" <frederic.recoules@orange.fr>
Subject: [PATCH v3 5/5] pcm_dmix assembly: give more freedom over the constraints
Date: Wed,  6 May 2020 19:19:24 +0200	[thread overview]
Message-ID: <20200506171924.2644-5-frederic.recoules@univ-grenoble-alpes.fr> (raw)
In-Reply-To: <20200506171924.2644-1-frederic.recoules@univ-grenoble-alpes.fr>

From: Frédéric Recoules <frederic.recoules@orange.fr>

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>
---
 src/pcm/pcm_dmix_i386.h   | 30 +++++++++++++++---------------
 src/pcm/pcm_dmix_x86_64.h | 18 +++++++++---------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/pcm/pcm_dmix_i386.h b/src/pcm/pcm_dmix_i386.h
index bd1d6644..8dcba3d8 100644
--- a/src/pcm/pcm_dmix_i386.h
+++ b/src/pcm/pcm_dmix_i386.h
@@ -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"
diff --git a/src/pcm/pcm_dmix_x86_64.h b/src/pcm/pcm_dmix_x86_64.h
index fff07529..aef5d90c 100644
--- a/src/pcm/pcm_dmix_x86_64.h
+++ b/src/pcm/pcm_dmix_x86_64.h
@@ -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"
-- 
2.17.1


  parent reply	other threads:[~2020-05-06 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 17:19 [PATCH v3 1/5] pcm_dmix assembly: change the token by symbolic names frederic.recoules
2020-05-06 17:19 ` [PATCH v3 2/5] pcm_dmix assembly: fix the interface for safety frederic.recoules
2020-05-06 17:19 ` [PATCH v3 3/5] pcm_dmix assembly: fix the interface for safety (mmx) frederic.recoules
2020-05-06 17:19 ` [PATCH v3 4/5] pcm_dmix assembly: refactor the PIC mode frederic.recoules
2020-05-06 17:19 ` frederic.recoules [this message]
2020-05-06 20:36 ` [PATCH v3 1/5] pcm_dmix assembly: change the token by symbolic names Takashi Iwai
2020-05-14 17:33   ` FRÉDÉRIC RECOULES

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506171924.2644-5-frederic.recoules@univ-grenoble-alpes.fr \
    --to=frederic.recoules@univ-grenoble-alpes.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=frederic.recoules@orange.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.