changeset 2513:d3c6b9ae24b1

sfence
author nick
date Sun, 28 Oct 2001 13:59:57 +0000
parents 8899131fae4d
children 5e55450d48fa
files postproc/rgb2rgb.c postproc/rgb2rgb_template.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/postproc/rgb2rgb.c	Sun Oct 28 13:06:49 2001 +0000
+++ b/postproc/rgb2rgb.c	Sun Oct 28 13:59:57 2001 +0000
@@ -23,6 +23,10 @@
 #define MOVNTQ "movq"
 #endif
 
+#ifdef HAVE_MMX2
+#define SFENCE "sfence"
+#endif
+
 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
 {
   uint8_t *dest = dst;
@@ -65,6 +69,9 @@
     dest += 16;
     s += 12;
   }
+#ifdef SFENCE
+  __asm __volatile(SFENCE:::"memory");
+#endif
   __asm __volatile(EMMS:::"memory");
 #endif
   while(s < end)
--- a/postproc/rgb2rgb_template.c	Sun Oct 28 13:06:49 2001 +0000
+++ b/postproc/rgb2rgb_template.c	Sun Oct 28 13:59:57 2001 +0000
@@ -23,6 +23,10 @@
 #define MOVNTQ "movq"
 #endif
 
+#ifdef HAVE_MMX2
+#define SFENCE "sfence"
+#endif
+
 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
 {
   uint8_t *dest = dst;
@@ -65,6 +69,9 @@
     dest += 16;
     s += 12;
   }
+#ifdef SFENCE
+  __asm __volatile(SFENCE:::"memory");
+#endif
   __asm __volatile(EMMS:::"memory");
 #endif
   while(s < end)