]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Replace INTERWORK_FUNC, with GCC_ASM_EXPORT() and GCC_ASM_IMPORT() and update the...
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Feb 2011 05:01:35 +0000 (05:01 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Feb 2011 05:01:35 +0000 (05:01 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11289 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Arm/ProcessorBind.h
MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S
MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S
MdePkg/Library/BaseLib/Arm/DisableInterrupts.S
MdePkg/Library/BaseLib/Arm/EnableInterrupts.S
MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
MdePkg/Library/BaseLib/Arm/Math64.S
MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S

index a68b30b811dcefcf69087faa6b21d103065a713c..8fad2a8990f3e8cd6799d1744a3a17699fdffa41 100644 (file)
@@ -118,11 +118,26 @@ typedef INT32   INTN;
     /// CodeSourcery 2010.09 started requiring the .type to function properly\r
     ///\r
     #define INTERWORK_FUNC(func__)   .type ASM_PFX(func__), %function\r
     /// CodeSourcery 2010.09 started requiring the .type to function properly\r
     ///\r
     #define INTERWORK_FUNC(func__)   .type ASM_PFX(func__), %function\r
+\r
+    #define GCC_ASM_EXPORT(func__)  \\r
+             .global  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    ;\\r
+             .type ASM_PFX(func__), %function  \r
+\r
+    #define GCC_ASM_IMPORT(func__)  \\r
+             .extern  _CONCATENATE (__USER_LABEL_PREFIX__, func__)\r
+             \r
   #else\r
     //\r
     // .type not supported by Apple Xcode tools \r
     //\r
   #else\r
     //\r
     // .type not supported by Apple Xcode tools \r
     //\r
-    #define INTERWORK_FUNC(func__)\r
+    #define INTERWORK_FUNC(func__)  \r
+\r
+    #define GCC_ASM_EXPORT(func__)  \\r
+             .globl  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    \\r
+  \r
+    #define GCC_ASM_IMPORT(name)  \\r
+             .extern  _CONCATENATE (__USER_LABEL_PREFIX__, name)\r
+\r
   #endif\r
 #endif\r
 \r
   #endif\r
 #endif\r
 \r
@@ -139,3 +154,5 @@ typedef INT32   INTN;
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)\r
 \r
 #endif\r
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)\r
 \r
 #endif\r
+\r
+\r
index 46ef3e09f03c95a597b4bee7a30beb04495bf7ed..960fd990a104a1311c86e1e0ac1af627f938ab30 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(CpuFlushTlb)\r
-INTERWORK_FUNC(CpuFlushTlb)
+GCC_ASM_EXPORT(CpuFlushTlb)\r
 \r
 #/**\r
 #  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
 \r
 #/**\r
 #  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
index ec2061a4b32aec9d742be23ef9739ec5d2d22740..44160d4c32f887c8df731b5000426a7e800d296f 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(CpuSleep)\r
-INTERWORK_FUNC(CpuSleep)
+GCC_ASM_EXPORT(CpuSleep)\r
 \r
 #/**\r
 #  Places the CPU in a sleep state until an interrupt is received.\r
 \r
 #/**\r
 #  Places the CPU in a sleep state until an interrupt is received.\r
index 8ba3a439bda338c6ca9e43868833e4785dcf4ce4..b6b80a1326d05f46733eb8ae515774f442647265 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(CpuBreakpoint)\r
-INTERWORK_FUNC(CpuBreakpoint)
+GCC_ASM_EXPORT(CpuBreakpoint)\r
 \r
 #/**\r
 #  Generates a breakpoint on the CPU.\r
 \r
 #/**\r
 #  Generates a breakpoint on the CPU.\r
index 83db27a3fb79d02043de1cec6d660eb457fd2c06..e5740862d73f636717516adfa2ada834fa0d9a02 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(DisableInterrupts)\r
-INTERWORK_FUNC(DisableInterrupts)
+GCC_ASM_EXPORT(DisableInterrupts)\r
 \r
 #/**\r
 #  Disables CPU interrupts.\r
 \r
 #/**\r
 #  Disables CPU interrupts.\r
index f5649270219773930d597e8f0cdb4c867b9d3713..9f3a28af9487eef9ba8dc9768f61c92bad8c9405 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(EnableInterrupts)\r
-INTERWORK_FUNC(EnableInterrupts)
+GCC_ASM_EXPORT(EnableInterrupts)\r
 \r
 \r
 #/**\r
 \r
 \r
 #/**\r
index 95b3c5f07ec56b7f405bcfbe800b749e50b16b6a..94b3596fc6453813f4a92d7aaed2290a853bb83c 100644 (file)
@@ -16,8 +16,7 @@
 \r
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(GetInterruptState)\r
-INTERWORK_FUNC(GetInterruptState)
+GCC_ASM_EXPORT (GetInterruptState)\r
 \r
 #/**\r
 #  Retrieves the current CPU interrupt state.\r
 \r
 #/**\r
 #  Retrieves the current CPU interrupt state.\r
index 76a3c5516073d69bc322276106c7203f09266298..f56998660805d6a26744883c5fd0d327216ed5ca 100755 (executable)
@@ -19,8 +19,7 @@
 
        .text
        .align 2
 
        .text
        .align 2
-       .globl ASM_PFX(InternalMathLShiftU64)
-       INTERWORK_FUNC(InternalMathLShiftU64)
+       GCC_ASM_EXPORT(InternalMathLShiftU64)
 
 ASM_PFX(InternalMathLShiftU64):
        stmfd   sp!, {r4, r5, r6}
 
 ASM_PFX(InternalMathLShiftU64):
        stmfd   sp!, {r4, r5, r6}
@@ -38,8 +37,7 @@ ASM_PFX(InternalMathLShiftU64):
        bx      lr
 
        .align 2
        bx      lr
 
        .align 2
-       .globl ASM_PFX(InternalMathRShiftU64)
-       INTERWORK_FUNC(InternalMathRShiftU64)
+       GCC_ASM_EXPORT(InternalMathRShiftU64)
 
 ASM_PFX(InternalMathRShiftU64):
        stmfd   sp!, {r4, r5, r6}
 
 ASM_PFX(InternalMathRShiftU64):
        stmfd   sp!, {r4, r5, r6}
@@ -57,8 +55,7 @@ ASM_PFX(InternalMathRShiftU64):
        bx      lr
 
        .align 2
        bx      lr
 
        .align 2
-       .globl ASM_PFX(InternalMathARShiftU64)
-       INTERWORK_FUNC(InternalMathARShiftU64)
+       GCC_ASM_EXPORT(InternalMathARShiftU64)
 
 ASM_PFX(InternalMathARShiftU64):
        stmfd   sp!, {r4, r5, r6}
 
 ASM_PFX(InternalMathARShiftU64):
        stmfd   sp!, {r4, r5, r6}
@@ -76,8 +73,7 @@ ASM_PFX(InternalMathARShiftU64):
        bx      lr
 
        .align 2
        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}
 
 ASM_PFX(InternalMathLRotU64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
@@ -103,8 +99,7 @@ ASM_PFX(InternalMathLRotU64):
 
 
        .align 2
 
 
        .align 2
-       .globl ASM_PFX(InternalMathRRotU64)
-       INTERWORK_FUNC(InternalMathRRotU64)
+       GCC_ASM_EXPORT(InternalMathRRotU64)
 
 ASM_PFX(InternalMathRRotU64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
 
 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
        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}
 
 ASM_PFX(InternalMathMultU64x32):
        stmfd   sp!, {r7, lr}
@@ -144,8 +138,7 @@ ASM_PFX(InternalMathMultU64x32):
        ldmfd   sp!, {r7, pc}
 
        .align 2
        ldmfd   sp!, {r7, pc}
 
        .align 2
-       .globl ASM_PFX(InternalMathMultU64x64)
-       INTERWORK_FUNC(InternalMathMultU64x64)
+       GCC_ASM_EXPORT(InternalMathMultU64x64)
 
 ASM_PFX(InternalMathMultU64x64):
        stmfd   sp!, {r7, lr}
 
 ASM_PFX(InternalMathMultU64x64):
        stmfd   sp!, {r7, lr}
@@ -158,8 +151,7 @@ ASM_PFX(InternalMathMultU64x64):
        ldmfd   sp!, {r7, pc}
 
        .align 2
        ldmfd   sp!, {r7, pc}
 
        .align 2
-       .globl ASM_PFX(InternalMathDivU64x32)
-       INTERWORK_FUNC(InternalMathDivU64x32)
+       GCC_ASM_EXPORT(InternalMathDivU64x32)
 
 ASM_PFX(InternalMathDivU64x32):
        stmfd   sp!, {r7, lr}
 
 ASM_PFX(InternalMathDivU64x32):
        stmfd   sp!, {r7, lr}
@@ -170,8 +162,7 @@ ASM_PFX(InternalMathDivU64x32):
        
        
        .align 2
        
        
        .align 2
-       .globl ASM_PFX(InternalMathModU64x32)
-       INTERWORK_FUNC(InternalMathModU64x32)
+       GCC_ASM_EXPORT(InternalMathModU64x32)
 
 ASM_PFX(InternalMathModU64x32):
        stmfd   sp!, {r7, lr}
 
 ASM_PFX(InternalMathModU64x32):
        stmfd   sp!, {r7, lr}
@@ -182,8 +173,7 @@ ASM_PFX(InternalMathModU64x32):
        
        
        .align 2
        
        
        .align 2
-       .globl ASM_PFX(InternalMathDivRemU64x32)
-       INTERWORK_FUNC(InternalMathDivRemU64x32)
+       GCC_ASM_EXPORT(InternalMathDivRemU64x32)
 
 ASM_PFX(InternalMathDivRemU64x32):
        stmfd   sp!, {r4, r5, r6, r7, lr}
 
 ASM_PFX(InternalMathDivRemU64x32):
        stmfd   sp!, {r4, r5, r6, r7, lr}
@@ -211,8 +201,7 @@ L22:
        
        
        .align 2
        
        
        .align 2
-       .globl ASM_PFX(InternalMathDivRemU64x64)
-       INTERWORK_FUNC(InternalMathDivRemU64x64)
+       GCC_ASM_EXPORT(InternalMathDivRemU64x64)
 
 ASM_PFX(InternalMathDivRemU64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
 
 ASM_PFX(InternalMathDivRemU64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
@@ -238,8 +227,7 @@ L26:
        
        
        .align 2
        
        
        .align 2
-       .globl ASM_PFX(InternalMathDivRemS64x64)
-       INTERWORK_FUNC(InternalMathDivRemS64x64)
+       GCC_ASM_EXPORT(InternalMathDivRemS64x64)
 
 ASM_PFX(InternalMathDivRemS64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
 
 ASM_PFX(InternalMathDivRemS64x64):
        stmfd   sp!, {r4, r5, r6, r7, lr}
@@ -265,8 +253,7 @@ L30:
        
        
        .align 2
        
        
        .align 2
-       .globl ASM_PFX(InternalMathSwapBytes64)
-       INTERWORK_FUNC(InternalMathSwapBytes64)
+       GCC_ASM_EXPORT(InternalMathSwapBytes64)
 
 ASM_PFX(InternalMathSwapBytes64):
        @ args = 0, pretend = 0, frame = 0
 
 ASM_PFX(InternalMathSwapBytes64):
        @ args = 0, pretend = 0, frame = 0
index 74bf07ed7c1b8b722501f0dbd05e011fdba2b288..2ea88029c9f357948df64ea2cc2636dba3dd1c05 100644 (file)
 .text\r
 .p2align 2\r
 \r
 .text\r
 .p2align 2\r
 \r
-.globl ASM_PFX(SetJump)\r
-INTERWORK_FUNC(SetJump)
-\r
-.globl ASM_PFX(InternalLongJump)\r
-INTERWORK_FUNC(InternalLongJump)
+GCC_ASM_EXPORT(SetJump)\r
+GCC_ASM_EXPORT(InternalLongJump)\r
 \r
 #/**\r
 #  Saves the current CPU context that can be restored with a call to LongJump() and returns 0.#\r
 \r
 #/**\r
 #  Saves the current CPU context that can be restored with a call to LongJump() and returns 0.#\r