src/video/SDL_blit.c
branchSDL-1.2
changeset 3909 6832b00d3594
parent 1402 d910939febfa
child 4159 a1b03ba2fcd0
     1.1 --- a/src/video/SDL_blit.c	Sat Feb 03 08:17:12 2007 +0000
     1.2 +++ b/src/video/SDL_blit.c	Mon Feb 05 06:44:51 2007 +0000
     1.3 @@ -29,6 +29,9 @@
     1.4  
     1.5  #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && SDL_ASSEMBLY_ROUTINES
     1.6  #define MMX_ASMBLIT
     1.7 +#if (__GNUC__ > 2)  /* SSE instructions aren't in GCC 2. */
     1.8 +#define SSE_ASMBLIT
     1.9 +#endif
    1.10  #endif
    1.11  
    1.12  #if defined(MMX_ASMBLIT)
    1.13 @@ -122,6 +125,7 @@
    1.14  		SDL_memcpy(to, from, len&7);
    1.15  }
    1.16  
    1.17 +#ifdef SSE_ASMBLIT
    1.18  static __inline__ void SDL_memcpySSE(Uint8 *to, const Uint8 *from, int len)
    1.19  {
    1.20  	int i;
    1.21 @@ -146,6 +150,7 @@
    1.22  		SDL_memcpy(to, from, len&7);
    1.23  }
    1.24  #endif
    1.25 +#endif
    1.26  
    1.27  static void SDL_BlitCopy(SDL_BlitInfo *info)
    1.28  {
    1.29 @@ -159,7 +164,8 @@
    1.30  	dst = info->d_pixels;
    1.31  	srcskip = w+info->s_skip;
    1.32  	dstskip = w+info->d_skip;
    1.33 -#ifdef MMX_ASMBLIT
    1.34 +
    1.35 +#ifdef SSE_ASMBLIT
    1.36  	if(SDL_HasSSE())
    1.37  	{
    1.38  		while ( h-- ) {
    1.39 @@ -172,6 +178,8 @@
    1.40  		::);
    1.41  	}
    1.42  	else
    1.43 +#endif
    1.44 +#ifdef MMX_ASMBLIT
    1.45  	if(SDL_HasMMX())
    1.46  	{
    1.47  		while ( h-- ) {