]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/AArch64/SwitchStack.S
ArmPlatformPkg/PrePeiCore: switch to ASM_FUNC() asm macro
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / AArch64 / SwitchStack.S
CommitLineData
1bc83266
HL
1#------------------------------------------------------------------------------\r
2#\r
3# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
4# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
5# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
6#\r
7# This program and the accompanying materials\r
8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
10# http://opensource.org/licenses/bsd-license.php.\r
11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15#------------------------------------------------------------------------------\r
16\r
13dc7fa5 17#include <AsmMacroIoLibV8.h>\r
1bc83266
HL
18\r
19#/**\r
20# This allows the caller to switch the stack and return\r
21#\r
22# @param StackDelta Signed amount by which to modify the stack pointer\r
23#\r
24# @return Nothing. Goes to the Entry Point passing in the new parameters\r
25#\r
26#**/\r
27#VOID\r
28#EFIAPI\r
29#SecSwitchStack (\r
30# VOID *StackDelta\r
31# )#\r
32#\r
13dc7fa5 33ASM_FUNC(SecSwitchStack)\r
1bc83266
HL
34 mov x1, sp\r
35 add x1, x0, x1\r
36 mov sp, x1\r
37 ret\r
38\r