]>
Commit | Line | Data |
---|---|---|
2c7e5c2f HT |
1 | /// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r |
2 | /// This program and the accompanying materials\r | |
c7f33ca4 | 3 | /// are licensed and made available under the terms and conditions of the BSD License\r |
4 | /// which accompanies this distribution. The full text of the license may be found at\r | |
5 | /// http://opensource.org/licenses/bsd-license.php\r | |
6 | ///\r | |
7 | /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
8 | /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
9 | ///\r | |
10 | /// Module Name: AccessGp.s\r | |
11 | ///\r | |
12 | ///\r | |
13 | /// IPF specific Global Pointer and Stack Pointer accessing functions\r | |
14 | ///\r | |
15 | \r | |
16 | //---------------------------------------------------------------------------------\r | |
17 | //++\r | |
18 | // AsmReadGp\r | |
19 | //\r | |
20 | // This routine is used to read the current value of 64-bit Global Pointer (GP).\r | |
21 | //\r | |
22 | // Arguments :\r | |
23 | //\r | |
24 | // On Entry :\r | |
25 | //\r | |
26 | // Return Value: The current GP value.\r | |
27 | //\r | |
28 | //--\r | |
29 | //----------------------------------------------------------------------------------\r | |
30 | .text\r | |
31 | .type AsmReadGp, @function\r | |
32 | .proc AsmReadGp\r | |
33 | \r | |
34 | AsmReadGp::\r | |
35 | mov r8 = gp;;\r | |
36 | br.ret.dpnt b0;;\r | |
37 | .endp AsmReadGp\r | |
38 | \r | |
39 | //---------------------------------------------------------------------------------\r | |
40 | //++\r | |
41 | // AsmWriteGp\r | |
42 | //\r | |
43 | // This routine is used to write the current value of 64-bit Global Pointer (GP).\r | |
44 | //\r | |
45 | // Arguments :\r | |
46 | //\r | |
47 | // On Entry : The value need to be written.\r | |
48 | //\r | |
49 | // Return Value: The value have been written.\r | |
50 | //\r | |
51 | //--\r | |
52 | //----------------------------------------------------------------------------------\r | |
53 | .text\r | |
54 | .type AsmWriteGp, @function\r | |
55 | .proc AsmWriteGp\r | |
56 | .regstk 1, 0, 0, 0\r | |
57 | \r | |
58 | AsmWriteGp::\r | |
59 | mov gp = in0\r | |
60 | mov r8 = in0;;\r | |
61 | br.ret.dpnt b0;;\r | |
62 | .endp AsmWriteGp\r | |
63 | \r | |
64 | //---------------------------------------------------------------------------------\r | |
65 | //++\r | |
66 | // AsmReadSp\r | |
67 | //\r | |
68 | // This routine is used to read the current value of 64-bit Stack Pointer (SP).\r | |
69 | //\r | |
70 | // Arguments :\r | |
71 | //\r | |
72 | // On Entry :\r | |
73 | //\r | |
74 | // Return Value: The current SP value.\r | |
75 | //\r | |
76 | //--\r | |
77 | //----------------------------------------------------------------------------------\r | |
78 | .text\r | |
79 | .type AsmReadSp, @function\r | |
80 | .proc AsmReadSp\r | |
81 | \r | |
82 | AsmReadSp::\r | |
83 | mov r8 = sp;;\r | |
84 | br.ret.dpnt b0;;\r | |
85 | .endp AsmReadSp\r |