stdinc: On macOS and iOS, use memset_pattern4() for SDL_memset4().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 04 Sep 2019 00:39:47 -0400
changeset 13056ed80f97ebe81
parent 13052 6203d73874ab
child 13057 86d690b71e35
stdinc: On macOS and iOS, use memset_pattern4() for SDL_memset4().

Fixes Bugzilla #4724.
include/SDL_stdinc.h
     1.1 --- a/include/SDL_stdinc.h	Tue Sep 03 11:55:20 2019 -0700
     1.2 +++ b/include/SDL_stdinc.h	Wed Sep 04 00:39:47 2019 -0400
     1.3 @@ -420,7 +420,9 @@
     1.4  /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
     1.5  SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
     1.6  {
     1.7 -#if defined(__GNUC__) && defined(i386)
     1.8 +#ifdef __APPLE__
     1.9 +    memset_pattern4(dst, &val, dwords * 4);
    1.10 +#elif defined(__GNUC__) && defined(i386)
    1.11      int u0, u1, u2;
    1.12      __asm__ __volatile__ (
    1.13          "cld \n\t"