[AD] stretch_blit() and asm code

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


See the thread on [AL] Fw: Program window disappearing when dragging it
around

The problem is the same as the one which was fixed several months ago for
the blit() functions: %es is not restored early enough (before calling
UNWRITE_BANK) in the asm code of do_stretch in src/i386/imisc.s .

The fix is below:

--- cvsroot/allegro/src/i386/imisc.s Sat Dec  1 20:16:36 2001
+++ allegro/src/i386/imisc.s Fri Jun 21 09:23:00 2002
@@ -260,10 +260,10 @@

    pushl %ebp
    movl %esp, %ebp
-   pushw %es
    pushl %edi
    pushl %esi
    pushl %ebx
+   pushw %es

    movl DEST, %edx
    movw BMP_SEG(%edx), %es       /* load destination segment */
@@ -387,6 +387,8 @@


 stretch_done:
+   popw %es
+
    movl SOURCE, %edx
    UNWRITE_BANK()

@@ -396,7 +398,6 @@
    popl %ebx
    popl %esi
    popl %edi
-   popw %es
    movl %ebp, %esp
    popl %ebp
    ret                           /* end of _do_stretch() */


I'm going to test it on the 4 OSes I have on my machine and then commit it
on the 4.0.x branch, because I think it is safe, unless someone disagrees.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/