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