1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
12 ;------------------------------------------------------------------------------
17 ;------------------------------------------------------------------------------
18 ; Routine Description:
20 ; Routine for switching stacks with 2 parameters
24 ; (rcx) EntryPoint - Entry point with new stack.
25 ; (rdx) Context1 - Parameter1 for entry point.
26 ; (r8) Context2 - Parameter2 for entry point.
27 ; (r9) NewStack - The pointer to new stack.
33 ;------------------------------------------------------------------------------
34 global ASM_PFX(InternalSwitchStack)
35 ASM_PFX(InternalSwitchStack):
40 ; Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack,
41 ; in case the callee wishes to spill them.