diff src/video/SDL_yuv_sw.c @ 4045:f420bba13676 SDL-1.2

GCC inline asm for MMX YUV processing no longer has textrels and now works when gcc wants to hog %%ebx for the PIC register. Fixes Bugzilla #418.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 11 Jul 2007 06:26:22 +0000
parents 8a858076f39d
children 940fddb81bea
line wrap: on
line diff
--- a/src/video/SDL_yuv_sw.c	Wed Jul 11 05:55:10 2007 +0000
+++ b/src/video/SDL_yuv_sw.c	Wed Jul 11 06:26:22 2007 +0000
@@ -121,7 +121,7 @@
 
 /* The colorspace conversion functions */
 
-#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
+#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 extern void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
                                      unsigned char *lum, unsigned char *cr,
                                      unsigned char *cb, unsigned char *out,
@@ -1061,7 +1061,7 @@
 	    case SDL_YV12_OVERLAY:
 	    case SDL_IYUV_OVERLAY:
 		if ( display->format->BytesPerPixel == 2 ) {
-#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
+#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 			/* inline assembly functions */
 			if ( SDL_HasMMX() && (Rmask == 0xF800) &&
 			                     (Gmask == 0x07E0) &&
@@ -1083,7 +1083,7 @@
 			swdata->Display2X = Color24DitherYV12Mod2X;
 		}
 		if ( display->format->BytesPerPixel == 4 ) {
-#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
+#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
 			/* inline assembly functions */
 			if ( SDL_HasMMX() && (Rmask == 0x00FF0000) &&
 			                     (Gmask == 0x0000FF00) &&