comparison libvo/osd_template.c @ 21369:9d42ff736ea5

Avoid compiling code using %ah etc. on AMD64, since that will not work (problems only occur with -O0 or -Os, see also http://bugs.gentoo.org/show_bug.cgi?id=156375)
author reimar
date Wed, 29 Nov 2006 13:49:48 +0000
parents 6289755ce7c7
children 7a1397677cb3
comparison
equal deleted inserted replaced
21368:06a0a4dbf1a0 21369:9d42ff736ea5
202 ::); 202 ::);
203 #endif 203 #endif
204 for(y=0;y<h;y++){ 204 for(y=0;y<h;y++){
205 register unsigned char *dst = dstbase; 205 register unsigned char *dst = dstbase;
206 register int x; 206 register int x;
207 #ifdef ARCH_X86 207 #if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
208 #ifdef HAVE_MMX 208 #ifdef HAVE_MMX
209 asm volatile( 209 asm volatile(
210 PREFETCHW" %0\n\t" 210 PREFETCHW" %0\n\t"
211 PREFETCH" %1\n\t" 211 PREFETCH" %1\n\t"
212 PREFETCH" %2\n\t" 212 PREFETCH" %2\n\t"
275 ); 275 );
276 } 276 }
277 dst += 3; 277 dst += 3;
278 } 278 }
279 #endif /* !HAVE_MMX */ 279 #endif /* !HAVE_MMX */
280 #else /*non x86 arch*/ 280 #else /*non x86 arch or x86_64 with MMX disabled */
281 for(x=0;x<w;x++){ 281 for(x=0;x<w;x++){
282 if(srca[x]){ 282 if(srca[x]){
283 #ifdef FAST_OSD 283 #ifdef FAST_OSD
284 dst[0]=dst[1]=dst[2]=src[x]; 284 dst[0]=dst[1]=dst[2]=src[x];
285 #else 285 #else
322 ::); 322 ::);
323 #endif /* HAVE_3DNOW */ 323 #endif /* HAVE_3DNOW */
324 #endif /* HAVE_MMX */ 324 #endif /* HAVE_MMX */
325 for(y=0;y<h;y++){ 325 for(y=0;y<h;y++){
326 register int x; 326 register int x;
327 #ifdef ARCH_X86 327 #if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
328 #ifdef HAVE_MMX 328 #ifdef HAVE_MMX
329 #ifdef HAVE_3DNOW 329 #ifdef HAVE_3DNOW
330 asm volatile( 330 asm volatile(
331 PREFETCHW" %0\n\t" 331 PREFETCHW" %0\n\t"
332 PREFETCH" %1\n\t" 332 PREFETCH" %1\n\t"
441 :"%eax", "%ecx", "%edx" 441 :"%eax", "%ecx", "%edx"
442 ); 442 );
443 } 443 }
444 } 444 }
445 #endif /* HAVE_MMX */ 445 #endif /* HAVE_MMX */
446 #else /*non x86 arch*/ 446 #else /*non x86 arch or x86_64 with MMX disabled */
447 for(x=0;x<w;x++){ 447 for(x=0;x<w;x++){
448 if(srca[x]){ 448 if(srca[x]){
449 #ifdef FAST_OSD 449 #ifdef FAST_OSD
450 dstbase[4*x+0]=dstbase[4*x+1]=dstbase[4*x+2]=src[x]; 450 dstbase[4*x+0]=dstbase[4*x+1]=dstbase[4*x+2]=src[x];
451 #else 451 #else