]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/X64/ProcessorBind.h
Move content from CPU specific ProcessorBind.h files into Base.h if the content is...
[mirror_edk2.git] / MdePkg / Include / X64 / ProcessorBind.h
index fefc21a5251f5059cb414e12ce7d5c47e2618818..026d6331b4fc0c1ef6a8751dbad3538733241300 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64).\r
+  Processor or Compiler specific defines and types x64 (Intel 64, AMD64).\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>                                                         \r
+  Copyright (c) 2006 - 2009, 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
 ///\r
 #define MDE_CPU_X64\r
 \r
-\r
 //\r
 // Make sure we are using the correct packing rules per EFI specification\r
 //\r
-#ifndef __GNUC__\r
+#if !defined(__GNUC__)\r
 #pragma pack()\r
 #endif\r
 \r
 \r
-#if __INTEL_COMPILER\r
+#if defined(__INTEL_COMPILER)\r
 //\r
 // Disable ICC's remark #869: "Parameter" was never referenced warning.\r
 // This is legal ANSI C code so we disable the remark that is turned on with -Wall\r
@@ -51,7 +50,7 @@
 #endif\r
 \r
 \r
-#if _MSC_EXTENSIONS\r
+#if defined(_MSC_EXTENSIONS)\r
 \r
 //\r
 // Disable warning that make it impossible to compile at /W4\r
@@ -97,7 +96,7 @@
   // No ANSI C 2000 stdint.h integer width declarations, so define equivalents\r
   //\r
  \r
-  #if _MSC_EXTENSIONS \r
+  #if defined(_MSC_EXTENSIONS)\r
     //\r
     // use Microsoft C complier dependent integer width types \r
     //\r
     ///\r
     typedef char                INT8;\r
   #else\r
-    #ifdef _EFI_P64 \r
+    #if defined(_EFI_P64)\r
       //\r
       // P64 - pointers being 64-bit and longs and ints are 32-bits.\r
       //\r
@@ -348,12 +347,16 @@ typedef INT64   INTN;
 // use the correct C calling convention. All protocol member functions and\r
 // EFI intrinsics are required to modify their member functions with EFIAPI.\r
 //\r
-#if _MSC_EXTENSIONS \r
+#ifdef EFIAPI\r
+  ///\r
+  /// If EFIAPI is already defined, then we use that definition.\r
+  ///\r
+#elif defined(_MSC_EXTENSIONS)\r
   ///\r
   /// Microsoft* compiler specific method for EFIAPI calling convension\r
   /// \r
   #define EFIAPI __cdecl  \r
-#elif __GNUC__\r
+#elif defined(__GNUC__)\r
   ///\r
   /// Define the standard calling convention reguardless of optimization level.\r
   /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI\r
@@ -372,35 +375,14 @@ typedef INT64   INTN;
 #endif\r
 \r
 //\r
-// The Microsoft* C compiler can removed references to unreferenced data items\r
-//  if the /OPT:REF linker option is used. We defined a macro as this is a \r
-//  a non standard extension\r
+// For symbol name in GNU assembly code, an extra "_" is necessary\r
 //\r
-#if _MSC_EXTENSIONS\r
-  ///\r
-  /// Remove global variable from the linked image if there are no references to \r
-  /// it after all compiler and linker optimizations have been performed.\r
-  ///\r
-  ///\r
-  #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)\r
-#else\r
+#if defined(__GNUC__)\r
   ///\r
-  /// Remove global variable from the linked image if there are no references to \r
-  /// it after all compiler and linker optimizations have been performed.\r
+  /// For GNU assembly code, .global or .globl can declare global symbols.\r
+  /// Define this macro to unify the usage.\r
   ///\r
-  ///\r
-  #define GLOBAL_REMOVE_IF_UNREFERENCED\r
-#endif\r
-\r
-//\r
-// For symbol name in GNU assembly code, an extra "_" is necessary\r
-//\r
-#if __GNUC__\r
-  #if defined(linux)\r
-    #define ASM_PFX(name) name\r
-  #else\r
-    #define ASM_PFX(name) _##name\r
-  #endif  \r
+  #define ASM_GLOBAL .globl\r
 #endif\r
 \r
 /**\r