]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ia32/ProcessorBind.h
disable ICC compiler warning #593: variable was set but never used.
[mirror_edk2.git] / MdePkg / Include / Ia32 / ProcessorBind.h
index 9cb4eac8cf0983b5b1b8b1f0444c220c477fb625..4e1d585a9c0481ff4f71a4b90bc75f4d700b0e55 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Processor or Compiler specific defines and types for Ia32 architecture.\r
+  Processor or Compiler specific defines and types for IA-32 architecture.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation<BR>                                                         \r
+  Copyright (c) 2006 - 2010, 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
 #pragma warning ( disable : 1419 )\r
 \r
+//\r
+// Disable ICC's remark #593: "Variable" was set but never used.\r
+// This is legal ANSI C code so we disable the remark that is turned on with /W4\r
+//\r
+#pragma warning ( disable : 593 )\r
+\r
 #endif\r
 \r
 \r
@@ -313,39 +319,17 @@ typedef INT32   INTN;
   #endif  \r
 #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
-//\r
-#if defined(_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
-  #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
-  #define GLOBAL_REMOVE_IF_UNREFERENCED\r
-#endif\r
-\r
-//\r
-// For symbol name in GNU assembly code, an extra "_" is necessary\r
-//\r
-#if defined(__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
   Return the pointer to the first instruction of a function given a function pointer.\r
-  On IA32 CPU architectures, these two pointer values are the same, \r
+  On IA-32 CPU architectures, these two pointer values are the same, \r
   so the implementation of this macro is very simple.\r
   \r
   @param  FunctionPointer   A pointer to a function.\r