BlitRGBtoRGBPixelAlphaMMX() is putting the wrong value into a register.
Thanks to Alex Volkov for following up on this. Fixes Bugzilla #390. --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402296
This commit is contained in:
parent
31327331d9
commit
3a156ea6be
1 changed files with 4 additions and 3 deletions
|
@ -369,7 +369,9 @@ static void BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo *info)
|
||||||
packsswb_r2r(mm6, mm3); /* 0000FFFF -> mm3 */
|
packsswb_r2r(mm6, mm3); /* 0000FFFF -> mm3 */
|
||||||
pxor_r2r(mm0, mm3); /* 0000F000 -> mm3 (~channel mask) */
|
pxor_r2r(mm0, mm3); /* 0000F000 -> mm3 (~channel mask) */
|
||||||
/* get alpha channel shift */
|
/* get alpha channel shift */
|
||||||
movd_m2r(sf->Ashift, mm5); /* Ashift -> mm5 */
|
__asm__ __volatile__ (
|
||||||
|
"movd %0, %%mm5"
|
||||||
|
: : "rm" ((Uint32) sf->Ashift) ); /* Ashift -> mm5 */
|
||||||
|
|
||||||
while(height--) {
|
while(height--) {
|
||||||
DUFFS_LOOP4({
|
DUFFS_LOOP4({
|
||||||
|
@ -1566,7 +1568,6 @@ static void BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo *info)
|
||||||
int dstskip = info->d_skip >> 2;
|
int dstskip = info->d_skip >> 2;
|
||||||
SDL_PixelFormat* sf = info->src;
|
SDL_PixelFormat* sf = info->src;
|
||||||
Uint32 amask = sf->Amask;
|
Uint32 amask = sf->Amask;
|
||||||
Uint32 ashift = sf->Ashift;
|
|
||||||
|
|
||||||
__asm__ (
|
__asm__ (
|
||||||
/* make mm6 all zeros. */
|
/* make mm6 all zeros. */
|
||||||
|
@ -1588,7 +1589,7 @@ static void BlitRGBtoRGBPixelAlphaMMX3DNOW(SDL_BlitInfo *info)
|
||||||
/* get alpha channel shift */
|
/* get alpha channel shift */
|
||||||
"movd %1, %%mm5\n\t" /* Ashift -> mm5 */
|
"movd %1, %%mm5\n\t" /* Ashift -> mm5 */
|
||||||
|
|
||||||
: /* nothing */ : "m" (amask), "m" (ashift) );
|
: /* nothing */ : "rm" (amask), "rm" ((Uint32) sf->Ashift) );
|
||||||
|
|
||||||
while(height--) {
|
while(height--) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue