summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32
diff options
context:
space:
mode:
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.asm6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.c9
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemSSE2.c10
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S2
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.asm2
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c4
7 files changed, 23 insertions, 16 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
index ed41ff994d..580c3fe94b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
@@ -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:
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.asm
index 7cf8b7f630..275e29b0c5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.asm
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.asm
@@ -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:
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.c b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.c
index 0acfdc9e5c..cb6b8ffe89 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.c
@@ -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:
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemSSE2.c b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemSSE2.c
index 9a15288f5c..595c008a04 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemSSE2.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMemSSE2.c
@@ -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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
index b22609afb3..a40c56bcb1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
@@ -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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.asm b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.asm
index b7d3373fd3..b6e25320d4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.asm
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.asm
@@ -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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c
index c74e7933dd..2a31fe133e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c
@@ -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