diff mbox

[edk2,18/26] ArmPkg/SemihostLib: switch to ASM_FUNC() asm macro

Message ID 1470842282-8415-19-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 22b080c78c7a017c1ca96535d33d53ea58e3859a
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/SemihostLib/AArch64/GccSemihost.S | 7 ++-----
 ArmPkg/Library/SemihostLib/Arm/GccSemihost.S     | 8 ++------
 2 files changed, 4 insertions(+), 11 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/SemihostLib/AArch64/GccSemihost.S b/ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S
index 42211cf4ff8f..43a780c9ed3e 100644
--- a/ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S
+++ b/ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S
@@ -13,11 +13,8 @@ 
 #
 #------------------------------------------------------------------------------
 
-.text
-.align 2
+#include <AsmMacroIoLibV8.h>
 
-.globl ASM_PFX(GccSemihostCall)
-
-ASM_PFX(GccSemihostCall):
+ASM_FUNC(GccSemihostCall)
   hlt     #0xf000
   ret
diff --git a/ArmPkg/Library/SemihostLib/Arm/GccSemihost.S b/ArmPkg/Library/SemihostLib/Arm/GccSemihost.S
index c9d13183f61e..770e512cfbca 100644
--- a/ArmPkg/Library/SemihostLib/Arm/GccSemihost.S
+++ b/ArmPkg/Library/SemihostLib/Arm/GccSemihost.S
@@ -12,11 +12,7 @@ 
 #
 #------------------------------------------------------------------------------
 
-.text
-.align 2
-
-.globl ASM_PFX(GccSemihostCall)
-INTERWORK_FUNC(GccSemihostCall)
+#include <AsmMacroIoLib.h>
 
 /*
   Semihosting operation request mechanism
@@ -32,7 +28,7 @@  INTERWORK_FUNC(GccSemihostCall)
        the svc lr register. That happens to be the one we are using, so we must
        save it or we will not be able to return.
  */
-ASM_PFX(GccSemihostCall):
+ASM_FUNC(GccSemihostCall)
   stmfd   sp!, {lr}
   svc     #0x123456
   ldmfd   sp!, {lr}