Skip to content

Commit

Permalink
stdinc: On macOS and iOS, use memset_pattern4() for SDL_memset4().
Browse files Browse the repository at this point in the history
Fixes Bugzilla #4724.
  • Loading branch information
icculus committed Sep 4, 2019
1 parent 892c8d5 commit f49c07b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/SDL_stdinc.h
Expand Up @@ -420,7 +420,9 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c,
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
{
#if defined(__GNUC__) && defined(i386)
#ifdef __APPLE__
memset_pattern4(dst, &val, dwords * 4);
#elif defined(__GNUC__) && defined(i386)
int u0, u1, u2;
__asm__ __volatile__ (
"cld \n\t"
Expand Down

0 comments on commit f49c07b

Please sign in to comment.