summaryrefslogtreecommitdiff
path: root/StdLib/Include/X64
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/Include/X64')
-rw-r--r--StdLib/Include/X64/machine/limits.h31
-rw-r--r--StdLib/Include/X64/machine/types.h14
2 files changed, 28 insertions, 17 deletions
diff --git a/StdLib/Include/X64/machine/limits.h b/StdLib/Include/X64/machine/limits.h
index 144549cc7f..193ce366f4 100644
--- a/StdLib/Include/X64/machine/limits.h
+++ b/StdLib/Include/X64/machine/limits.h
@@ -3,22 +3,37 @@
#define __POINTER_BIT 64
#if defined(__GNUC__)
-#define __LONG_BIT 64
-/** minimum value for an object of type long int **/
-#define __LONG_MIN (-9223372036854775807LL - 1LL) // -(2^63 - 1)
+#if __GNUC_PREREQ__(4,4)
+ #define __LONG_BIT 64
-/** maximum value for an object of type long int **/
-#define __LONG_MAX +9223372036854775807LL // 2^63 - 1
+ /** minimum value for an object of type long int **/
+ #define __LONG_MIN (-9223372036854775807LL - 1LL) // -(2^63 - 2)
-/** maximum value for an object of type unsigned long int **/
-#define __ULONG_MAX 0xFFFFFFFFFFFFFFFFULL // 2^64 - 1
+ /** maximum value for an object of type long int **/
+ #define __LONG_MAX (9223372036854775807LL) // 2^63 - 1
+
+ /** maximum value for an object of type unsigned long int **/
+ #define __ULONG_MAX 0xFFFFFFFFFFFFFFFFULL // 2^64 - 1
#else
+ #define __LONG_BIT 32
+ /** minimum value for an object of type long int **/
+ #define __LONG_MIN (-2147483647L - 1L) // -(2^31 - 1)
+
+ /** maximum value for an object of type long int **/
+ #define __LONG_MAX 2147483647L // 2^31 - 1
+
+ /** maximum value for an object of type unsigned long int **/
+ #define __ULONG_MAX 0xffffffff // 2^32 - 1
+#endif
+
+
+#else /* NOT defined(__GNUC__) */
#define __LONG_BIT 32
/** minimum value for an object of type long int **/
#define __LONG_MIN (-2147483647L - 1L) // -(2^31 - 1)
/** maximum value for an object of type long int **/
-#define __LONG_MAX +2147483647L // 2^31 - 1
+#define __LONG_MAX 2147483647L // 2^31 - 1
/** maximum value for an object of type unsigned long int **/
#define __ULONG_MAX 0xffffffff // 2^32 - 1
diff --git a/StdLib/Include/X64/machine/types.h b/StdLib/Include/X64/machine/types.h
index 1c1f1ab423..f14625b4cd 100644
--- a/StdLib/Include/X64/machine/types.h
+++ b/StdLib/Include/X64/machine/types.h
@@ -1,11 +1,11 @@
/** @file
Machine dependent type definitions.
- Portions Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License that accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available under
+ the terms and conditions of the BSD License that accompanies this distribution.
+ The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -46,10 +46,6 @@
#include <sys/EfiCdefs.h>
#include <machine/int_types.h>
-/* Handle the long and unsigned long data types which EFI doesn't directly support. */
-//typedef long int LONGN; // 32-bit
-//typedef long unsigned int ULONGN; // 32-bit
-
typedef PHYSICAL_ADDRESS paddr_t;
typedef UINT64 psize_t;
typedef PHYSICAL_ADDRESS vaddr_t;