]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/SwitchStack.s
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / SwitchStack.s
1 /// Copyright (c) 2004, Intel Corporation
2 /// All rights reserved. This program and the accompanying materials
3 /// are licensed and made available under the terms and conditions of the BSD License
4 /// which accompanies this distribution. The full text of the license may be found at
5 /// http://opensource.org/licenses/bsd-license.php
6 ///
7 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
8 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
9 ///
10 /// Module Name:
11 ///
12 /// SwitchStack.s
13 ///
14 /// Abstract:
15 ///
16 ///
17
18 .auto
19 .text
20
21 .proc AsmSwitchStackAndBackingStore
22 .type AsmSwitchStackAndBackingStore, @function
23 .regstk 5, 0, 0, 0
24 AsmSwitchStackAndBackingStore::
25 mov r14 = ar.rsc
26 movl r2 = ~((((1 << 14) - 1) << 16) | 3)
27
28 mov r17 = in1
29 mov r18 = in2
30 and r2 = r14, r2
31
32 mov ar.rsc = r2
33 mov sp = in3
34 mov r19 = in4
35
36 ld8.nt1 r16 = [in0], 8
37 ld8.nta gp = [in0]
38 mov r3 = -1
39
40 loadrs
41 mov ar.bspstore = r19
42 mov b7 = r16
43
44 alloc r2 = ar.pfs, 0, 0, 2, 0
45 mov out0 = r17
46 mov out1 = r18
47
48 mov ar.rnat = r3
49 mov ar.rsc = r14
50 br.call.sptk.many b0 = b7
51 .endp AsmSwitchStackAndBackingStore