mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
37db3e8931
commit
b3b0ecee15
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue