Index: src/mesa/x86/read_rgba_span_x86.S =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/x86/read_rgba_span_x86.S,v retrieving revision 1.4 diff -u -d -r1.4 read_rgba_span_x86.S --- src/mesa/x86/read_rgba_span_x86.S 4 Jan 2005 14:33:47 -0000 1.4 +++ src/mesa/x86/read_rgba_span_x86.S 5 Mar 2005 00:48:03 -0000 @@ -92,7 +92,7 @@ movl 12(%esp), %ecx /* destination pointer */ testl %edx, %edx - je .L20 /* Bail if there's nothing to do. */ + jle .L20 /* Bail if there's nothing to do. */ movl %ebx, %eax @@ -189,6 +189,9 @@ movl 24(%esp), %edx /* number of pixels to copy */ movl 20(%esp), %ecx /* destination pointer */ + testl %edx, %edx + jle .L35 /* Bail if there's nothing to do. */ + movl %esp, %ebp subl $16, %esp andl $0xfffffff0, %esp @@ -348,6 +351,9 @@ movl %ebx, %eax movl %edx, %esi + testl %edx, %edx + jle .L46 /* Bail if there's nothing to do. */ + /* If the source pointer isn't a multiple of 16 we have to process * a few pixels the "slow" way to get the address aligned for * the SSE fetch intsructions. @@ -528,7 +534,8 @@ movq prescale, %mm6 movq scale, %mm7 - shrl $2, %ecx + sarl $2, %ecx + jlt .L01 /* Bail early if the count is negative. */ jmp .L02 .L03: