]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/AArch64/SwitchStack.S
ARM Packages: use GCC_ASM_EXPORT to export functions
[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
17.text\r
18.align 3\r
19\r
919a3a02 20GCC_ASM_EXPORT(SecSwitchStack)\r
1bc83266
HL
21\r
22\r
23\r
24#/**\r
25# This allows the caller to switch the stack and return\r
26#\r
27# @param StackDelta Signed amount by which to modify the stack pointer\r
28#\r
29# @return Nothing. Goes to the Entry Point passing in the new parameters\r
30#\r
31#**/\r
32#VOID\r
33#EFIAPI\r
34#SecSwitchStack (\r
35# VOID *StackDelta\r
36# )#\r
37#\r
38ASM_PFX(SecSwitchStack):\r
39 mov x1, sp\r
40 add x1, x0, x1\r
41 mov sp, x1\r
42 ret\r
43\r