diff mbox

[edk2,15/26] ArmPkg/BaseMemoryLibSm: switch to ASM_FUNC() asm macro

Message ID 1470842282-8415-16-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 8ca934aab50be35099039db69c206acb5bdb006c
Headers show

Commit Message

Ard Biesheuvel Aug. 10, 2016, 3:17 p.m. UTC
Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S | 8 +++-----
 ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S  | 7 +++----
 2 files changed, 6 insertions(+), 9 deletions(-)

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
index 7985b59279ba..f90589c22594 100644
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/CopyMem.S
@@ -17,6 +17,8 @@ 
 #
 #------------------------------------------------------------------------------
 
+#include <AsmMacroIoLib.h>
+
 /**
   Copy Length bytes from Source to Destination. Overlap is OK.
 
@@ -37,11 +39,7 @@  InternalMemCopyMem (
   IN      UINTN                     Length
   )
 **/
-.text
-.align 2
-GCC_ASM_EXPORT(InternalMemCopyMem)
-
-ASM_PFX(InternalMemCopyMem):
+ASM_FUNC(InternalMemCopyMem)
   stmfd  sp!, {r4-r11, lr}
   // Save the input parameters in extra registers (r11 = destination, r14 = source, r12 = length)
   mov  r11, r0
diff --git a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
index 970d030ca368..242de95f74d1 100644
--- a/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
+++ b/ArmPkg/Library/BaseMemoryLibStm/Arm/SetMem.S
@@ -17,6 +17,8 @@ 
 #
 #------------------------------------------------------------------------------
 
+#include <AsmMacroIoLib.h>
+
 /**
   Set Buffer to Value for Size bytes.
 
@@ -35,12 +37,9 @@  InternalMemSetMem (
   )
 **/
 
-.text
 .syntax unified
-.align 2
-GCC_ASM_EXPORT(InternalMemSetMem)
 
-ASM_PFX(InternalMemSetMem):
+ASM_FUNC(InternalMemSetMem)
   stmfd  sp!, {r4-r11, lr}
   tst    r0, #3
   movne  r3, #0