summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Ia32/ProcessorBind.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Include/Ia32/ProcessorBind.h')
-rw-r--r--MdePkg/Include/Ia32/ProcessorBind.h52
1 files changed, 28 insertions, 24 deletions
diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h
index 9eb6954706d7..b10c641efdd9 100644
--- a/MdePkg/Include/Ia32/ProcessorBind.h
+++ b/MdePkg/Include/Ia32/ProcessorBind.h
@@ -1,14 +1,8 @@
/** @file
Processor or Compiler specific defines and types for IA-32 architecture.
-Copyright (c) 2006 - 2015, 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.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -93,24 +87,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
#pragma warning ( disable : 4206 )
-#if _MSC_VER == 1800 || _MSC_VER == 1900
+#if defined(_MSC_VER) && _MSC_VER >= 1800
//
// Disable these warnings for VS2013.
//
//
-// This warning is for potentially uninitialized local variable, and it may cause false
+// This warning is for potentially uninitialized local variable, and it may cause false
// positive issues in VS2013 and VS2015 build
//
#pragma warning ( disable : 4701 )
-
+
//
-// This warning is for potentially uninitialized local pointer variable, and it may cause
+// This warning is for potentially uninitialized local pointer variable, and it may cause
// false positive issues in VS2013 and VS2015 build
//
#pragma warning ( disable : 4703 )
-
+
#endif
#endif
@@ -168,7 +162,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/// 1-byte signed value.
///
typedef signed char INT8;
-#else
+#else
///
/// 8-byte unsigned value.
///
@@ -247,12 +241,22 @@ typedef INT32 INTN;
#define MAX_ADDRESS 0xFFFFFFFF
///
+/// Maximum usable address at boot time
+///
+#define MAX_ALLOC_ADDRESS MAX_ADDRESS
+
+///
/// Maximum legal IA-32 INTN and UINTN values.
///
#define MAX_INTN ((INTN)0x7FFFFFFF)
#define MAX_UINTN ((UINTN)0xFFFFFFFF)
///
+/// Minimum legal IA-32 INTN value.
+///
+#define MIN_INTN (((INTN)-2147483647) - 1)
+
+///
/// The stack alignment required for IA-32.
///
#define CPU_STACK_ALIGNMENT sizeof(UINTN)
@@ -275,22 +279,22 @@ typedef INT32 INTN;
#elif defined(_MSC_EXTENSIONS)
///
/// Microsoft* compiler specific method for EFIAPI calling convention.
- ///
- #define EFIAPI __cdecl
-#elif defined(__GNUC__)
+ ///
+ #define EFIAPI __cdecl
+#elif defined(__GNUC__) || defined(__clang__)
///
/// GCC specific method for EFIAPI calling convention.
- ///
- #define EFIAPI __attribute__((cdecl))
+ ///
+ #define EFIAPI __attribute__((cdecl))
#else
///
/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
- /// is the standard.
+ /// is the standard.
///
#define EFIAPI
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
///
/// For GNU assembly code, .global or .globl can declare global symbols.
/// Define this macro to unify the usage.
@@ -300,13 +304,13 @@ typedef INT32 INTN;
/**
Return the pointer to the first instruction of a function given a function pointer.
- On IA-32 CPU architectures, these two pointer values are the same,
+ On IA-32 CPU architectures, these two pointer values are the same,
so the implementation of this macro is very simple.
-
+
@param FunctionPointer A pointer to a function.
@return The pointer to the first instruction of a function given a function pointer.
-
+
**/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)