mirror of https://github.com/acidanthera/audk.git
clean up baselib according to review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5958 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dfb8993c3c
commit
5385a57969
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Memory-only library functions with no library constructor/destructor
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -2192,15 +2192,15 @@ DivS64x64Remainder (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint16 Pointer to a 16-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
|
||||
@return *Uint16
|
||||
@return The 16-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
ReadUnaligned16 (
|
||||
IN CONST UINT16 *Uint16
|
||||
IN CONST UINT16 *Buffer
|
||||
);
|
||||
|
||||
|
||||
|
@ -2213,17 +2213,17 @@ ReadUnaligned16 (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint16 Pointer to a 16-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
@param Value 16-bit value to write to Buffer.
|
||||
|
||||
@return Value
|
||||
@return The 16-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
WriteUnaligned16 (
|
||||
OUT UINT16 *Uint16,
|
||||
IN UINT16 Value
|
||||
OUT UINT16 *Buffer,
|
||||
IN UINT16 Value
|
||||
);
|
||||
|
||||
|
||||
|
@ -2237,13 +2237,13 @@ WriteUnaligned16 (
|
|||
|
||||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
|
||||
@return The value read from Buffer.
|
||||
@return The 24-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned24 (
|
||||
IN CONST UINT32 *Buffer
|
||||
IN CONST UINT32 *Buffer
|
||||
);
|
||||
|
||||
|
||||
|
@ -2259,14 +2259,14 @@ ReadUnaligned24 (
|
|||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
@param Value 24-bit value to write to Buffer.
|
||||
|
||||
@return The value written to Buffer.
|
||||
@return The 24-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned24 (
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
|
||||
|
@ -2278,15 +2278,15 @@ WriteUnaligned24 (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint32 Pointer to a 32-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
|
||||
@return Value read from Uint32
|
||||
@return The 32-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned32 (
|
||||
IN CONST UINT32 *Uint32
|
||||
IN CONST UINT32 *Buffer
|
||||
);
|
||||
|
||||
|
||||
|
@ -2299,17 +2299,17 @@ ReadUnaligned32 (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint32 Pointer to a 32-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
@param Value 32-bit value to write to Buffer.
|
||||
|
||||
@return Value written to Uint32.
|
||||
@return The 32-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned32 (
|
||||
OUT UINT32 *Uint32,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
);
|
||||
|
||||
|
||||
|
@ -2321,15 +2321,15 @@ WriteUnaligned32 (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint64 Pointer to a 64-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
|
||||
@return Value read from Uint64.
|
||||
@return The 64-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
ReadUnaligned64 (
|
||||
IN CONST UINT64 *Uint64
|
||||
IN CONST UINT64 *Buffer
|
||||
);
|
||||
|
||||
|
||||
|
@ -2342,17 +2342,17 @@ ReadUnaligned64 (
|
|||
|
||||
If the Buffer is NULL, then ASSERT().
|
||||
|
||||
@param Uint64 Pointer to a 64-bit value that may be unaligned.
|
||||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
@param Value 64-bit value to write to Buffer.
|
||||
|
||||
@return Value written to Uint64.
|
||||
@return The 64-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
WriteUnaligned64 (
|
||||
OUT UINT64 *Uint64,
|
||||
IN UINT64 Value
|
||||
OUT UINT64 *Buffer,
|
||||
IN UINT64 Value
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -39,6 +36,6 @@ ARShiftU64 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 64);
|
||||
return InternalMathARShiftU64 (Operand, Count);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Bit field functions of BaseLib.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -135,7 +132,7 @@ BitFieldRead8 (
|
|||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 8);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT8)BitFieldReadUint (Operand, StartBit, EndBit);
|
||||
}
|
||||
|
@ -171,7 +168,7 @@ BitFieldWrite8 (
|
|||
IN UINT8 Value
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 8);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldAndThenOr8 (Operand, StartBit, EndBit, 0, Value);
|
||||
}
|
||||
|
@ -208,7 +205,7 @@ BitFieldOr8 (
|
|||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 8);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT8)BitFieldOrUint (Operand, StartBit, EndBit, OrData);
|
||||
}
|
||||
|
@ -245,7 +242,7 @@ BitFieldAnd8 (
|
|||
IN UINT8 AndData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 8);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT8)BitFieldAndUint (Operand, StartBit, EndBit, AndData);
|
||||
}
|
||||
|
@ -285,7 +282,7 @@ BitFieldAndThenOr8 (
|
|||
IN UINT8 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 8);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldOr8 (
|
||||
BitFieldAnd8 (Operand, StartBit, EndBit, AndData),
|
||||
|
@ -322,7 +319,7 @@ BitFieldRead16 (
|
|||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 16);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT16)BitFieldReadUint (Operand, StartBit, EndBit);
|
||||
}
|
||||
|
@ -358,7 +355,7 @@ BitFieldWrite16 (
|
|||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 16);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldAndThenOr16 (Operand, StartBit, EndBit, 0, Value);
|
||||
}
|
||||
|
@ -395,7 +392,7 @@ BitFieldOr16 (
|
|||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 16);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT16)BitFieldOrUint (Operand, StartBit, EndBit, OrData);
|
||||
}
|
||||
|
@ -432,7 +429,7 @@ BitFieldAnd16 (
|
|||
IN UINT16 AndData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 16);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT16)BitFieldAndUint (Operand, StartBit, EndBit, AndData);
|
||||
}
|
||||
|
@ -472,7 +469,7 @@ BitFieldAndThenOr16 (
|
|||
IN UINT16 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 16);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldOr16 (
|
||||
BitFieldAnd16 (Operand, StartBit, EndBit, AndData),
|
||||
|
@ -509,7 +506,7 @@ BitFieldRead32 (
|
|||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 32);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT32)BitFieldReadUint (Operand, StartBit, EndBit);
|
||||
}
|
||||
|
@ -545,7 +542,7 @@ BitFieldWrite32 (
|
|||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 32);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldAndThenOr32 (Operand, StartBit, EndBit, 0, Value);
|
||||
}
|
||||
|
@ -582,7 +579,7 @@ BitFieldOr32 (
|
|||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 32);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT32)BitFieldOrUint (Operand, StartBit, EndBit, OrData);
|
||||
}
|
||||
|
@ -619,7 +616,7 @@ BitFieldAnd32 (
|
|||
IN UINT32 AndData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 32);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return (UINT32)BitFieldAndUint (Operand, StartBit, EndBit, AndData);
|
||||
}
|
||||
|
@ -659,7 +656,7 @@ BitFieldAndThenOr32 (
|
|||
IN UINT32 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 32);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldOr32 (
|
||||
BitFieldAnd32 (Operand, StartBit, EndBit, AndData),
|
||||
|
@ -696,7 +693,7 @@ BitFieldRead64 (
|
|||
IN UINTN EndBit
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return RShiftU64 (Operand & ~LShiftU64 ((UINT64)-2, EndBit), StartBit);
|
||||
}
|
||||
|
@ -732,7 +729,7 @@ BitFieldWrite64 (
|
|||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldAndThenOr64 (Operand, StartBit, EndBit, 0, Value);
|
||||
}
|
||||
|
@ -772,7 +769,7 @@ BitFieldOr64 (
|
|||
UINT64 Value1;
|
||||
UINT64 Value2;
|
||||
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
|
||||
Value1 = LShiftU64 (OrData, StartBit);
|
||||
|
@ -816,7 +813,7 @@ BitFieldAnd64 (
|
|||
UINT64 Value1;
|
||||
UINT64 Value2;
|
||||
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
|
||||
Value1 = LShiftU64 (~AndData, StartBit);
|
||||
|
@ -860,7 +857,7 @@ BitFieldAndThenOr64 (
|
|||
IN UINT64 OrData
|
||||
)
|
||||
{
|
||||
ASSERT (EndBit < sizeof (Operand) * 8);
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
return BitFieldOr64 (
|
||||
BitFieldAnd64 (Operand, StartBit, EndBit, AndData),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Unaligned access functions of BaseLib for IPF.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,7 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
#include <BaseLibInternals.h>
|
||||
|
||||
/**
|
||||
|
@ -25,13 +24,13 @@
|
|||
|
||||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
|
||||
@return *Uint16
|
||||
@return The 16-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
ReadUnaligned16 (
|
||||
IN CONST UINT16 *Buffer
|
||||
IN CONST UINT16 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -51,14 +50,14 @@ ReadUnaligned16 (
|
|||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
@param Value 16-bit value to write to Buffer.
|
||||
|
||||
@return Value
|
||||
@return The 16-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
WriteUnaligned16 (
|
||||
OUT UINT16 *Buffer,
|
||||
IN UINT16 Value
|
||||
OUT UINT16 *Buffer,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -79,13 +78,13 @@ WriteUnaligned16 (
|
|||
|
||||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
|
||||
@return The value read.
|
||||
@return The 24-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned24 (
|
||||
IN CONST UINT32 *Buffer
|
||||
IN CONST UINT32 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -108,14 +107,14 @@ ReadUnaligned24 (
|
|||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
@param Value 24-bit value to write to Buffer.
|
||||
|
||||
@return The value written.
|
||||
@return The 24-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned24 (
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -135,13 +134,13 @@ WriteUnaligned24 (
|
|||
|
||||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
|
||||
@return *Uint32
|
||||
@return The 32-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned32 (
|
||||
IN CONST UINT32 *Buffer
|
||||
IN CONST UINT32 *Buffer
|
||||
)
|
||||
{
|
||||
UINT16 LowerBytes;
|
||||
|
@ -167,14 +166,14 @@ ReadUnaligned32 (
|
|||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
@param Value 32-bit value to write to Buffer.
|
||||
|
||||
@return Value
|
||||
@return The 32-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned32 (
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -194,13 +193,13 @@ WriteUnaligned32 (
|
|||
|
||||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
|
||||
@return *Uint64
|
||||
@return The 64-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
ReadUnaligned64 (
|
||||
IN CONST UINT64 *Buffer
|
||||
IN CONST UINT64 *Buffer
|
||||
)
|
||||
{
|
||||
UINT32 LowerBytes;
|
||||
|
@ -226,14 +225,14 @@ ReadUnaligned64 (
|
|||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
@param Value 64-bit value to write to Buffer.
|
||||
|
||||
@return Value
|
||||
@return The 64-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
WriteUnaligned64 (
|
||||
OUT UINT64 *Buffer,
|
||||
IN UINT64 Value
|
||||
OUT UINT64 *Buffer,
|
||||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -40,6 +37,6 @@ LRotU32 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 32);
|
||||
return (Operand << Count) | (Operand >> (32 - Count));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -40,6 +37,6 @@ LRotU64 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 64);
|
||||
return InternalMathLRotU64 (Operand, Count);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -39,6 +36,6 @@ LShiftU64 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 64);
|
||||
return InternalMathLShiftU64 (Operand, Count);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -40,6 +37,6 @@ RRotU32 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 32);
|
||||
return (Operand >> Count) | (Operand << (32 - Count));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -40,6 +37,6 @@ RRotU64 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 64);
|
||||
return InternalMathRRotU64 (Operand, Count);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation<BR>
|
||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -12,9 +12,6 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "BaseLibInternals.h"
|
||||
|
||||
/**
|
||||
|
@ -39,6 +36,6 @@ RShiftU64 (
|
|||
IN UINTN Count
|
||||
)
|
||||
{
|
||||
ASSERT (Count < sizeof (Operand) * 8);
|
||||
ASSERT (Count < 64);
|
||||
return InternalMathRShiftU64 (Operand, Count);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Unaligned access functions of BaseLib.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -26,13 +26,13 @@
|
|||
|
||||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
|
||||
@return Data read from Buffer.
|
||||
@return The 16-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
ReadUnaligned16 (
|
||||
IN CONST UINT16 *Buffer
|
||||
IN CONST UINT16 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -52,14 +52,14 @@ ReadUnaligned16 (
|
|||
@param Buffer Pointer to a 16-bit value that may be unaligned.
|
||||
@param Value 16-bit value to write to Buffer.
|
||||
|
||||
@return Value written to Buffer
|
||||
@return The 16-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
EFIAPI
|
||||
WriteUnaligned16 (
|
||||
OUT UINT16 *Buffer,
|
||||
IN UINT16 Value
|
||||
OUT UINT16 *Buffer,
|
||||
IN UINT16 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -77,13 +77,13 @@ WriteUnaligned16 (
|
|||
|
||||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
|
||||
@return The value read from Buffer.
|
||||
@return The 24-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned24 (
|
||||
IN CONST UINT32 *Buffer
|
||||
IN CONST UINT32 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -103,14 +103,14 @@ ReadUnaligned24 (
|
|||
@param Buffer Pointer to a 24-bit value that may be unaligned.
|
||||
@param Value 24-bit value to write to Buffer.
|
||||
|
||||
@return The value written to Buffer.
|
||||
@return The 24-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned24 (
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -129,13 +129,13 @@ WriteUnaligned24 (
|
|||
|
||||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
|
||||
@return Data read from Buffer.
|
||||
@return The 32-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ReadUnaligned32 (
|
||||
IN CONST UINT32 *Buffer
|
||||
IN CONST UINT32 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -155,14 +155,14 @@ ReadUnaligned32 (
|
|||
@param Buffer Pointer to a 32-bit value that may be unaligned.
|
||||
@param Value 32-bit value to write to Buffer.
|
||||
|
||||
@return Value written to Buffer
|
||||
@return The 32-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
WriteUnaligned32 (
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
OUT UINT32 *Buffer,
|
||||
IN UINT32 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -180,13 +180,13 @@ WriteUnaligned32 (
|
|||
|
||||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
|
||||
@return Data read from Buffer.
|
||||
@return The 64-bit value read from Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
ReadUnaligned64 (
|
||||
IN CONST UINT64 *Buffer
|
||||
IN CONST UINT64 *Buffer
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
@ -206,14 +206,14 @@ ReadUnaligned64 (
|
|||
@param Buffer Pointer to a 64-bit value that may be unaligned.
|
||||
@param Value 64-bit value to write to Buffer.
|
||||
|
||||
@return Value written to Buffer.
|
||||
@return The 64-bit value to write to Buffer.
|
||||
|
||||
**/
|
||||
UINT64
|
||||
EFIAPI
|
||||
WriteUnaligned64 (
|
||||
OUT UINT64 *Buffer,
|
||||
IN UINT64 Value
|
||||
OUT UINT64 *Buffer,
|
||||
IN UINT64 Value
|
||||
)
|
||||
{
|
||||
ASSERT (Buffer != NULL);
|
||||
|
|
Loading…
Reference in New Issue