Commit b3b0ecee authored by James Almer's avatar James Almer

x86/emms: empty the mmx state unconditionally on supported targets

Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 37db3e89
...@@ -34,7 +34,13 @@ void avpriv_emms_yasm(void); ...@@ -34,7 +34,13 @@ void avpriv_emms_yasm(void);
*/ */
static av_always_inline void emms_c(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) if(av_get_cpu_flags() & AV_CPU_FLAG_MMX)
#endif
__asm__ volatile ("emms" ::: "memory"); __asm__ volatile ("emms" ::: "memory");
} }
#elif HAVE_MMX && HAVE_MM_EMPTY #elif HAVE_MMX && HAVE_MM_EMPTY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment