# HG changeset patch # User Ryan C. Gordon # Date 1175679385 0 # Node ID c4e0afbcf1f6b4a49b4a436caa5024aa7b3b27b2 # Parent 62debeaac5e9ad57256daa5685c37a40b01e00de Merge r3005:3006 from branches/SDL-1.2: Alpha blending MMX/3DNow register bug. diff -r 62debeaac5e9 -r c4e0afbcf1f6 src/video/SDL_blit_A.c --- a/src/video/SDL_blit_A.c Sun Apr 01 03:28:36 2007 +0000 +++ b/src/video/SDL_blit_A.c Wed Apr 04 09:36:25 2007 +0000 @@ -387,7 +387,9 @@ packsswb_r2r(mm6, mm3); /* 0000FFFF -> mm3 */ pxor_r2r(mm0, mm3); /* 0000F000 -> mm3 (~channel mask) */ /* get alpha channel shift */ - movd_m2r(sf->Ashift, mm5); /* Ashift -> mm5 */ + __asm__ __volatile__ ( + "movd %0, %%mm5" + : : "rm" ((Uint32) sf->Ashift) ); /* Ashift -> mm5 */ while (height--) { /* *INDENT-OFF* */ @@ -1632,7 +1634,6 @@ int dstskip = info->d_skip >> 2; SDL_PixelFormat *sf = info->src; Uint32 amask = sf->Amask; - Uint32 ashift = sf->Ashift; __asm__( /* make mm6 all zeros. */ @@ -1650,7 +1651,7 @@ "pxor %%mm4, %%mm3\n\t" /* 0000F000 -> mm3 (~channel mask) */ /* get alpha channel shift */ "movd %1, %%mm5\n\t" /* Ashift -> mm5 */ - : /* nothing */ : "m"(amask), "m"(ashift)); + : /* nothing */ : "rm"(amask), "rm"((Uint32) sf->Ashift)); while (height--) {