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