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
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
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.
movq prescale, %mm6
movq scale, %mm7
- shrl $2, %ecx
+ sarl $2, %ecx
+ jle .L01 /* Bail early if the count is negative. */
jmp .L02
.L03: