/** @file\r
Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64).\r
\r
- Copyright (c) 2006, Intel Corporation \r
+ Copyright (c) 2006, 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
\r
//\r
-// Make sure we are useing the correct packing rules per EFI specification\r
+// Make sure we are using the correct packing rules per EFI specification\r
//\r
#ifndef __GNUC__\r
#pragma pack()\r
\r
\r
#if __INTEL_COMPILER\r
-//\r
-// Disable ICC's remark #593: "LocalVariable" was set but never used\r
-// This is legal ANSI C code so we disable the remark that is turned on with -Wall\r
-//\r
-#pragma warning ( disable : 593 )\r
-\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
#pragma warning ( disable : 4505 )\r
\r
//\r
-// This warning is caused by empty (after preprocessing) souce file. For precompiled header only.\r
+// This warning is caused by empty (after preprocessing) source file. For precompiled header only.\r
//\r
#pragma warning ( disable : 4206 )\r
\r
//\r
\r
#if _MSC_EXTENSIONS \r
- \r
-\r
//\r
- // use Microsoft C complier dependent interger width types \r
+ // use Microsoft C complier dependent integer width types \r
//\r
typedef unsigned __int64 UINT64;\r
typedef __int64 INT64;\r
#else\r
#ifdef _EFI_P64 \r
//\r
- // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints \r
- // are 32-bits\r
+ // P64 - pointers being 64-bit and longs and ints are 32-bits.\r
//\r
typedef unsigned long long UINT64;\r
typedef long long INT64;\r
#define MAX_2_BITS 0xC000000000000000ULL\r
\r
//\r
-// Maximum legal X64 address\r
+// Maximum legal x64 address\r
//\r
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL\r
\r
//\r
-// The stack alignment required for X64\r
+// The stack alignment required for x64\r
//\r
#define CPU_STACK_ALIGNMENT 16\r
\r
// For symbol name in GNU assembly code, an extra "_" is necessary\r
//\r
#if __GNUC__\r
- #define ASM_PFX(name) _##name \r
+ #if defined(linux)\r
+ #define ASM_PFX(name) name\r
+ #else\r
+ #define ASM_PFX(name) _##name\r
+ #endif \r
#endif\r
\r
-#define FUNCTION_ENTRY_POINT(p) (p)\r
+/**\r
+ Return the pointer to the first instruction of a function given a function pointer.\r
+ On x64 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
+\r
+ @return The pointer to the first instruction of a function given a function pointer.\r
+ \r
+**/\r
+#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer)\r
\r
#endif\r
\r