# HG changeset patch # User Ryan C. Gordon # Date 1184397994 0 # Node ID 940fddb81bea0bf236ec985e4d2ba19529bba555 # Parent d634945c6172d62eeefd4227adaf431f07c35ba2 Mac OS X/x86 won't build the MMX/YUV inline assembly without optimizations enabled (not enough registers), so for now, we only build it if we see the __OPTIMIZE__ #define, which GCC provides when you build at -O1 or higher. diff -r d634945c6172 -r 940fddb81bea src/video/SDL_yuv_mmx.c --- a/src/video/SDL_yuv_mmx.c Sat Jul 14 07:06:46 2007 +0000 +++ b/src/video/SDL_yuv_mmx.c Sat Jul 14 07:26:34 2007 +0000 @@ -21,7 +21,7 @@ */ #include "SDL_config.h" -#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES +#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES #include "SDL_stdinc.h" diff -r d634945c6172 -r 940fddb81bea src/video/SDL_yuv_sw.c --- a/src/video/SDL_yuv_sw.c Sat Jul 14 07:06:46 2007 +0000 +++ b/src/video/SDL_yuv_sw.c Sat Jul 14 07:26:34 2007 +0000 @@ -121,7 +121,7 @@ /* The colorspace conversion functions */ -#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES +#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && 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 (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES +#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && 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 (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES +#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES /* inline assembly functions */ if ( SDL_HasMMX() && (Rmask == 0x00FF0000) && (Gmask == 0x0000FF00) &&