The alignment logic for reverse moves is reversed, because the initial
edi, and therefore edx, points to the last byte, not to one byte
beyond the end. Therefore, in the fully aligned case it will end in
11 binary, not in 00 binary as for the forward case.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
/* Initial alignment */
movl %edi,%edx
shrl $1,%edx
- jnc 21f
+ jc 21f
movsb
decl %ecx
21:
cmpl $2,%ecx
jb 23f
shrl $1,%edx
- jnc 22f
+ jc 22f
movsw
subl $2,%ecx
22:
; Initial alignment
mov dx,di
shr dx,1
- jnc .raa1
+ jc .raa1
a32 movsb
dec ecx
.raa1:
cmp ecx,2
jb .r_tiny
shr dx,1
- jnc .raa2
+ jc .raa2
a32 movsw
sub ecx,2
.raa2: