From f49c07b5c464f702ac5f6b48361a96d98930b17f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 4 Sep 2019 00:39:47 -0400 Subject: [PATCH] stdinc: On macOS and iOS, use memset_pattern4() for SDL_memset4(). Fixes Bugzilla #4724. --- include/SDL_stdinc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index 6ef5e3a2ef885..a95700af2fdac 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -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"