1. Change 0 == Length style to Length == 0

2. Clean BasePeCoff library instance, only keep one copy PeCoffLoaderEx.c file for IA32, X64 and IPF arch
3. Clean the confused comments

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5927 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2008-09-18 14:27:39 +00:00
parent 66df253186
commit 2bfb60098f
196 changed files with 680 additions and 497 deletions

View File

@ -168,8 +168,8 @@ ZeroMem (
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().

View File

@ -13,7 +13,7 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following IoLib instances share the same version of this file:
The following IoLib instances contain the same copy of this file:
BaseIoLibIntrinsic
DxeIoLibCpuIo

View File

@ -289,7 +289,7 @@ StrnCmp (
IN UINTN Length
)
{
if (0 == Length) {
if (Length == 0) {
return 0;
}
@ -1151,7 +1151,7 @@ AsciiStrnCpy (
{
CHAR8 *ReturnValue;
if (0 == Length) {
if (Length == 0) {
return Destination;
}
@ -1430,7 +1430,7 @@ AsciiStrnCmp (
IN UINTN Length
)
{
if (0 == Length) {
if (Length == 0) {
return 0;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -33,8 +35,8 @@
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -10,7 +10,7 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
PeiMemoryLib

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -1,11 +1,13 @@
/** @file
Declaration of internal functions for Base Memory Library.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,14 +56,14 @@ ScanMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);
ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));
ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,14 +56,14 @@ ScanMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);
ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));
ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,14 +56,14 @@ ScanMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);
ASSERT (0 == ((UINTN)Buffer & (sizeof (Value) - 1)));
ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ ScanMem8 (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,14 +55,14 @@ SetMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return InternalMemSetMem16 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,14 +55,14 @@ SetMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return InternalMemSetMem32 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,14 +55,14 @@ SetMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}
ASSERT (Buffer != NULL);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
ASSERT (0 == (((UINTN)Buffer) & (sizeof (Value) - 1)));
ASSERT (0 == (Length & (sizeof (Value) - 1)));
ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);
ASSERT ((Length & (sizeof (Value) - 1)) == 0);
return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value);
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -47,7 +49,7 @@ SetMem (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -12,12 +12,14 @@
Module Name: CompareMemWrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -32,8 +34,8 @@
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().

View File

@ -12,12 +12,14 @@
Module Name: CopyMemWrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -49,7 +51,7 @@ CopyMem (
IN UINTN Length
)
{
if (0 == Length) {
if (Length == 0) {
return DestinationBuffer;
}
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -12,12 +12,14 @@
Module Name: MemLibGuid.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -12,12 +12,14 @@
Module Name: MemLibInternals.h
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -12,12 +12,14 @@
Module Name: ScanMem16Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ ScanMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -12,12 +12,14 @@
Module Name: ScanMem32Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ ScanMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -12,12 +12,14 @@
Module Name: ScanMem64Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ ScanMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -12,12 +12,14 @@
Module Name: ScanMem8Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -51,7 +53,7 @@ ScanMem8 (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);

View File

@ -12,12 +12,14 @@
Module Name: SetMem16Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ SetMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -12,12 +12,14 @@
Module Name: SetMem32Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ SetMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -12,12 +12,14 @@
Module Name: SetMem64Wrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ SetMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -12,12 +12,14 @@
Module Name: SetMemWrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -46,7 +48,7 @@ SetMem (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -12,12 +12,14 @@
Module Name: ZeroMemWrapper.c
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -45,7 +47,7 @@ ZeroMem (
IN UINTN Length
)
{
ASSERT (!(NULL == Buffer && Length > 0));
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
return InternalMemZeroMem (Buffer, Length);
}

View File

@ -10,20 +10,19 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
**/
#include "MemLibInternals.h"
/**
@ -33,8 +32,8 @@
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@ -43,7 +42,7 @@
@param SourceBuffer Pointer to the source buffer to compare.
@param Length Number of bytes to compare.
@return 0 All Length bytes of the two buffers are identical.
@retval 0 All Length bytes of the two buffers are identical.
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -50,7 +52,7 @@ CopyMem (
IN UINTN Length
)
{
if (0 == Length) {
if (Length == 0) {
return DestinationBuffer;
}
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -1,11 +1,13 @@
/** @file
Declaration of internal functions for Base Memory Library.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ ScanMem8 (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contains the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -47,7 +49,7 @@ SetMem (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contains the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -46,7 +48,10 @@ ZeroMem (
IN UINTN Length
)
{
ASSERT (!(NULL == Buffer && Length > 0));
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
if (Length == 0) {
return Buffer;
}
return InternalMemZeroMem (Buffer, Length);
}

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -33,8 +35,8 @@
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -50,7 +52,7 @@ CopyMem (
IN UINTN Length
)
{
if (0 == Length) {
if (Length == 0) {
return DestinationBuffer;
}
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
#
# Notes:
#
# The following BaseMemoryLib instances share the same version of this file:
# The following BaseMemoryLib instances contain the same copy of this file:
#
# BaseMemoryLibRepStr
# BaseMemoryLibMmx
# BaseMemoryLibSse2
# BaseMemoryLibOptDxe
# BaseMemoryLibOptPei
#
#------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -1,11 +1,13 @@
/** @file
Declaration of internal functions for Base Memory Library.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -54,7 +56,7 @@ ScanMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -52,7 +54,7 @@ ScanMem8 (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return NULL;
}
ASSERT (Buffer != NULL);

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem16 (
IN UINT16 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem32 (
IN UINT32 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -53,7 +55,7 @@ SetMem64 (
IN UINT64 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -47,7 +49,7 @@ SetMem (
IN UINT8 Value
)
{
if (0 == Length) {
if (Length == 0) {
return Buffer;
}

View File

@ -10,12 +10,14 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The following BaseMemoryLib instances share the same version of this file:
The following BaseMemoryLib instances contain the same copy of this file:
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibSse2
BaseMemoryLibRepStr
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
PeiMemoryLib
DxeMemoryLib
@ -46,7 +48,7 @@ ZeroMem (
IN UINTN Length
)
{
ASSERT (!(NULL == Buffer && Length > 0));
ASSERT (!(Buffer == NULL && Length > 0));
ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
return InternalMemZeroMem (Buffer, Length);
}

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

View File

@ -19,11 +19,13 @@
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
; The following BaseMemoryLib instances contain the same copy of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
; BaseMemoryLibOptDxe
; BaseMemoryLibOptPei
;
;------------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More