include/SDL_stdinc.h
changeset 5325 b9c224e16859
parent 5262 b530ef003506
child 5481 22dfc3958dc3
     1.1 --- a/include/SDL_stdinc.h	Wed Feb 16 14:38:49 2011 -0800
     1.2 +++ b/include/SDL_stdinc.h	Wed Feb 16 15:25:10 2011 -0800
     1.3 @@ -352,8 +352,8 @@
     1.4  #endif
     1.5  
     1.6  /* We can count on memcpy existing on Mac OS X and being well-tuned. */
     1.7 -#if defined(__MACH__) && defined(__APPLE__)
     1.8 -#define SDL_memcpy(dst, src, len) memcpy(dst, src, len)
     1.9 +#if defined(__MACOSX__)
    1.10 +#define SDL_memcpy      memcpy
    1.11  #elif defined(__GNUC__) && defined(i386)
    1.12  #define SDL_memcpy(dst, src, len)					  \
    1.13  do {									  \
    1.14 @@ -385,8 +385,8 @@
    1.15  #endif
    1.16  
    1.17  /* We can count on memcpy existing on Mac OS X and being well-tuned. */
    1.18 -#if defined(__MACH__) && defined(__APPLE__)
    1.19 -#define SDL_memcpy4(dst, src, len) memcpy(dst, src, (len)*4)
    1.20 +#if defined(__MACOSX__)
    1.21 +#define SDL_memcpy4(dst, src, len)	SDL_memcpy((dst), (src), (len) << 2)
    1.22  #elif defined(__GNUC__) && defined(i386)
    1.23  #define SDL_memcpy4(dst, src, len)				\
    1.24  do {								\
    1.25 @@ -400,54 +400,14 @@
    1.26  } while(0)
    1.27  #endif
    1.28  #ifndef SDL_memcpy4
    1.29 -#define SDL_memcpy4(dst, src, len)	SDL_memcpy(dst, src, (len) << 2)
    1.30 -#endif
    1.31 -
    1.32 -#if defined(__GNUC__) && defined(i386)
    1.33 -#define SDL_revcpy(dst, src, len)			\
    1.34 -do {							\
    1.35 -	int u0, u1, u2;					\
    1.36 -	char *dstp = SDL_static_cast(char *, dst);			\
    1.37 -	char *srcp = SDL_static_cast(char *, src);			\
    1.38 -	int n = (len);					\
    1.39 -	if ( n >= 4 ) {					\
    1.40 -	__asm__ __volatile__ (				\
    1.41 -		"std\n\t"				\
    1.42 -		"rep ; movsl\n\t"			\
    1.43 -		"cld\n\t"				\
    1.44 -		: "=&c" (u0), "=&D" (u1), "=&S" (u2)	\
    1.45 -		: "0" (n >> 2),				\
    1.46 -		  "1" (dstp+(n-4)), "2" (srcp+(n-4))	\
    1.47 -		: "memory" );				\
    1.48 -	}						\
    1.49 -	switch (n & 3) {				\
    1.50 -		case 3: dstp[2] = srcp[2];		\
    1.51 -		case 2: dstp[1] = srcp[1];		\
    1.52 -		case 1: dstp[0] = srcp[0];		\
    1.53 -			break;				\
    1.54 -		default:				\
    1.55 -			break;				\
    1.56 -	}						\
    1.57 -} while(0)
    1.58 -#endif
    1.59 -#ifndef SDL_revcpy
    1.60 -extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src,
    1.61 -                                         size_t len);
    1.62 +#define SDL_memcpy4(dst, src, len)	SDL_memcpy((dst), (src), (len) << 2)
    1.63  #endif
    1.64  
    1.65  #ifdef HAVE_MEMMOVE
    1.66  #define SDL_memmove     memmove
    1.67 -#elif defined(HAVE_BCOPY)
    1.68 -#define SDL_memmove(d, s, n)	bcopy((s), (d), (n))
    1.69  #else
    1.70 -#define SDL_memmove(dst, src, len)			\
    1.71 -do {							\
    1.72 -	if ( dst < src ) {				\
    1.73 -		SDL_memcpy(dst, src, len);		\
    1.74 -	} else {					\
    1.75 -		SDL_revcpy(dst, src, len);		\
    1.76 -	}						\
    1.77 -} while(0)
    1.78 +extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src,
    1.79 +                                          size_t len);
    1.80  #endif
    1.81  
    1.82  #ifdef HAVE_MEMCMP