aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-07-24 20:42:03 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-07-24 20:42:03 +0000
commitfb16b7e7b33ec84765d9bb9b36e0859a7b2c0b05 (patch)
treeb347472908fdacf757acc4d3234ff0fc30511362 /libavcodec/dsputil.h
parent7d650cb540b68ceba96abbe3be196473df8e3c5d (diff)
downloadffmpeg-fb16b7e7b33ec84765d9bb9b36e0859a7b2c0b05.tar.gz
added emms_c() macro which should can used in c code in both mmx/non mmx cases
Originally committed as revision 12 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index fa8eb239a5..76f4475f82 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -75,7 +75,13 @@ int mm_support(void);
static inline void emms(void)
{
- asm volatile ("emms;");
+ __asm __volatile ("emms;":::"memory");
+}
+
+#define emms_c() \
+{\
+ if (mm_flags & MM_MMX)\
+ emms();\
}
#define __align8 __attribute__ ((aligned (8)))
@@ -84,6 +90,8 @@ void dsputil_init_mmx(void);
#else
+#define emms_c()
+
#define __align8
#endif