include/SDL_stdinc.h
changeset 7382 898992405fa7
parent 7351 668a3dc28361
child 7385 6e90315f859a
     1.1 --- a/include/SDL_stdinc.h	Mon Jul 08 17:51:17 2013 -0400
     1.2 +++ b/include/SDL_stdinc.h	Mon Jul 08 23:22:36 2013 -0400
     1.3 @@ -257,33 +257,9 @@
     1.4  /* Note that the semantics are different from memset() in that this is a 32-bit assignment */
     1.5  SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
     1.6  {
     1.7 -#if defined(__GNUC__) && defined(i386)
     1.8 -    int u0, u1, u2;
     1.9 -    __asm__ __volatile__ (
    1.10 -        "cld \n\t"
    1.11 -        "rep ; stosl \n\t"
    1.12 -        : "=&D" (u0), "=&a" (u1), "=&c" (u2)
    1.13 -        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
    1.14 -        : "memory"
    1.15 -    );
    1.16 -#else
    1.17 -    size_t _n = (dwords + 3) / 4;
    1.18 -    Uint32 *_p = SDL_static_cast(Uint32 *, dst);
    1.19 -    Uint32 _val = (val);
    1.20 -    if (dwords == 0)
    1.21 -        return;
    1.22 -    switch (dwords % 4)
    1.23 -    {
    1.24 -        case 0: do {    *_p++ = _val;
    1.25 -        case 3:         *_p++ = _val;
    1.26 -        case 2:         *_p++ = _val;
    1.27 -        case 1:         *_p++ = _val;
    1.28 -        } while ( --_n );
    1.29 -    }
    1.30 -#endif
    1.31 +    SDL_memset(dst, val, dwords * 4);
    1.32  }
    1.33  
    1.34 -
    1.35  extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
    1.36  
    1.37  SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)