]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessGp.s
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / AccessGp.s
1 /// Copyright (c) 2006, 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: AccessGp.s
11 ///
12 ///
13 /// IPF specific Global Pointer and Stack Pointer accessing functions
14 ///
15
16 //---------------------------------------------------------------------------------
17 //++
18 // AsmReadGp
19 //
20 // This routine is used to read the current value of 64-bit Global Pointer (GP).
21 //
22 // Arguments :
23 //
24 // On Entry :
25 //
26 // Return Value: The current GP value.
27 //
28 //--
29 //----------------------------------------------------------------------------------
30 .text
31 .type AsmReadGp, @function
32 .proc AsmReadGp
33
34 AsmReadGp::
35 mov r8 = gp;;
36 br.ret.dpnt b0;;
37 .endp AsmReadGp
38
39 //---------------------------------------------------------------------------------
40 //++
41 // AsmWriteGp
42 //
43 // This routine is used to write the current value of 64-bit Global Pointer (GP).
44 //
45 // Arguments :
46 //
47 // On Entry : The value need to be written.
48 //
49 // Return Value: The value have been written.
50 //
51 //--
52 //----------------------------------------------------------------------------------
53 .text
54 .type AsmWriteGp, @function
55 .proc AsmWriteGp
56 .regstk 1, 0, 0, 0
57
58 AsmWriteGp::
59 mov gp = in0
60 mov r8 = in0;;
61 br.ret.dpnt b0;;
62 .endp AsmWriteGp
63
64 //---------------------------------------------------------------------------------
65 //++
66 // AsmReadSp
67 //
68 // This routine is used to read the current value of 64-bit Stack Pointer (SP).
69 //
70 // Arguments :
71 //
72 // On Entry :
73 //
74 // Return Value: The current SP value.
75 //
76 //--
77 //----------------------------------------------------------------------------------
78 .text
79 .type AsmReadSp, @function
80 .proc AsmReadSp
81
82 AsmReadSp::
83 mov r8 = sp;;
84 br.ret.dpnt b0;;
85 .endp AsmReadSp