diff mbox series

[FFmpeg-devel,09/14,inline,assembly] add memory to mpegvideoenc

Message ID 20200422174918.7290-9-frederic.recoules@univ-grenoble-alpes.fr
State New
Headers show
Series [FFmpeg-devel,1/5,inline,assembly] prepares for contiguous assembly statements merging
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

FRÉDÉRIC RECOULES April 26, 2020, 7:44 p.m. UTC
From: Frédéric Recoules <frederic.recoules@orange.fr>

---
 libavcodec/x86/mpegvideoenc_qns_template.c |  4 ++--
 libavcodec/x86/mpegvideoencdsp_init.c      | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/x86/mpegvideoenc_qns_template.c b/libavcodec/x86/mpegvideoenc_qns_template.c
index 96325fd8f8..f1728de01e 100644
--- a/libavcodec/x86/mpegvideoenc_qns_template.c
+++ b/libavcodec/x86/mpegvideoenc_qns_template.c
@@ -70,7 +70,7 @@  static int DEF(try_8x8basis)(int16_t rem[64], int16_t weight[64], int16_t basis[
 
         : "+r" (i)
         : "r"(basis), "r"(rem), "r"(weight), "g"(scale) COMMA_SET_RND_IN
-	  MMX_CLOBBERS_ONLY("mm0", "mm1", "mm5", "mm7"
+	: "memory"  MMX_CLOBBERS(, "mm0", "mm1", "mm5", "mm7"
 			    SET_RND_CLOBBER(, "mm6"))
     );
     return i;
@@ -102,7 +102,7 @@  static void DEF(add_8x8basis)(int16_t rem[64], int16_t basis[64], int scale)
 
                 : "+r" (i)
                 : "r"(basis), "r"(rem), "g"(scale) COMMA_SET_RND_IN
-		  MMX_CLOBBERS_ONLY("mm0", "mm1", "mm5"
+		: "memory" MMX_CLOBBERS(, "mm0", "mm1", "mm5"
 				    SET_RND_CLOBBER(, "mm6"))
         );
     }else{
diff --git a/libavcodec/x86/mpegvideoencdsp_init.c b/libavcodec/x86/mpegvideoencdsp_init.c
index 8430ec62ea..4914f3a96b 100644
--- a/libavcodec/x86/mpegvideoencdsp_init.c
+++ b/libavcodec/x86/mpegvideoencdsp_init.c
@@ -146,7 +146,7 @@  static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
             : "+r" (ptr)
             : "r" ((x86_reg) wrap), "r" ((x86_reg) width),
               "r" (ptr + wrap * height)
-	      MMX_CLOBBERS_ONLY("mm0", "mm1") );
+	    : "memory" MMX_CLOBBERS(, "mm0", "mm1") );
     } else if (w == 16) {
         __asm__ volatile (
             "1:                                 \n\t"
@@ -167,7 +167,7 @@  static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
             "jb                1b               \n\t"
             : "+r"(ptr)
             : "r"((x86_reg)wrap), "r"((x86_reg)width), "r"(ptr + wrap * height)
-	      MMX_CLOBBERS_ONLY("mm0", "mm1") );
+	    : "memory" MMX_CLOBBERS(, "mm0", "mm1") );
     } else {
         av_assert1(w == 4);
         __asm__ volatile (
@@ -187,7 +187,7 @@  static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
             : "+r" (ptr)
             : "r" ((x86_reg) wrap), "r" ((x86_reg) width),
               "r" (ptr + wrap * height)
-	      MMX_CLOBBERS_ONLY("mm0", "mm1") );
+	    : "memory" MMX_CLOBBERS(, "mm0", "mm1") );
     }
 
     /* top and bottom (and hopefully also the corners) */
@@ -208,7 +208,7 @@  static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
                 : "r" ((x86_reg) buf - (x86_reg) ptr - w),
                   "r" ((x86_reg) - wrap), "r" ((x86_reg) - wrap * 3),
                   "r" (ptr + width + 2 * w)
-		  MMX_CLOBBERS_ONLY("mm0") );
+		: "memory" MMX_CLOBBERS(, "mm0") );
         }
     }
 
@@ -229,7 +229,7 @@  static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
                 : "r" ((x86_reg) last_line - (x86_reg) ptr - w),
                   "r" ((x86_reg) wrap), "r" ((x86_reg) wrap * 3),
                   "r" (ptr + width + 2 * w)
-		  MMX_CLOBBERS_ONLY("mm0") );
+		: "memory" MMX_CLOBBERS(, "mm0") );
         }
     }
 }