]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/CRT/Gcc.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / StdLib / LibC / CRT / Gcc.c
diff --git a/StdLib/LibC/CRT/Gcc.c b/StdLib/LibC/CRT/Gcc.c
deleted file mode 100644 (file)
index cbf4ec2..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/** @file\r
-  Integer Arithmetic Run-time support functions for GCC.\r
-  The integer arithmetic routines are used on platforms that don't provide\r
-  hardware support for arithmetic operations on some modes..\r
-\r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials are licensed and made available\r
-  under the terms and conditions of the BSD License which accompanies this\r
-  distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.\r
-\r
-  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
-**/\r
-#include <Uefi.h>\r
-#include <Library/DebugLib.h>\r
-#include <sys/EfiCdefs.h>\r
-\r
-#include <Library/BaseLib.h>\r
-\r
-// Shift Datum left by Count bits.\r
-// ===========================================================================\r
-int __ashlsi3(int Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (int) LShiftU64 ((UINT64)Datum, (UINTN)Count);\r
-}\r
-\r
-long __ashldi3(long Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long) LShiftU64 ((UINT64)Datum, (UINTN)Count);\r
-}\r
-\r
-long long __ashlti3(long long Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) LShiftU64 ((UINT64)Datum, (UINTN)Count);\r
-}\r
-\r
-// Arithmetically shift Datum right by Count bits.\r
-// ===========================================================================\r
-int __ashrsi3(int Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (int) ARShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-long __ashrdi3(long Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long) ARShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-long long __ashrti3(long long Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) ARShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-// Return the quotient of the signed division of Dividend and Divisor\r
-// ===========================================================================\r
-int __divsi3(int Dividend, int Divisor)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (int) DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, NULL);\r
-}\r
-\r
-INT64 __divdi3(INT64 Dividend, INT64 Divisor)\r
-{\r
-  INT64 Quotient;\r
-\r
-  Quotient = DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, NULL);\r
-  DEBUG((DEBUG_INFO, "%a: %Ld / %Ld = %Ld\n", __func__, Dividend, Divisor, Quotient));\r
-\r
-  return Quotient;\r
-}\r
-\r
-long long __divti3(long long Dividend, long long Divisor)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, NULL);\r
-}\r
-\r
-// Logically shift Datum right by Count bits\r
-// ===========================================================================\r
-int __lshrsi3(int Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (int) RShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-long __lshrdi3(int Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long) RShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-long long __lshrti3(int Datum, int Count)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) RShiftU64 ((UINT64) Datum, (UINTN)Count);\r
-}\r
-\r
-// Return the remainder of the signed division of Dividend and Divisor\r
-// ===========================================================================\r
-int __modsi3(int Dividend, int Divisor)\r
-{\r
-  INT64 Remainder;\r
-\r
-  (void) DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, &Remainder);\r
-  DEBUG((DEBUG_INFO, "modsi3: %d %% %d = %d\n", Dividend, Divisor, (int)Remainder));\r
-\r
-  return (int) Remainder;\r
-}\r
-\r
-INT64 __moddi3(INT64 Dividend, INT64 Divisor)\r
-{\r
-  INT64 Remainder;\r
-\r
-  (void) DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, &Remainder);\r
-  DEBUG((DEBUG_INFO, "moddi3: %Ld %% %Ld = %Ld\n", (INT64)Dividend, (INT64)Divisor, Remainder));\r
-\r
-  return Remainder;\r
-}\r
-\r
-long long __modti3(long long Dividend, long long Divisor)\r
-{\r
-  INT64 Remainder;\r
-\r
-  (void) DivS64x64Remainder ((INT64) Dividend, (INT64) Divisor, &Remainder);\r
-  DEBUG((DEBUG_INFO, "modti3: %Ld %% %Ld = %Ld\n", (INT64)Dividend, (INT64)Divisor, Remainder));\r
-\r
-  return (long long) Remainder;\r
-}\r
-\r
-// These functions return the product of the Multiplicand and Multiplier.\r
-// ===========================================================================\r
-long long __multi3(long long Multiplicand, long long Multiplier)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) MultS64x64 ((INT64)Multiplicand, (INT64)Multiplier);\r
-}\r
-\r
-// Return the quotient of the unsigned division of a and b.\r
-// ===========================================================================\r
-unsigned int __udivsi3(unsigned int Dividend, unsigned int Divisor)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (int) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, NULL);\r
-}\r
-\r
-unsigned long __udivdi3(unsigned long Dividend, unsigned long Divisor)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, NULL);\r
-}\r
-\r
-unsigned long long __udivti3(unsigned long long Dividend, unsigned long long Divisor)\r
-{\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  return (long long) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, NULL);\r
-}\r
-\r
-// ===========================================================================\r
-unsigned int __umodsi3(unsigned int Dividend, unsigned int Divisor)\r
-{\r
-  UINT64 Remainder;\r
-\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  (void) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, &Remainder);\r
-\r
-  return (unsigned int) Remainder;\r
-}\r
-\r
-unsigned long __umoddi3(unsigned long Dividend, unsigned long Divisor)\r
-{\r
-  UINT64 Remainder;\r
-\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  (void) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, &Remainder);\r
-\r
-  return (unsigned long) Remainder;\r
-}\r
-\r
-unsigned long long __umodti3(unsigned long long Dividend, unsigned long long Divisor)\r
-{\r
-  UINT64 Remainder;\r
-\r
-  DEBUG((DEBUG_INFO, "%a:\n", __func__));\r
-  (void) DivU64x64Remainder ((UINT64) Dividend, (UINT64) Divisor, &Remainder);\r
-\r
-  return (unsigned long long) Remainder;\r
-}\r