[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
It seems the 16bit masked blit SSE code is broken. Here's a patch to fix it.
I've also removed an unused instruction in the other mask bliters.
--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/
Index: src/i386/iblit16.s
===================================================================
RCS file: /cvsroot/alleg/allegro/src/i386/iblit16.s,v
retrieving revision 1.8
diff -u -b -r1.8 iblit16.s
--- src/i386/iblit16.s 2001/08/30 06:51:00 1.8
+++ src/i386/iblit16.s 2001/10/04 01:42:01
@@ -623,7 +623,7 @@
addl $2, %edi;
cmpw %ax, %dx; /* Compare with mask */
je masked16_mmx_long;
- movw %ax, (%edi); /* Write the pixel */
+ movw %ax, -2(%edi); /* Write the pixel */
masked16_mmx_long:
@@ -654,7 +654,6 @@
pcmpeqw %mm1, %mm3; /* Compare with mask (%mm3, %mm6) */
pxor %mm4, %mm3; /* Turn 1->0 and 0->1 */
- addl $8, %esi; /* Update src */
maskmovq %mm3, %mm1; /* Write if not equal to mask. Note: maskmovq is an SSE instruction! */
_align_;
Index: src/i386/iblit8.s
===================================================================
RCS file: /cvsroot/alleg/allegro/src/i386/iblit8.s,v
retrieving revision 1.8
diff -u -b -r1.8 iblit8.s
--- src/i386/iblit8.s 2001/08/30 06:51:00 1.8
+++ src/i386/iblit8.s 2001/10/04 01:42:01
@@ -627,7 +627,6 @@
pcmpeqw %mm1, %mm3; /* Compare with mask (%mm3) */
pxor %mm4, %mm3; /* Turn 1->0 and 0->1 */
- addl $8, %esi; /* Update src */
maskmovq %mm3, %mm1; /* Write if not equal to mask. Note: maskmovq is an SSE instruction! */
_align_;
Index: src/i386/iblit32.s
===================================================================
RCS file: /cvsroot/alleg/allegro/src/i386/iblit32.s,v
retrieving revision 1.6
diff -u -b -r1.6 iblit32.s
--- src/i386/iblit32.s 2001/08/30 06:51:00 1.6
+++ src/i386/iblit32.s 2001/10/04 01:42:01
@@ -281,7 +281,6 @@
pcmpeqd %mm1, %mm3; /* Compare with mask (%mm3, %mm6) */
pxor %mm4, %mm3; /* Turn 1->0 and 0->1 */
- addl $8, %esi; /* Update src */
maskmovq %mm3, %mm1; /* Write if not equal to mask. Note: maskmovq is an SSE instruction! */
_align_;