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

@@ -12,12 +12,7 @@
#
#------------------------------------------------------------------------------
.text
.align 3
GCC_ASM_EXPORT(SecSwitchStack)
#include <AsmMacroIoLib.h>
#/**
# This allows the caller to switch the stack and return
@@ -33,7 +28,7 @@ GCC_ASM_EXPORT(SecSwitchStack)
# VOID *StackDelta
# )#
#
ASM_PFX(SecSwitchStack):
ASM_FUNC(SecSwitchStack)
mov R1, R13
add R1, R0, R1
mov R13, R1