summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-10 14:39:26 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-11 12:40:52 +0200
commit22b080c78c7a017c1ca96535d33d53ea58e3859a (patch)
treedb45a1ec86d1a3191f3e818334954d5f7d9f021c /ArmPkg
parent903e31242d016a82a363e4281959fc1297d25769 (diff)
downloadedk2-22b080c78c7a017c1ca96535d33d53ea58e3859a.zip
edk2-22b080c78c7a017c1ca96535d33d53ea58e3859a.tar.gz
edk2-22b080c78c7a017c1ca96535d33d53ea58e3859a.tar.bz2
ArmPkg/SemihostLib: switch to ASM_FUNC() asm macro
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> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S7
-rw-r--r--ArmPkg/Library/SemihostLib/Arm/GccSemihost.S8
2 files changed, 4 insertions, 11 deletions
diff --git a/ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S b/ArmPkg/Library/SemihostLib/AArch64/GccSemihost.S
index 42211cf..43a780c 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 c9d1318..770e512 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}