]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Math64.c
remove unnecessary comments introduced by tools from MdePkg. The regular express...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Math64.c
index 3312d789acf03ef4dc2eab6f91e7d5468c630096..5a932ac8a57d4f57a7bf509f2a78861300d249a9 100644 (file)
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  Math64.c\r
-\r
 **/\r
 \r
+\r
+\r
+\r
 #include "BaseLibInternals.h"\r
 \r
 /**\r
@@ -85,10 +86,13 @@ InternalMathARShiftU64 (
   IN      UINTN                     Count\r
   )\r
 {\r
+  INTN  TestValue;\r
+\r
   //\r
   // Test if this compiler supports arithmetic shift\r
   //\r
-  if ((((-1) << (sizeof (-1) * 8 - 1)) >> (sizeof (-1) * 8 - 1)) == -1) {\r
+  TestValue = (((-1) << (sizeof (-1) * 8 - 1)) >> (sizeof (-1) * 8 - 1));\r
+  if (TestValue == -1) {\r
     //\r
     // Arithmetic shift is supported\r
     //\r
@@ -169,10 +173,13 @@ InternalMathSwapBytes64 (
   IN      UINT64                    Operand\r
   )\r
 {\r
-  return (UINT64)(\r
-           ((UINT64)SwapBytes32 ((UINT32)Operand) << 32) |\r
-           ((UINT64)SwapBytes32 ((UINT32)(Operand >> 32)))\r
-           );\r
+  UINT64  LowerBytes;\r
+  UINT64  HigherBytes;\r
+\r
+  LowerBytes  = (UINT64) SwapBytes32 ((UINT32) Operand);\r
+  HigherBytes = (UINT64) SwapBytes32 ((UINT32) (Operand >> 32));\r
+\r
+  return (LowerBytes << 32 | HigherBytes);\r
 }\r
 \r
 /**\r
@@ -352,6 +359,7 @@ InternalMathDivRemU64x64 (
 \r
 **/\r
 INT64\r
+EFIAPI\r
 InternalMathDivRemS64x64 (\r
   IN      INT64                     Dividend,\r
   IN      INT64                     Divisor,\r