aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-16 19:02:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-16 19:02:38 -0700
commita5545eebb18fd3da0df4976f3c64b9e38f028a7f (patch)
treecb0e19b3d93aa8e91bc316d7dd55bc8f8970bdb9 /core
parente7ffeff65d02ea5e7ebd03adfc70376bc8789aa5 (diff)
downloadsyslinux.git-a5545eebb18fd3da0df4976f3c64b9e38f028a7f.tar.gz
syslinux.git-a5545eebb18fd3da0df4976f3c64b9e38f028a7f.tar.xz
syslinux.git-a5545eebb18fd3da0df4976f3c64b9e38f028a7f.zip
bcopyxx/memmove: fix alignment logic for reverse moves
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>
Diffstat (limited to 'core')
-rw-r--r--core/bcopyxx.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/bcopyxx.inc b/core/bcopyxx.inc
index 4689788e..22b32b5a 100644
--- a/core/bcopyxx.inc
+++ b/core/bcopyxx.inc
@@ -103,7 +103,7 @@ pm_bcopy:
; Initial alignment
mov dx,di
shr dx,1
- jnc .raa1
+ jc .raa1
a32 movsb
dec ecx
.raa1:
@@ -114,7 +114,7 @@ pm_bcopy:
cmp ecx,2
jb .r_tiny
shr dx,1
- jnc .raa2
+ jc .raa2
a32 movsw
sub ecx,2
.raa2: