# HG changeset patch # User Ryan C. Gordon # Date 1175679149 0 # Node ID d65b4a73c9911e039a196c2a02ccdd135d7ca601 # Parent 79a4c90175507879024d959966c40c6aaf2742f6 BlitRGBtoRGBPixelAlphaMMX() is putting the wrong value into a register. Thanks to Alex Volkov for following up on this. Fixes Bugzilla #390. diff -r 79a4c9017550 -r d65b4a73c991 src/video/SDL_blit_A.c --- a/src/video/SDL_blit_A.c Wed Apr 04 09:15:39 2007 +0000 +++ b/src/video/SDL_blit_A.c Wed Apr 04 09:32:29 2007 +0000 @@ -369,7 +369,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--) { DUFFS_LOOP4({ @@ -1566,7 +1568,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. */ @@ -1588,7 +1589,7 @@ /* 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--) {