# HG changeset patch # User Ryan C. Gordon # Date 1180853526 0 # Node ID 259aaca0fb0cc4d024c57877803a1affbcaaa2e7 # Parent 14bec334705faffe678f058b069ad1df687cdd17 Use system memset/memcpy on Mac OS X, since Apple hand-tunes these for each processor they ship (and thus, it's likely to beat our code on PowerPC and Intel and whatever variants or new archs show up later). diff -r 14bec334705f -r 259aaca0fb0c include/SDL_stdinc.h --- a/include/SDL_stdinc.h Tue May 29 12:01:07 2007 +0000 +++ b/include/SDL_stdinc.h Sun Jun 03 06:52:06 2007 +0000 @@ -234,7 +234,10 @@ extern DECLSPEC void * SDLCALL SDL_memset(void *dst, int c, size_t len); #endif -#if defined(__GNUC__) && defined(i386) +/* We can count on memset existing on Mac OS X and being well-tuned. */ +#if defined(__MACH__) && defined(__APPLE__) +#define SDL_memset4(dst, val, len) memset(dst, val, (len)*4) +#elif defined(__GNUC__) && defined(i386) #define SDL_memset4(dst, val, len) \ do { \ int u0, u1, u2; \ @@ -263,7 +266,10 @@ } while(0) #endif -#if defined(__GNUC__) && defined(i386) +/* We can count on memcpy existing on Mac OS X and being well-tuned. */ +#if defined(__MACH__) && defined(__APPLE__) +#define SDL_memcpy(dst, src, len) memcpy(dst, src, len) +#elif defined(__GNUC__) && defined(i386) #define SDL_memcpy(dst, src, len) \ do { \ int u0, u1, u2; \ @@ -292,7 +298,10 @@ #endif #endif -#if defined(__GNUC__) && defined(i386) +/* We can count on memcpy existing on Mac OS X and being well-tuned. */ +#if defined(__MACH__) && defined(__APPLE__) +#define SDL_memcpy4(dst, src, len) memcpy(dst, src, (len)*4) +#elif defined(__GNUC__) && defined(i386) #define SDL_memcpy4(dst, src, len) \ do { \ int ecx, edi, esi; \