Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11094 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -75,16 +75,16 @@ ASM_PFX(EfiCommonLibCopyMem):
|
||||
movl %esi, %eax
|
||||
addl %ecx, %eax # Source + Count
|
||||
cmpl %edi, %eax
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
movl %edi, %eax
|
||||
addl %ecx, %eax # Dest + Count
|
||||
cmpl %esi, %eax
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
cmpl %edi, %esi
|
||||
je _CopyMemDone
|
||||
jl _CopyOverlapped # too bad -- overlaps
|
||||
jb _CopyOverlapped # too bad -- overlaps
|
||||
|
||||
# Pick up misaligned start bytes to get destination pointer 4-byte aligned
|
||||
_StartByteCopy:
|
||||
|
@@ -73,16 +73,16 @@ EfiCommonLibCopyMem PROC
|
||||
mov eax, esi
|
||||
add eax, ecx ; Source + Count
|
||||
cmp eax, edi
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
mov eax, edi
|
||||
add eax, ecx ; Dest + Count
|
||||
cmp eax, esi
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
cmp esi, edi
|
||||
je _CopyMemDone
|
||||
jl _CopyOverlapped ; too bad -- overlaps
|
||||
jb _CopyOverlapped ; too bad -- overlaps
|
||||
|
||||
; Pick up misaligned start bytes to get destination pointer 4-byte aligned
|
||||
_StartByteCopy:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -58,20 +58,21 @@ Returns:
|
||||
; if (Source == Destination) => do nothing
|
||||
; if (Source + Count <= Destination) => regular copy
|
||||
; if (Destination + Count <= Source) => regular copy
|
||||
; if (Source >= Destination) => regular copy
|
||||
; otherwise, do a reverse copy
|
||||
mov eax, esi
|
||||
add eax, ecx ; Source + Count
|
||||
cmp eax, edi
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
mov eax, edi
|
||||
add eax, ecx ; Dest + Count
|
||||
cmp eax, esi
|
||||
jle _StartByteCopy
|
||||
jbe _StartByteCopy
|
||||
|
||||
cmp esi, edi
|
||||
je _CopyMemDone
|
||||
jl _CopyOverlapped ; too bad -- overlaps
|
||||
jb _CopyOverlapped ; too bad -- overlaps
|
||||
|
||||
; Pick up misaligned start bytes to get destination pointer 4-byte aligned
|
||||
_StartByteCopy:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -104,13 +104,13 @@ _CopyBlocks:
|
||||
copyxmm:
|
||||
|
||||
movdqu xmm0, OWORD PTR ds:[esi]
|
||||
movdqu QWORD PTR ds:[edi], xmm0
|
||||
movdqu OWORD PTR ds:[edi], xmm0
|
||||
movdqu xmm1, OWORD PTR ds:[esi+16]
|
||||
movdqu QWORD PTR ds:[edi+16], xmm1
|
||||
movdqu OWORD PTR ds:[edi+16], xmm1
|
||||
movdqu xmm2, OWORD PTR ds:[esi+32]
|
||||
movdqu QWORD PTR ds:[edi+32], xmm2
|
||||
movdqu OWORD PTR ds:[edi+32], xmm2
|
||||
movdqu xmm3, OWORD PTR ds:[esi+48]
|
||||
movdqu QWORD PTR ds:[edi+48], xmm3
|
||||
movdqu OWORD PTR ds:[edi+48], xmm3
|
||||
|
||||
add edi, 64
|
||||
add esi, 64
|
||||
|
@@ -65,11 +65,13 @@ ASM_PFX(Power10U64):
|
||||
jcxz _Power10U64_Done
|
||||
|
||||
_Power10U64_Wend:
|
||||
pushl %ecx
|
||||
pushl $10
|
||||
push 0xC(%ebp)
|
||||
push 0x8(%ebp)
|
||||
call ASM_PFX(MultU64x32)
|
||||
addl $0xc, %esp
|
||||
popl %ecx
|
||||
movl %eax, 8(%ebp) # dword ptr Operand[0]
|
||||
movl %edx, 0xC(%ebp) # dword ptr Operand[4]
|
||||
loopl _Power10U64_Wend
|
||||
|
@@ -64,11 +64,13 @@ Power10U64 PROC
|
||||
jcxz _Power10U64_Done
|
||||
|
||||
_Power10U64_Wend:
|
||||
push ecx
|
||||
push 10
|
||||
push [ebp + 0Ch]; dword ptr Operand[4]
|
||||
push [ebp + 8]; dword ptr Operand[0]
|
||||
call MultU64x32
|
||||
add esp, 0cH
|
||||
pop ecx
|
||||
mov [ebp + 8] , eax; dword ptr Operand[0]
|
||||
mov [ebp + 0Ch] , edx; dword ptr Operand[4]
|
||||
loop _Power10U64_Wend
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -56,11 +56,13 @@ Returns:
|
||||
jcxz _Power10U64_Done
|
||||
|
||||
_Power10U64_Wend:
|
||||
push ecx
|
||||
push 10
|
||||
push dword ptr Operand[4]
|
||||
push dword ptr Operand[0]
|
||||
call MultU64x32
|
||||
add esp, 0Ch
|
||||
pop ecx
|
||||
mov dword ptr Operand[0], eax
|
||||
mov dword ptr Operand[4], edx
|
||||
loop _Power10U64_Wend
|
||||
|
Reference in New Issue
Block a user