diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2014-09-01 17:23:10 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-01 17:23:10 +0000 |
commit | 02eef553114dea1e4d55071e91398a0625e4e18c (patch) | |
tree | b06b4ff8b471931a3596d01b171c9fe18dc41e84 /MdePkg | |
parent | b3f9cdaebb8a136c0ff8add4291a8b77dbf4721a (diff) | |
download | edk2-02eef553114dea1e4d55071e91398a0625e4e18c.tar.gz edk2-02eef553114dea1e4d55071e91398a0625e4e18c.tar.bz2 edk2-02eef553114dea1e4d55071e91398a0625e4e18c.zip |
MdePkg Base.h: Always define ASM_PFX
Some compilers may define __USER_LABEL_PREFIX__ to determine the
prefix used with ASM_PFX. Otherwise, IA32 will use a single underscore
'_' character, and all other architectures will use an empty prefix.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16019 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r-- | MdePkg/Include/AArch64/ProcessorBind.h | 4 | ||||
-rw-r--r-- | MdePkg/Include/Arm/ProcessorBind.h | 4 | ||||
-rw-r--r-- | MdePkg/Include/Base.h | 25 | ||||
-rw-r--r-- | MdePkg/Include/Ebc/ProcessorBind.h | 4 | ||||
-rw-r--r-- | MdePkg/Include/Ia32/ProcessorBind.h | 4 | ||||
-rw-r--r-- | MdePkg/Include/Ipf/ProcessorBind.h | 4 | ||||
-rw-r--r-- | MdePkg/Include/X64/ProcessorBind.h | 4 |
7 files changed, 36 insertions, 13 deletions
diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h index ce2468287b..f09b15a558 100644 --- a/MdePkg/Include/AArch64/ProcessorBind.h +++ b/MdePkg/Include/AArch64/ProcessorBind.h @@ -139,4 +139,8 @@ typedef INT64 INTN; **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
#endif
diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h index 8207044684..cc763b396b 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -158,6 +158,10 @@ typedef INT32 INTN; **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
#endif
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index e1ffa7d23b..4dda3c2f40 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -79,21 +79,20 @@ VERIFY_SIZE_OF (CHAR16, 2); #endif
//
-// For symbol name in GNU assembly code, an extra "_" is necessary
+// For symbol name in assembly code, an extra "_" is sometimes necessary
//
-#if defined(__GNUC__)
- ///
- /// Private worker functions for ASM_PFX()
- ///
- #define _CONCATENATE(a, b) __CONCATENATE(a, b)
- #define __CONCATENATE(a, b) a ## b
- ///
- /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
- /// on symbols in assembly language.
- ///
- #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
-#endif
+///
+/// Private worker functions for ASM_PFX()
+///
+#define _CONCATENATE(a, b) __CONCATENATE(a, b)
+#define __CONCATENATE(a, b) a ## b
+
+///
+/// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
+/// on symbols in assembly language.
+///
+#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
#if __APPLE__
//
diff --git a/MdePkg/Include/Ebc/ProcessorBind.h b/MdePkg/Include/Ebc/ProcessorBind.h index 4e1a67fb4e..075f768c76 100644 --- a/MdePkg/Include/Ebc/ProcessorBind.h +++ b/MdePkg/Include/Ebc/ProcessorBind.h @@ -138,5 +138,9 @@ typedef unsigned long UINTN; **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
#endif
diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index 7beee20953..f554b57bb7 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -284,5 +284,9 @@ typedef INT32 INTN; **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__ _
+#endif
+
#endif
diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h index a40ecd71e5..cead575262 100644 --- a/MdePkg/Include/Ipf/ProcessorBind.h +++ b/MdePkg/Include/Ipf/ProcessorBind.h @@ -305,5 +305,9 @@ typedef struct { **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(((EFI_PLABEL *)(FunctionPointer))->EntryPoint)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
#endif
diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index df324340d1..dae0683bd7 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -290,5 +290,9 @@ typedef INT64 INTN; **/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
#endif
|