src/video/SDL_blit.c
branchSDL-1.2
changeset 3909 6832b00d3594
parent 1402 d910939febfa
child 4159 a1b03ba2fcd0
--- a/src/video/SDL_blit.c	Sat Feb 03 08:17:12 2007 +0000
+++ b/src/video/SDL_blit.c	Mon Feb 05 06:44:51 2007 +0000
@@ -29,6 +29,9 @@
 
 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && SDL_ASSEMBLY_ROUTINES
 #define MMX_ASMBLIT
+#if (__GNUC__ > 2)  /* SSE instructions aren't in GCC 2. */
+#define SSE_ASMBLIT
+#endif
 #endif
 
 #if defined(MMX_ASMBLIT)
@@ -122,6 +125,7 @@
 		SDL_memcpy(to, from, len&7);
 }
 
+#ifdef SSE_ASMBLIT
 static __inline__ void SDL_memcpySSE(Uint8 *to, const Uint8 *from, int len)
 {
 	int i;
@@ -146,6 +150,7 @@
 		SDL_memcpy(to, from, len&7);
 }
 #endif
+#endif
 
 static void SDL_BlitCopy(SDL_BlitInfo *info)
 {
@@ -159,7 +164,8 @@
 	dst = info->d_pixels;
 	srcskip = w+info->s_skip;
 	dstskip = w+info->d_skip;
-#ifdef MMX_ASMBLIT
+
+#ifdef SSE_ASMBLIT
 	if(SDL_HasSSE())
 	{
 		while ( h-- ) {
@@ -172,6 +178,8 @@
 		::);
 	}
 	else
+#endif
+#ifdef MMX_ASMBLIT
 	if(SDL_HasMMX())
 	{
 		while ( h-- ) {