Make sure that sfence is used after any non temporal stores.
authorZuxy Meng <zuxy.meng@gmail.com>
Tue, 12 Jan 2010 02:34:33 +0000 (02:34 +0000)
committerZuxy Meng <zuxy.meng@gmail.com>
Tue, 12 Jan 2010 02:34:33 +0000 (02:34 +0000)
Originally committed as revision 30287 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/x86/yuv2rgb_template.c

index b6a1c3d..c8d7ca5 100644 (file)
         : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index) \
         ); \
     } \
-    __asm__ volatile (EMMS); \
+    __asm__ volatile (SFENCE"\n\t"EMMS); \
     return srcSliceH; \
 
 #define YUV2RGB_OPERANDS_ALPHA \
         : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index), "r" (pa - 2*index) \
         ); \
     } \
-    __asm__ volatile (EMMS); \
+    __asm__ volatile (SFENCE"\n\t"EMMS); \
     return srcSliceH; \
 
 static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,