summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibOptDxe/Ia32
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-30 02:59:35 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-30 02:59:35 +0000
commit8672ccb305fb50a5a51af98c58da7983db8e4447 (patch)
treeb189d9831a7fd3049e55e63c593e4ef4b9c73e3e /MdePkg/Library/BaseMemoryLibOptDxe/Ia32
parent687add7035b114cbb520725d3dc1ce80b3728ecd (diff)
downloadedk2-platforms-8672ccb305fb50a5a51af98c58da7983db8e4447.tar.xz
Fix the bug that SetMem.S of BaseMemoryLibOptDxe is incorrect.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8207 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibOptDxe/Ia32')
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S17
1 files changed, 6 insertions, 11 deletions
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
index 441f347c2f..726ccd76fb 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
@@ -21,9 +21,6 @@
#
#------------------------------------------------------------------------------
- .386:
- .code:
-
.globl ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
@@ -38,18 +35,16 @@ ASM_PFX(InternalMemSetMem):
push %edi
movl 12(%esp),%ecx
movb 16(%esp),%al
- movb %ah, %al
+ movb %al, %ah
shrd $16, %eax, %edx
shld $16, %edx, %eax
- movl %edx, %ecx
- movl 8(%esp),%edi
- shrd $2, %ecx, %ecx
- rep
- stosl
movl %ecx, %edx
+ movl 8(%esp),%edi
+ shr $2, %ecx
+ rep stosl
+ movl %edx, %ecx
andl $3, %ecx
- rep
- stosb
+ rep stosb
movl 8(%esp),%eax
pop %edi
ret