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