diff options
author | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-30 05:42:49 +0000 |
---|---|---|
committer | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-30 05:42:49 +0000 |
commit | 49c80af423d4eecd932aa9831fbba3f74ea4a424 (patch) | |
tree | 5d94673809f70748baaecc570c7b8f592a9dcac0 /MdePkg/Library/BaseMemoryLibSse2 | |
parent | 9d6d8b24f36f782690a918ebabf8da88d54a050e (diff) | |
download | edk2-platforms-49c80af423d4eecd932aa9831fbba3f74ea4a424.tar.xz |
1. Fixed incorrect ASSERT conditions in wrapper functions.
2. Removed unnecessary SUB instructions in CompareMem.asm
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@318 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2')
4 files changed, 6 insertions, 7 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm index 4e35d1c858..3cf6fe7f73 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm +++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm @@ -39,7 +39,6 @@ InternalMemCompareMem PROC USES esi edi movzx eax, byte ptr [esi - 1]
movzx edx, byte ptr [edi - 1]
sub eax, edx
- sub eax, edx
ret
InternalMemCompareMem ENDP
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c index 827e6ecf67..3acbdac436 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c @@ -54,8 +54,8 @@ SetMem16 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c index 4b9d2413eb..620b69aef4 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c @@ -54,8 +54,8 @@ SetMem32 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c index dbf3b62782..73c28af4a1 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c @@ -54,8 +54,8 @@ SetMem64 ( {
ASSERT (Buffer != NULL);
ASSERT (Length <= MAX_ADDRESS - (UINTN)Buffer + 1);
- ASSERT ((((UINTN)Buffer) & 1) != 0);
- ASSERT ((Length & 1) != 0);
+ ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) != 0);
+ ASSERT ((Length & (sizeof (Value) - 1)) != 0);
if ((Length /= sizeof (Value)) == 0) {
return Buffer;
|