summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseMemoryLibSse2
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-08 09:38:43 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-08 09:38:43 +0000
commit38bbd3d91c38481d18c1a7e2049473c951ee98ed (patch)
treeae4da246ac9d5b8501d017de66aecf1c7c8bb8b4 /MdePkg/Library/BaseMemoryLibSse2
parentd74eeda8a7ed223d49e59378f33b2bcfb1bb73b1 (diff)
downloadedk2-platforms-38bbd3d91c38481d18c1a7e2049473c951ee98ed.tar.xz
Code scrub:
MdePkg/Library/BaseCacheMaintenanceLib MdePkg/Library/BaseDebugLibNull MdePkg/Library/BaseIoLibIntrinsic MdePkg/Library/BaseLib MdePkg/Library/BaseMemoryLib MdePkg/Library/BaseMemoryLibMmx MdePkg/Library/BaseMemoryLibOptDxe MdePkg/Library/BaseMemoryLibOptPei MdePkg/Library/BaseMemoryLibRepStr MdePkg/Library/BaseMemoryLibSse2 MdePkg/Library/BasePeCoffGetEntryPointLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5426 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2')
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c23
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h4
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c2
13 files changed, 22 insertions, 27 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
index ccd38e1aef..031b7fcec6 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c
@@ -58,7 +58,7 @@ CompareMem (
IN UINTN Length
)
{
- if (Length == 0) {
+ if (0 == Length) {
return 0;
}
ASSERT (DestinationBuffer != NULL);
diff --git a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
index f957c8c850..09c18255aa 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c
@@ -52,7 +52,7 @@ CopyMem (
IN UINTN Length
)
{
- if (Length == 0) {
+ if (0 == Length) {
return DestinationBuffer;
}
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
index c13cd462e4..cf364c1d1f 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c
@@ -80,22 +80,17 @@ CompareGuid (
IN CONST GUID *Guid2
)
{
- UINT64 Guid1ValueLo;
- UINT64 Guid1ValueHi;
- UINT64 Guid2ValueLo;
- UINT64 Guid2ValueHi;
+ UINT64 LowPartOfGuid1;
+ UINT64 LowPartOfGuid2;
+ UINT64 HighPartOfGuid1;
+ UINT64 HighPartOfGuid2;
- Guid1ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid1);
- Guid2ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid2);
+ LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
+ LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
+ HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
+ HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
- Guid1ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid1 + 1);
- Guid2ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid2 + 1);
-
-
- return (BOOLEAN)
- ((Guid1ValueLo == Guid2ValueLo) &&
- (Guid1ValueHi == Guid2ValueHi)
- );
+ return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
index ceddbbe7a0..ce55f447c0 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
+++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h
@@ -51,7 +51,7 @@ InternalMemCopyMem (
Set Buffer to Value for Size bytes.
@param Buffer Memory to set.
- @param Size Number of bytes to set
+ @param Length Number of bytes to set
@param Value Value of the set operation.
@return Buffer
@@ -123,7 +123,7 @@ InternalMemSetMem64 (
Set Buffer to 0 for Size bytes.
@param Buffer Memory to set.
- @param Size Number of bytes to set
+ @param Length Number of bytes to set
@return Buffer
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
index 1908788e7e..54abe1c356 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c
@@ -56,7 +56,7 @@ ScanMem16 (
IN UINT16 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
index 896d60c208..b91a38b973 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c
@@ -56,7 +56,7 @@ ScanMem32 (
IN UINT32 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
index c9cc20316c..f47d700c9b 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c
@@ -56,7 +56,7 @@ ScanMem64 (
IN UINT64 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
index 615a0b6171..8164e2a181 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c
@@ -54,7 +54,7 @@ ScanMem8 (
IN UINT8 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return NULL;
}
ASSERT (Buffer != NULL);
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
index 36ec277ada..0a9936bb9a 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem16Wrapper.c
@@ -55,7 +55,7 @@ SetMem16 (
IN UINT16 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
index e42a3a92a6..d0015a3992 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem32Wrapper.c
@@ -55,7 +55,7 @@ SetMem32 (
IN UINT32 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
index 4ddbc689f1..408c074624 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMem64Wrapper.c
@@ -55,7 +55,7 @@ SetMem64 (
IN UINT64 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
index 609eab6db4..0e3428cd7a 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c
@@ -49,7 +49,7 @@ SetMem (
IN UINT8 Value
)
{
- if (Length == 0) {
+ if (0 == Length) {
return Buffer;
}
diff --git a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
index 87565f1c9a..e27851b077 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
+++ b/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c
@@ -48,7 +48,7 @@ ZeroMem (
IN UINTN Length
)
{
- ASSERT (!(Buffer == NULL && Length > 0));
+ ASSERT (!(NULL == Buffer && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
return InternalMemZeroMem (Buffer, Length);
}