SwitchStack.asm 841 B

1234567891011121314151617181920212223242526272829303132
  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. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  6. ;
  7. ;------------------------------------------------------------------------------
  8. EXPORT SecSwitchStack
  9. AREA Switch_Stack, CODE, READONLY
  10. ;/**
  11. ; This allows the caller to switch the stack and return
  12. ;
  13. ; @param StackDelta Signed amount by which to modify the stack pointer
  14. ;
  15. ; @return Nothing. Goes to the Entry Point passing in the new parameters
  16. ;
  17. ;**/
  18. ;VOID
  19. ;EFIAPI
  20. ;SecSwitchStack (
  21. ; VOID *StackDelta
  22. ; );
  23. ;
  24. SecSwitchStack
  25. MOV R1, SP
  26. ADD R1, R0, R1
  27. MOV SP, R1
  28. BX LR
  29. END