comparison postproc/rgb2rgb.c @ 2513:d3c6b9ae24b1

sfence
author nick
date Sun, 28 Oct 2001 13:59:57 +0000
parents 8899131fae4d
children 5e55450d48fa
comparison
equal deleted inserted replaced
2512:8899131fae4d 2513:d3c6b9ae24b1
19 19
20 #ifdef HAVE_MMX2 20 #ifdef HAVE_MMX2
21 #define MOVNTQ "movntq" 21 #define MOVNTQ "movntq"
22 #else 22 #else
23 #define MOVNTQ "movq" 23 #define MOVNTQ "movq"
24 #endif
25
26 #ifdef HAVE_MMX2
27 #define SFENCE "sfence"
24 #endif 28 #endif
25 29
26 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size) 30 void rgb24to32(uint8_t *src,uint8_t *dst,uint32_t src_size)
27 { 31 {
28 uint8_t *dest = dst; 32 uint8_t *dest = dst;
63 :"m"(*s) 67 :"m"(*s)
64 :"memory"); 68 :"memory");
65 dest += 16; 69 dest += 16;
66 s += 12; 70 s += 12;
67 } 71 }
72 #ifdef SFENCE
73 __asm __volatile(SFENCE:::"memory");
74 #endif
68 __asm __volatile(EMMS:::"memory"); 75 __asm __volatile(EMMS:::"memory");
69 #endif 76 #endif
70 while(s < end) 77 while(s < end)
71 { 78 {
72 *dest++ = *s++; 79 *dest++ = *s++;