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

FRÉDÉRIC RECOULES frederic.recoules at univ-grenoble-alpes.fr
Sat Apr 4 13:36:28 EEST 2020


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




More information about the ffmpeg-devel mailing list