ffmpeg | branch: master | James Almer <[email protected]> | Thu Feb 4 01:49:01 2016 -0300| [b3b0ecee1550eb3cba0f4c198948f674f675780c] | committer: James Almer
x86/emms: empty the mmx state unconditionally on supported targets Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: James Almer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3b0ecee1550eb3cba0f4c198948f674f675780c --- libavutil/x86/emms.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavutil/x86/emms.h b/libavutil/x86/emms.h index a529b6b..6fda6e2 100644 --- a/libavutil/x86/emms.h +++ b/libavutil/x86/emms.h @@ -34,7 +34,13 @@ void avpriv_emms_yasm(void); */ static av_always_inline void emms_c(void) { +/* Some inlined functions may also use mmx instructions regardless of + * runtime cpuflags. With that in mind, we unconditionally empty the + * mmx state if the target cpu chosen at configure time supports it. + */ +#if !defined(__MMX__) if(av_get_cpu_flags() & AV_CPU_FLAG_MMX) +#endif __asm__ volatile ("emms" ::: "memory"); } #elif HAVE_MMX && HAVE_MM_EMPTY _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
