Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merged r3037:3038 from branches/SDL-1.2: Mac OS X memcpy/memset selec…

…tion.
  • Loading branch information
icculus committed Jun 3, 2007
1 parent 512caba commit c7c2385867c5bc8402975ce24126df881b630089
Showing with 12 additions and 3 deletions.
  1. +12 −3 include/SDL_stdinc.h
@@ -279,7 +279,10 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))

#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; \
@@ -308,7 +311,10 @@ do { \
} 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; \
@@ -338,7 +344,10 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src,
#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; \

0 comments on commit c7c2385

Please sign in to comment.