Merge r3005:3006 from branches/SDL-1.2: Alpha blending MMX/3DNow register bug.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 04 Apr 2007 09:36:25 +0000
changeset 2101c4e0afbcf1f6
parent 2100 62debeaac5e9
child 2102 0975e24a3670
Merge r3005:3006 from branches/SDL-1.2: Alpha blending MMX/3DNow register bug.
src/video/SDL_blit_A.c
     1.1 --- a/src/video/SDL_blit_A.c	Sun Apr 01 03:28:36 2007 +0000
     1.2 +++ b/src/video/SDL_blit_A.c	Wed Apr 04 09:36:25 2007 +0000
     1.3 @@ -387,7 +387,9 @@
     1.4      packsswb_r2r(mm6, mm3);     /* 0000FFFF -> mm3 */
     1.5      pxor_r2r(mm0, mm3);         /* 0000F000 -> mm3 (~channel mask) */
     1.6      /* get alpha channel shift */
     1.7 -    movd_m2r(sf->Ashift, mm5);  /* Ashift -> mm5 */
     1.8 +    __asm__ __volatile__ (
     1.9 +        "movd %0, %%mm5"
    1.10 +        : : "rm" ((Uint32) sf->Ashift) ); /* Ashift -> mm5 */
    1.11  
    1.12      while (height--) {
    1.13  	    /* *INDENT-OFF* */
    1.14 @@ -1632,7 +1634,6 @@
    1.15      int dstskip = info->d_skip >> 2;
    1.16      SDL_PixelFormat *sf = info->src;
    1.17      Uint32 amask = sf->Amask;
    1.18 -    Uint32 ashift = sf->Ashift;
    1.19  
    1.20      __asm__(
    1.21                 /* make mm6 all zeros. */
    1.22 @@ -1650,7 +1651,7 @@
    1.23                 "pxor      %%mm4, %%mm3\n\t"     /* 0000F000 -> mm3 (~channel mask) */
    1.24                 /* get alpha channel shift */
    1.25                 "movd      %1, %%mm5\n\t"        /* Ashift -> mm5 */
    1.26 -  : /* nothing */ :            "m"(amask), "m"(ashift));
    1.27 +  : /* nothing */ :            "rm"(amask), "rm"((Uint32) sf->Ashift));
    1.28  
    1.29      while (height--) {
    1.30