ArmPlatformPkg/PrePeiCore: switch to ASM_FUNC() asm macro

Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

While we're at it, replace some inefficient uses of LoadConstantToReg()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Ard Biesheuvel
2016-08-10 16:24:24 +02:00
parent d2fa09a134
commit 13dc7fa5a0
5 changed files with 18 additions and 71 deletions

View File

@@ -14,12 +14,7 @@
#
#------------------------------------------------------------------------------
.text
.align 3
GCC_ASM_EXPORT(SecSwitchStack)
#include <AsmMacroIoLibV8.h>
#/**
# This allows the caller to switch the stack and return
@@ -35,7 +30,7 @@ GCC_ASM_EXPORT(SecSwitchStack)
# VOID *StackDelta
# )#
#
ASM_PFX(SecSwitchStack):
ASM_FUNC(SecSwitchStack)
mov x1, sp
add x1, x0, x1
mov sp, x1