1. Updated PalCallStatic.s in BaseCacheMaintenanceLib
[mirror_edk2.git] / MdePkg / Library / BaseTimerLibLocalApic / Ipf / PalCallStatic.s
CommitLineData
e65e8d10 1/// @file\r
2/// Contains an implementation of CallPalProcStatic on Itanium-based\r
3/// architecture.\r
4///\r
5/// Copyright (c) 2006, Intel Corporation\r
6/// All rights reserved. This program and the accompanying materials\r
7/// are licensed and made available under the terms and conditions of the BSD License\r
8/// which accompanies this distribution. The full text of the license may be found at\r
9/// http://opensource.org/licenses/bsd-license.php\r
10///\r
11/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13///\r
14/// Module Name: PalCallStatic.s\r
15///\r
16///\r
17\r
18.auto\r
19.text\r
20\r
21.proc PalCallStatic\r
22.type PalCallStatic, @function\r
23.regstk 5, 0, 0, 0\r
24PalCallStatic::\r
25 cmp.eq p6 = r0, in0\r
26 mov r31 = in4\r
27 mov r8 = ip\r
28(p6) mov in0 = ar.k5\r
29 add r8 = (PalProcReturn - PalCallStatic), r8\r
30 mov in4 = b0\r
31 mov r30 = in3\r
32 mov r29 = in2\r
33 mov b7 = in0\r
34 mov in3 = psr\r
35 rsm 1 << 14 // Disable interrupts\r
36 mov r28 = in1\r
37 mov in0 = 256\r
38 mov b0 = r8\r
39 br.cond.sptk b7\r
40PalProcReturn:\r
41 mov psr.l = in3\r
42 cmp.eq p6 = in0, in1 // in1 == PAL_COPY_PAL?\r
43(p6) cmp.eq p6 = r0, r8 // Status == Success?\r
44(p6) add in2 = r9, in2\r
45(p6) mov ar.k5 = in2\r
46 mov b0 = in4\r
47 br.ret.sptk.many b0\r
48.endp PalCallStatic\r