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