From 22353b17c02eff5e6b24519fc8b106470fe830a7 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Mon, 21 Jul 2008 01:42:14 +0000 Subject: Fix a bug in Power10U64. Power10U64 should clean up the stack after calling MultU64x32. It also should load eax and edx with the initial value just in case it return directly when "Power" is zero. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5528 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c index e8e1652db2..1310290afb 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.c @@ -50,6 +50,8 @@ Returns: --*/ { __asm { + mov eax, dword ptr Operand[0] + mov edx, dword ptr Operand[4] mov ecx, Power jcxz _Power10U64_Done @@ -58,6 +60,7 @@ _Power10U64_Wend: push dword ptr Operand[4] push dword ptr Operand[0] call MultU64x32 + add esp, 0Ch mov dword ptr Operand[0], eax mov dword ptr Operand[4], edx loop _Power10U64_Wend -- cgit v1.2.3