summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Arm/ProcessorBind.h19
-rw-r--r--MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S3
-rw-r--r--MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S3
-rw-r--r--MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S3
-rw-r--r--MdePkg/Library/BaseLib/Arm/DisableInterrupts.S3
-rw-r--r--MdePkg/Library/BaseLib/Arm/EnableInterrupts.S3
-rw-r--r--MdePkg/Library/BaseLib/Arm/GetInterruptsState.S3
-rwxr-xr-xMdePkg/Library/BaseLib/Arm/Math64.S39
-rw-r--r--MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S7
9 files changed, 39 insertions, 44 deletions
diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h
index a68b30b811..8fad2a8990 100644
--- a/MdePkg/Include/Arm/ProcessorBind.h
+++ b/MdePkg/Include/Arm/ProcessorBind.h
@@ -118,11 +118,26 @@ typedef INT32 INTN;
/// CodeSourcery 2010.09 started requiring the .type to function properly
///
#define INTERWORK_FUNC(func__) .type ASM_PFX(func__), %function
+
+ #define GCC_ASM_EXPORT(func__) \
+ .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\
+ .type ASM_PFX(func__), %function
+
+ #define GCC_ASM_IMPORT(func__) \
+ .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__)
+
#else
//
// .type not supported by Apple Xcode tools
//
- #define INTERWORK_FUNC(func__)
+ #define INTERWORK_FUNC(func__)
+
+ #define GCC_ASM_EXPORT(func__) \
+ .globl _CONCATENATE (__USER_LABEL_PREFIX__, func__) \
+
+ #define GCC_ASM_IMPORT(name) \
+ .extern _CONCATENATE (__USER_LABEL_PREFIX__, name)
+
#endif
#endif
@@ -139,3 +154,5 @@ typedef INT32 INTN;
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
#endif
+
+
diff --git a/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S
index 46ef3e09f0..960fd990a1 100644
--- a/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S
+++ b/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(CpuFlushTlb)
-INTERWORK_FUNC(CpuFlushTlb)
+GCC_ASM_EXPORT(CpuFlushTlb)
#/**
# Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
diff --git a/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S b/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
index ec2061a4b3..44160d4c32 100644
--- a/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
+++ b/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(CpuSleep)
-INTERWORK_FUNC(CpuSleep)
+GCC_ASM_EXPORT(CpuSleep)
#/**
# Places the CPU in a sleep state until an interrupt is received.
diff --git a/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S b/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S
index 8ba3a439bd..b6b80a1326 100644
--- a/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S
+++ b/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(CpuBreakpoint)
-INTERWORK_FUNC(CpuBreakpoint)
+GCC_ASM_EXPORT(CpuBreakpoint)
#/**
# Generates a breakpoint on the CPU.
diff --git a/MdePkg/Library/BaseLib/Arm/DisableInterrupts.S b/MdePkg/Library/BaseLib/Arm/DisableInterrupts.S
index 83db27a3fb..e5740862d7 100644
--- a/MdePkg/Library/BaseLib/Arm/DisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Arm/DisableInterrupts.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(DisableInterrupts)
-INTERWORK_FUNC(DisableInterrupts)
+GCC_ASM_EXPORT(DisableInterrupts)
#/**
# Disables CPU interrupts.
diff --git a/MdePkg/Library/BaseLib/Arm/EnableInterrupts.S b/MdePkg/Library/BaseLib/Arm/EnableInterrupts.S
index f564927021..9f3a28af94 100644
--- a/MdePkg/Library/BaseLib/Arm/EnableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Arm/EnableInterrupts.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(EnableInterrupts)
-INTERWORK_FUNC(EnableInterrupts)
+GCC_ASM_EXPORT(EnableInterrupts)
#/**
diff --git a/MdePkg/Library/BaseLib/Arm/GetInterruptsState.S b/MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
index 95b3c5f07e..94b3596fc6 100644
--- a/MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
+++ b/MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
@@ -16,8 +16,7 @@
.text
.p2align 2
-.globl ASM_PFX(GetInterruptState)
-INTERWORK_FUNC(GetInterruptState)
+GCC_ASM_EXPORT (GetInterruptState)
#/**
# Retrieves the current CPU interrupt state.
diff --git a/MdePkg/Library/BaseLib/Arm/Math64.S b/MdePkg/Library/BaseLib/Arm/Math64.S
index 76a3c55160..f569986608 100755
--- a/MdePkg/Library/BaseLib/Arm/Math64.S
+++ b/MdePkg/Library/BaseLib/Arm/Math64.S
@@ -19,8 +19,7 @@
.text
.align 2
- .globl ASM_PFX(InternalMathLShiftU64)
- INTERWORK_FUNC(InternalMathLShiftU64)
+ GCC_ASM_EXPORT(InternalMathLShiftU64)
ASM_PFX(InternalMathLShiftU64):
stmfd sp!, {r4, r5, r6}
@@ -38,8 +37,7 @@ ASM_PFX(InternalMathLShiftU64):
bx lr
.align 2
- .globl ASM_PFX(InternalMathRShiftU64)
- INTERWORK_FUNC(InternalMathRShiftU64)
+ GCC_ASM_EXPORT(InternalMathRShiftU64)
ASM_PFX(InternalMathRShiftU64):
stmfd sp!, {r4, r5, r6}
@@ -57,8 +55,7 @@ ASM_PFX(InternalMathRShiftU64):
bx lr
.align 2
- .globl ASM_PFX(InternalMathARShiftU64)
- INTERWORK_FUNC(InternalMathARShiftU64)
+ GCC_ASM_EXPORT(InternalMathARShiftU64)
ASM_PFX(InternalMathARShiftU64):
stmfd sp!, {r4, r5, r6}
@@ -76,8 +73,7 @@ ASM_PFX(InternalMathARShiftU64):
bx lr
.align 2
- .globl ASM_PFX(InternalMathLRotU64)
- INTERWORK_FUNC(InternalMathLRotU64)
+ GCC_ASM_EXPORT(InternalMathLRotU64)
ASM_PFX(InternalMathLRotU64):
stmfd sp!, {r4, r5, r6, r7, lr}
@@ -103,8 +99,7 @@ ASM_PFX(InternalMathLRotU64):
.align 2
- .globl ASM_PFX(InternalMathRRotU64)
- INTERWORK_FUNC(InternalMathRRotU64)
+ GCC_ASM_EXPORT(InternalMathRRotU64)
ASM_PFX(InternalMathRRotU64):
stmfd sp!, {r4, r5, r6, r7, lr}
@@ -129,8 +124,7 @@ ASM_PFX(InternalMathRRotU64):
ldmfd sp!, {r4, r5, r6, r7, pc}
.align 2
- .globl ASM_PFX(InternalMathMultU64x32)
- INTERWORK_FUNC(InternalMathMultU64x32)
+ GCC_ASM_EXPORT(InternalMathMultU64x32)
ASM_PFX(InternalMathMultU64x32):
stmfd sp!, {r7, lr}
@@ -144,8 +138,7 @@ ASM_PFX(InternalMathMultU64x32):
ldmfd sp!, {r7, pc}
.align 2
- .globl ASM_PFX(InternalMathMultU64x64)
- INTERWORK_FUNC(InternalMathMultU64x64)
+ GCC_ASM_EXPORT(InternalMathMultU64x64)
ASM_PFX(InternalMathMultU64x64):
stmfd sp!, {r7, lr}
@@ -158,8 +151,7 @@ ASM_PFX(InternalMathMultU64x64):
ldmfd sp!, {r7, pc}
.align 2
- .globl ASM_PFX(InternalMathDivU64x32)
- INTERWORK_FUNC(InternalMathDivU64x32)
+ GCC_ASM_EXPORT(InternalMathDivU64x32)
ASM_PFX(InternalMathDivU64x32):
stmfd sp!, {r7, lr}
@@ -170,8 +162,7 @@ ASM_PFX(InternalMathDivU64x32):
.align 2
- .globl ASM_PFX(InternalMathModU64x32)
- INTERWORK_FUNC(InternalMathModU64x32)
+ GCC_ASM_EXPORT(InternalMathModU64x32)
ASM_PFX(InternalMathModU64x32):
stmfd sp!, {r7, lr}
@@ -182,8 +173,7 @@ ASM_PFX(InternalMathModU64x32):
.align 2
- .globl ASM_PFX(InternalMathDivRemU64x32)
- INTERWORK_FUNC(InternalMathDivRemU64x32)
+ GCC_ASM_EXPORT(InternalMathDivRemU64x32)
ASM_PFX(InternalMathDivRemU64x32):
stmfd sp!, {r4, r5, r6, r7, lr}
@@ -211,8 +201,7 @@ L22:
.align 2
- .globl ASM_PFX(InternalMathDivRemU64x64)
- INTERWORK_FUNC(InternalMathDivRemU64x64)
+ GCC_ASM_EXPORT(InternalMathDivRemU64x64)
ASM_PFX(InternalMathDivRemU64x64):
stmfd sp!, {r4, r5, r6, r7, lr}
@@ -238,8 +227,7 @@ L26:
.align 2
- .globl ASM_PFX(InternalMathDivRemS64x64)
- INTERWORK_FUNC(InternalMathDivRemS64x64)
+ GCC_ASM_EXPORT(InternalMathDivRemS64x64)
ASM_PFX(InternalMathDivRemS64x64):
stmfd sp!, {r4, r5, r6, r7, lr}
@@ -265,8 +253,7 @@ L30:
.align 2
- .globl ASM_PFX(InternalMathSwapBytes64)
- INTERWORK_FUNC(InternalMathSwapBytes64)
+ GCC_ASM_EXPORT(InternalMathSwapBytes64)
ASM_PFX(InternalMathSwapBytes64):
@ args = 0, pretend = 0, frame = 0
diff --git a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S
index 74bf07ed7c..2ea88029c9 100644
--- a/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S
+++ b/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S
@@ -14,11 +14,8 @@
.text
.p2align 2
-.globl ASM_PFX(SetJump)
-INTERWORK_FUNC(SetJump)
-
-.globl ASM_PFX(InternalLongJump)
-INTERWORK_FUNC(InternalLongJump)
+GCC_ASM_EXPORT(SetJump)
+GCC_ASM_EXPORT(InternalLongJump)
#/**
# Saves the current CPU context that can be restored with a call to LongJump() and returns 0.#