/*++\r
\r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
; if (Source == Destination) => do nothing\r
; if (Source + Count <= Destination) => regular copy\r
; if (Destination + Count <= Source) => regular copy\r
+ ; if (Source >= Destination) => regular copy\r
; otherwise, do a reverse copy\r
mov eax, esi\r
add eax, ecx ; Source + Count\r
cmp eax, edi\r
- jle _StartByteCopy\r
+ jbe _StartByteCopy\r
\r
mov eax, edi\r
add eax, ecx ; Dest + Count\r
cmp eax, esi\r
- jle _StartByteCopy\r
+ jbe _StartByteCopy\r
\r
cmp esi, edi\r
je _CopyMemDone \r
- jl _CopyOverlapped ; too bad -- overlaps\r
+ jb _CopyOverlapped ; too bad -- overlaps\r
\r
; Pick up misaligned start bytes to get destination pointer 4-byte aligned\r
_StartByteCopy:\r