diff mbox series

[FFmpeg-devel,4/5,inline,assembly] add mmx clobbers in 3 statements

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

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 22, 2020, 5:49 p.m. UTC
From: Frédéric Recoules <frederic.recoules@orange.fr>

- 1 in lossless_videoencdsp_init.c
- 2 in rnd_template.c
---
 libavcodec/x86/lossless_videoencdsp_init.c | 4 +++-
 libavcodec/x86/rnd_template.c              | 8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/x86/lossless_videoencdsp_init.c b/libavcodec/x86/lossless_videoencdsp_init.c
index 40407add52..fb481e66f5 100644
--- a/libavcodec/x86/lossless_videoencdsp_init.c
+++ b/libavcodec/x86/lossless_videoencdsp_init.c
@@ -70,7 +70,9 @@  static void sub_median_pred_mmxext(uint8_t *dst, const uint8_t *src1,
         "cmp %4, %0                     \n\t"
         " jb 1b                         \n\t"
         : "+r" (i)
-        : "r" (src1), "r" (src2), "r" (dst), "r" ((x86_reg) w));
+        : "r" (src1), "r" (src2), "r" (dst), "r" ((x86_reg) w)
+	: MMX_CLOBBERS("mm0", "mm1", "mm2", "mm3", "mm4", "mm5")
+	);
 
     l  = *left;
     lt = *left_top;
diff --git a/libavcodec/x86/rnd_template.c b/libavcodec/x86/rnd_template.c
index a98fbc10ab..013aa1a645 100644
--- a/libavcodec/x86/rnd_template.c
+++ b/libavcodec/x86/rnd_template.c
@@ -94,7 +94,9 @@  av_unused STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixel
         "jnz    1b                      \n\t"
         :"+g"(h), "+S"(pixels)
         :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN
-        :FF_REG_a, "memory");
+        :FF_REG_a, "memory"
+	 MMX_CLOBBERS(, "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7")
+	);
 }
 
 // avg_pixels
@@ -171,5 +173,7 @@  av_unused STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixel
         "jnz    1b                      \n\t"
         :"+g"(h), "+S"(pixels)
         :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN
-        :FF_REG_a, "memory");
+        :FF_REG_a, "memory"
+	 MMX_CLOBBERS(, "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7")
+	);
 }