src/video/SDL_fillrect.c
changeset 7679 b1fe132bc6a4
parent 7678 286c42d7c5ed
child 7680 6ab959ebea26
     1.1 --- a/src/video/SDL_fillrect.c	Wed Aug 21 09:47:10 2013 -0300
     1.2 +++ b/src/video/SDL_fillrect.c	Wed Aug 21 10:12:16 2013 -0300
     1.3 @@ -36,12 +36,13 @@
     1.4      c128.m128_u32[3] = color;
     1.5  #else
     1.6  #define SSE_BEGIN \
     1.7 +    __m128 c128; \
     1.8      DECLARE_ALIGNED(Uint32, cccc[4], 16); \
     1.9      cccc[0] = color; \
    1.10      cccc[1] = color; \
    1.11      cccc[2] = color; \
    1.12      cccc[3] = color; \
    1.13 -    __m128 c128 = *(__m128 *)cccc;
    1.14 +    c128 = *(__m128 *)cccc;
    1.15  #endif
    1.16  
    1.17  #define SSE_WORK \
    1.18 @@ -59,11 +60,14 @@
    1.19  static void \
    1.20  SDL_FillRect##bpp##SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \
    1.21  { \
    1.22 +    int i, n; \
    1.23 +    Uint8 *p = NULL; \
    1.24 + \
    1.25      SSE_BEGIN; \
    1.26   \
    1.27      while (h--) { \
    1.28 -        int i, n = w * bpp; \
    1.29 -        Uint8 *p = pixels; \
    1.30 +        n = w * bpp; \
    1.31 +        p = pixels; \
    1.32   \
    1.33          if (n > 63) { \
    1.34              int adjust = 16 - ((uintptr_t)p & 15); \
    1.35 @@ -94,11 +98,13 @@
    1.36  static void
    1.37  SDL_FillRect1SSE(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
    1.38  {
    1.39 +    int i, n;
    1.40 +    Uint8 *p = NULL;
    1.41 +    
    1.42      SSE_BEGIN;
    1.43 -
    1.44      while (h--) {
    1.45 -        int i, n = w;
    1.46 -        Uint8 *p = pixels;
    1.47 +        n = w;
    1.48 +        p = pixels;
    1.49  
    1.50          if (n > 63) {
    1.51              int adjust = 16 - ((uintptr_t)p & 15);
    1.52 @@ -152,11 +158,14 @@
    1.53  static void \
    1.54  SDL_FillRect##bpp##MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \
    1.55  { \
    1.56 +    int i, n; \
    1.57 +    Uint8 *p = NULL; \
    1.58 + \
    1.59      MMX_BEGIN; \
    1.60   \
    1.61      while (h--) { \
    1.62 -        int i, n = w * bpp; \
    1.63 -        Uint8 *p = pixels; \
    1.64 +        n = w * bpp; \
    1.65 +        p = pixels; \
    1.66   \
    1.67          if (n > 63) { \
    1.68              int adjust = 8 - ((uintptr_t)p & 7); \