]> git.proxmox.com Git - mirror_edk2.git/commitdiff
clean up baselib according to review comments.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 05:30:40 +0000 (05:30 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 05:30:40 +0000 (05:30 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5958 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/ARShiftU64.c
MdePkg/Library/BaseLib/BitField.c
MdePkg/Library/BaseLib/Ipf/Unaligned.c
MdePkg/Library/BaseLib/LRotU32.c
MdePkg/Library/BaseLib/LRotU64.c
MdePkg/Library/BaseLib/LShiftU64.c
MdePkg/Library/BaseLib/RRotU32.c
MdePkg/Library/BaseLib/RRotU64.c
MdePkg/Library/BaseLib/RShiftU64.c
MdePkg/Library/BaseLib/Unaligned.c

index 0632230a65fdb7ef15199df6e4f0b9158e6cd9ec..6683d4c74127d5de6acf9be4b1d0bf9f41092186 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Memory-only library functions with no library constructor/destructor\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -2192,15 +2192,15 @@ DivS64x64Remainder (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint16  Pointer to a 16-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
 \r
-  @return *Uint16\r
+  @return The 16-bit value read from Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 ReadUnaligned16 (\r
-  IN      CONST UINT16              *Uint16\r
+  IN CONST UINT16              *Buffer\r
   );\r
 \r
 \r
@@ -2213,17 +2213,17 @@ ReadUnaligned16 (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint16  Pointer to a 16-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
   @param  Value   16-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return The 16-bit value to write to Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 WriteUnaligned16 (\r
-  OUT     UINT16                    *Uint16,\r
-  IN      UINT16                    Value\r
+  OUT UINT16                    *Buffer,\r
+  IN  UINT16                    Value\r
   );\r
 \r
 \r
@@ -2237,13 +2237,13 @@ WriteUnaligned16 (
 \r
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
 \r
-  @return The value read from Buffer.\r
+  @return The 24-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned24 (\r
-  IN      CONST UINT32              *Buffer\r
+  IN CONST UINT32              *Buffer\r
   );\r
 \r
 \r
@@ -2259,14 +2259,14 @@ ReadUnaligned24 (
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
   @param  Value   24-bit value to write to Buffer.\r
 \r
-  @return The value written to Buffer.\r
+  @return The 24-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned24 (\r
-  OUT     UINT32                    *Buffer,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   );\r
 \r
 \r
@@ -2278,15 +2278,15 @@ WriteUnaligned24 (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint32  Pointer to a 32-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
 \r
-  @return Value read from Uint32\r
+  @return The 32-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned32 (\r
-  IN      CONST UINT32              *Uint32\r
+  IN CONST UINT32              *Buffer\r
   );\r
 \r
 \r
@@ -2299,17 +2299,17 @@ ReadUnaligned32 (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint32  Pointer to a 32-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
   @param  Value   32-bit value to write to Buffer.\r
 \r
-  @return Value written to Uint32.\r
+  @return The 32-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned32 (\r
-  OUT     UINT32                    *Uint32,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   );\r
 \r
 \r
@@ -2321,15 +2321,15 @@ WriteUnaligned32 (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint64  Pointer to a 64-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
 \r
-  @return Value read from Uint64.\r
+  @return The 64-bit value read from Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 ReadUnaligned64 (\r
-  IN      CONST UINT64              *Uint64\r
+  IN CONST UINT64              *Buffer\r
   );\r
 \r
 \r
@@ -2342,17 +2342,17 @@ ReadUnaligned64 (
 \r
   If the Buffer is NULL, then ASSERT().\r
 \r
-  @param  Uint64  Pointer to a 64-bit value that may be unaligned.\r
+  @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
   @param  Value   64-bit value to write to Buffer.\r
 \r
-  @return Value written to Uint64.\r
+  @return The 64-bit value to write to Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 WriteUnaligned64 (\r
-  OUT     UINT64                    *Uint64,\r
-  IN      UINT64                    Value\r
+  OUT UINT64                    *Buffer,\r
+  IN  UINT64                    Value\r
   );\r
 \r
 \r
index 00799921e1f40ece40c85c73dc80e3d50124a51e..bd926f90340a0c170489aa3ec964cb877eb1dddc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -39,6 +36,6 @@ ARShiftU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 64);\r
   return InternalMathARShiftU64 (Operand, Count);\r
 }\r
index 7907adfeaf76147ad415323300b78bf9c7d6156f..8c713b29bd2edf8b9d858ac2dc4d5d071a152bc7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Bit field functions of BaseLib.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -135,7 +132,7 @@ BitFieldRead8 (
   IN      UINTN                     EndBit\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 8);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT8)BitFieldReadUint (Operand, StartBit, EndBit);\r
 }\r
@@ -171,7 +168,7 @@ BitFieldWrite8 (
   IN      UINT8                     Value\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 8);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldAndThenOr8 (Operand, StartBit, EndBit, 0, Value);\r
 }\r
@@ -208,7 +205,7 @@ BitFieldOr8 (
   IN      UINT8                     OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 8);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT8)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
 }\r
@@ -245,7 +242,7 @@ BitFieldAnd8 (
   IN      UINT8                     AndData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 8);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT8)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
 }\r
@@ -285,7 +282,7 @@ BitFieldAndThenOr8 (
   IN      UINT8                     OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 8);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldOr8 (\r
            BitFieldAnd8 (Operand, StartBit, EndBit, AndData),\r
@@ -322,7 +319,7 @@ BitFieldRead16 (
   IN      UINTN                     EndBit\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 16);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT16)BitFieldReadUint (Operand, StartBit, EndBit);\r
 }\r
@@ -358,7 +355,7 @@ BitFieldWrite16 (
   IN      UINT16                    Value\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 16);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldAndThenOr16 (Operand, StartBit, EndBit, 0, Value);\r
 }\r
@@ -395,7 +392,7 @@ BitFieldOr16 (
   IN      UINT16                    OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 16);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT16)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
 }\r
@@ -432,7 +429,7 @@ BitFieldAnd16 (
   IN      UINT16                    AndData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 16);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT16)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
 }\r
@@ -472,7 +469,7 @@ BitFieldAndThenOr16 (
   IN      UINT16                    OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 16);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldOr16 (\r
            BitFieldAnd16 (Operand, StartBit, EndBit, AndData),\r
@@ -509,7 +506,7 @@ BitFieldRead32 (
   IN      UINTN                     EndBit\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 32);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT32)BitFieldReadUint (Operand, StartBit, EndBit);\r
 }\r
@@ -545,7 +542,7 @@ BitFieldWrite32 (
   IN      UINT32                    Value\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 32);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldAndThenOr32 (Operand, StartBit, EndBit, 0, Value);\r
 }\r
@@ -582,7 +579,7 @@ BitFieldOr32 (
   IN      UINT32                    OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 32);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT32)BitFieldOrUint (Operand, StartBit, EndBit, OrData);\r
 }\r
@@ -619,7 +616,7 @@ BitFieldAnd32 (
   IN      UINT32                    AndData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 32);\r
   ASSERT (StartBit <= EndBit);\r
   return (UINT32)BitFieldAndUint (Operand, StartBit, EndBit, AndData);\r
 }\r
@@ -659,7 +656,7 @@ BitFieldAndThenOr32 (
   IN      UINT32                    OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 32);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldOr32 (\r
            BitFieldAnd32 (Operand, StartBit, EndBit, AndData),\r
@@ -696,7 +693,7 @@ BitFieldRead64 (
   IN      UINTN                     EndBit\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 64);\r
   ASSERT (StartBit <= EndBit);\r
   return RShiftU64 (Operand & ~LShiftU64 ((UINT64)-2, EndBit), StartBit);\r
 }\r
@@ -732,7 +729,7 @@ BitFieldWrite64 (
   IN      UINT64                    Value\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 64);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldAndThenOr64 (Operand, StartBit, EndBit, 0, Value);\r
 }\r
@@ -772,7 +769,7 @@ BitFieldOr64 (
   UINT64  Value1;\r
   UINT64  Value2;\r
 \r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 64);\r
   ASSERT (StartBit <= EndBit);\r
 \r
   Value1 = LShiftU64 (OrData, StartBit);\r
@@ -816,7 +813,7 @@ BitFieldAnd64 (
   UINT64  Value1;\r
   UINT64  Value2;\r
   \r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 64);\r
   ASSERT (StartBit <= EndBit);\r
 \r
   Value1 = LShiftU64 (~AndData, StartBit);\r
@@ -860,7 +857,7 @@ BitFieldAndThenOr64 (
   IN      UINT64                    OrData\r
   )\r
 {\r
-  ASSERT (EndBit < sizeof (Operand) * 8);\r
+  ASSERT (EndBit < 64);\r
   ASSERT (StartBit <= EndBit);\r
   return BitFieldOr64 (\r
            BitFieldAnd64 (Operand, StartBit, EndBit, AndData),\r
index ee6c94253ed72b3a9d8fbefc23881c643321fe2b..772d2f43efbbdc96e866e65075c0fec34aa568c0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Unaligned access functions of BaseLib for IPF.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,7 +12,6 @@
 \r
 **/\r
 \r
-\r
 #include <BaseLibInternals.h>\r
 \r
 /**\r
 \r
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
 \r
-  @return *Uint16\r
+  @return The 16-bit value read from Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 ReadUnaligned16 (\r
-  IN      CONST UINT16              *Buffer\r
+  IN CONST UINT16              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -51,14 +50,14 @@ ReadUnaligned16 (
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
   @param  Value   16-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return The 16-bit value to write to Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 WriteUnaligned16 (\r
-  OUT     UINT16                    *Buffer,\r
-  IN      UINT16                    Value\r
+  OUT UINT16                    *Buffer,\r
+  IN  UINT16                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -79,13 +78,13 @@ WriteUnaligned16 (
 \r
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
 \r
-  @return The value read.\r
+  @return The 24-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned24 (\r
-  IN      CONST UINT32              *Buffer\r
+  IN CONST UINT32              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -108,14 +107,14 @@ ReadUnaligned24 (
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
   @param  Value   24-bit value to write to Buffer.\r
 \r
-  @return The value written.\r
+  @return The 24-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned24 (\r
-  OUT     UINT32                    *Buffer,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -135,13 +134,13 @@ WriteUnaligned24 (
 \r
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
 \r
-  @return *Uint32\r
+  @return The 32-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned32 (\r
-  IN      CONST UINT32              *Buffer\r
+  IN CONST UINT32              *Buffer\r
   )\r
 {\r
   UINT16  LowerBytes;\r
@@ -167,14 +166,14 @@ ReadUnaligned32 (
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
   @param  Value   32-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return The 32-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned32 (\r
-  OUT     UINT32                    *Buffer,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -194,13 +193,13 @@ WriteUnaligned32 (
 \r
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
 \r
-  @return *Uint64\r
+  @return The 64-bit value read from Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 ReadUnaligned64 (\r
-  IN      CONST UINT64              *Buffer\r
+  IN CONST UINT64              *Buffer\r
   )\r
 {\r
   UINT32  LowerBytes;\r
@@ -226,14 +225,14 @@ ReadUnaligned64 (
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
   @param  Value   64-bit value to write to Buffer.\r
 \r
-  @return Value\r
+  @return The 64-bit value to write to Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 WriteUnaligned64 (\r
-  OUT     UINT64                    *Buffer,\r
-  IN      UINT64                    Value\r
+  OUT UINT64                    *Buffer,\r
+  IN  UINT64                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
index 5bee9627a9c6de093f38dc666e46785ce165035b..4c709770b24efde20cb9218ba5229456cb4f204f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -40,6 +37,6 @@ LRotU32 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 32);\r
   return (Operand << Count) | (Operand >> (32 - Count));\r
 }\r
index 85d732fb2544d6a344e84387cd7234c8bc7521e3..441b8f76e77ae433c4c1590227434f7dbcd41368 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -40,6 +37,6 @@ LRotU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 64);\r
   return InternalMathLRotU64 (Operand, Count);\r
 }\r
index 110e93c78e9b8bcabb9f0add965ebd4f2a009b19..b8eb3c96ddee4af87f5de7ce9112ba16a2b7c8e9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -39,6 +36,6 @@ LShiftU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 64);\r
   return InternalMathLShiftU64 (Operand, Count);\r
 }\r
index b90ae7f42474b66fc156c97357ecfefe021305f8..63f9ce6e6ae63acbb3032af055b532bfa8014498 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -40,6 +37,6 @@ RRotU32 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 32);\r
   return (Operand >> Count) | (Operand << (32 - Count));\r
 }\r
index 2b96cb9af03dfcf9e5a920d00dbecd4c358a7fd6..abce4f72e38c79b1ce899520db4e1dc5c3794264 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -40,6 +37,6 @@ RRotU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 64);\r
   return InternalMathRRotU64 (Operand, Count);\r
 }\r
index 3cd25de6d4b12ed967ded768731daf9c6f413e7e..bf6251ae2626dc2250afbe98fc8fdbb6fcda2cc0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Math worker functions.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,9 +12,6 @@
 \r
 **/\r
 \r
-\r
-\r
-\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -39,6 +36,6 @@ RShiftU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
-  ASSERT (Count < sizeof (Operand) * 8);\r
+  ASSERT (Count < 64);\r
   return InternalMathRShiftU64 (Operand, Count);\r
 }\r
index 86e00c2546eec7b534dd2bdc70754ab824dda4ce..acb44fc5aadcfe7f58c498aa41638b40c7be2c30 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Unaligned access functions of BaseLib.\r
 \r
-  Copyright (c) 2006, Intel Corporation\r
+  Copyright (c) 2006 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
 \r
-  @return Data read from Buffer.\r
+  @return The 16-bit value read from Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 ReadUnaligned16 (\r
-  IN      CONST UINT16              *Buffer\r
+  IN CONST UINT16              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -52,14 +52,14 @@ ReadUnaligned16 (
   @param  Buffer  Pointer to a 16-bit value that may be unaligned.\r
   @param  Value   16-bit value to write to Buffer.\r
 \r
-  @return Value written to Buffer\r
+  @return The 16-bit value to write to Buffer.\r
 \r
 **/\r
 UINT16\r
 EFIAPI\r
 WriteUnaligned16 (\r
-  OUT     UINT16                    *Buffer,\r
-  IN      UINT16                    Value\r
+  OUT UINT16                    *Buffer,\r
+  IN  UINT16                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -77,13 +77,13 @@ WriteUnaligned16 (
 \r
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
 \r
-  @return The value read from Buffer.\r
+  @return The 24-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned24 (\r
-  IN      CONST UINT32              *Buffer\r
+  IN CONST UINT32              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -103,14 +103,14 @@ ReadUnaligned24 (
   @param  Buffer  Pointer to a 24-bit value that may be unaligned.\r
   @param  Value   24-bit value to write to Buffer.\r
 \r
-  @return The value written to Buffer.\r
+  @return The 24-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned24 (\r
-  OUT     UINT32                    *Buffer,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -129,13 +129,13 @@ WriteUnaligned24 (
 \r
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
 \r
-  @return Data read from Buffer.\r
+  @return The 32-bit value read from Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 ReadUnaligned32 (\r
-  IN      CONST UINT32              *Buffer\r
+  IN CONST UINT32              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -155,14 +155,14 @@ ReadUnaligned32 (
   @param  Buffer  Pointer to a 32-bit value that may be unaligned.\r
   @param  Value   32-bit value to write to Buffer.\r
 \r
-  @return Value written to Buffer\r
+  @return The 32-bit value to write to Buffer.\r
 \r
 **/\r
 UINT32\r
 EFIAPI\r
 WriteUnaligned32 (\r
-  OUT     UINT32                    *Buffer,\r
-  IN      UINT32                    Value\r
+  OUT UINT32                    *Buffer,\r
+  IN  UINT32                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -180,13 +180,13 @@ WriteUnaligned32 (
 \r
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
 \r
-  @return Data read from Buffer.\r
+  @return The 64-bit value read from Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 ReadUnaligned64 (\r
-  IN      CONST UINT64              *Buffer\r
+  IN CONST UINT64              *Buffer\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r
@@ -206,14 +206,14 @@ ReadUnaligned64 (
   @param  Buffer  Pointer to a 64-bit value that may be unaligned.\r
   @param  Value   64-bit value to write to Buffer.\r
 \r
-  @return Value written to Buffer.\r
+  @return The 64-bit value to write to Buffer.\r
 \r
 **/\r
 UINT64\r
 EFIAPI\r
 WriteUnaligned64 (\r
-  OUT     UINT64                    *Buffer,\r
-  IN      UINT64                    Value\r
+  OUT UINT64                    *Buffer,\r
+  IN  UINT64                    Value\r
   )\r
 {\r
   ASSERT (Buffer != NULL);\r