diff mbox series

[FFmpeg-devel,4/5] x86 inline assembly compliance

Message ID 1451672312.3742139.1585996588820.JavaMail.zimbra@univ-grenoble-alpes.fr
State Superseded
Headers show
Series [FFmpeg-devel,1/5] x86 inline assembly compliance
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork warning Failed to apply patch

Commit Message

FRÉDÉRIC RECOULES April 4, 2020, 10:36 a.m. UTC
[inline assembly] add mmx clobbers in 3 statements 

- 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") 
+ ); 
}