summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-09 10:09:26 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-09 10:09:26 +0000
commit2f8df870031e1aee978635bb5cfa2f5a23f9b3f5 (patch)
tree18a590de7215a0499a50bc462f4f0b4fd8f8ef7d /MdePkg
parentaba23ad92e37106b379d36a9a874cca2f0bdc829 (diff)
downloadedk2-2f8df870031e1aee978635bb5cfa2f5a23f9b3f5.tar.gz
edk2-2f8df870031e1aee978635bb5cfa2f5a23f9b3f5.tar.bz2
edk2-2f8df870031e1aee978635bb5cfa2f5a23f9b3f5.zip
Fix a bug in InternalMathDivRemU64x64(). The bug is that the 64-bit divisor is designed to be loaded to ecx:ebx but the high 4 byte of the divisor is forgotten to be loaded to ecx
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1693 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c
index 62034f7b84..2a893147c7 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.c
@@ -28,6 +28,7 @@ InternalMathDivRemU64x64 (
mov eax, dword ptr [Dividend + 0] // edx:eax <- dividend
mov edi, edx
mov esi, eax // edi:esi <- dividend
+ mov ecx, dword ptr [Divisor + 4]
mov ebx, dword ptr [Divisor + 0] // ecx:ebx <- divisor
BitLoop:
shr edx, 1