diff options
author | James Almer <jamrial@gmail.com> | 2016-02-04 01:49:01 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-02-04 01:49:01 -0300 |
commit | b3b0ecee1550eb3cba0f4c198948f674f675780c (patch) | |
tree | 38ccff0849bf4f2a0703a600e1a0460799d8ea27 /libavutil/x86/emms.h | |
parent | 37db3e8931f616abe1031770359ef30c1dcb6418 (diff) | |
download | ffmpeg-b3b0ecee1550eb3cba0f4c198948f674f675780c.tar.gz |
x86/emms: empty the mmx state unconditionally on supported targets
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/x86/emms.h')
-rw-r--r-- | libavutil/x86/emms.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/x86/emms.h b/libavutil/x86/emms.h index a529b6bbbe..6fda6e2763 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 |