]>
Commit | Line | Data |
---|---|---|
f1baef62 | 1 | /// @file\r |
2 | /// IPF specific Performance Monitor Configuration/Data Registers 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: AccessPmr.s\r | |
14 | ///\r | |
15 | ///\r | |
16 | \r | |
17 | //---------------------------------------------------------------------------------\r | |
18 | //++\r | |
19 | // AsmReadPmc\r | |
20 | //\r | |
21 | // This routine is used to Reads the current value of Performance Monitor Configuration Register (PMC).\r | |
22 | //\r | |
23 | // Arguments :\r | |
24 | //\r | |
25 | // On Entry : The 8-bit PMC index.\r | |
26 | //\r | |
27 | // Return Value: The current value of PMC by Index.\r | |
28 | //\r | |
29 | //--\r | |
30 | //----------------------------------------------------------------------------------\r | |
31 | .text\r | |
32 | .type AsmReadPmc, @function\r | |
33 | .proc AsmReadPmc\r | |
34 | .regstk 1, 0, 0, 0\r | |
35 | \r | |
36 | AsmReadPmc::\r | |
37 | srlz.i;;\r | |
38 | srlz.d;;\r | |
39 | mov r8 = pmc[in0];;\r | |
40 | br.ret.dpnt b0;;\r | |
41 | .endp AsmReadPmc\r | |
42 | \r | |
43 | //---------------------------------------------------------------------------------\r | |
44 | //++\r | |
45 | // AsmWritePmc\r | |
46 | //\r | |
47 | // This routine is used to write the current value to a Performance Monitor Configuration Register (PMC).\r | |
48 | //\r | |
49 | // Arguments :\r | |
50 | //\r | |
51 | // On Entry : The 8-bit PMC index.\r | |
52 | // The value should be written to PMC\r | |
53 | //\r | |
54 | // Return Value: The value written to PMC.\r | |
55 | //\r | |
56 | //--\r | |
57 | //----------------------------------------------------------------------------------\r | |
58 | .text\r | |
59 | .type AsmWritePmc, @function\r | |
60 | .proc AsmWritePmc\r | |
61 | .regstk 2, 0, 0, 0\r | |
62 | \r | |
63 | AsmWritePmc::\r | |
64 | mov pmc[in0] = in1\r | |
65 | mov r8 = in1;;\r | |
66 | srlz.i;;\r | |
67 | srlz.d;;\r | |
68 | br.ret.dpnt b0;;\r | |
69 | .endp AsmWritePmc\r | |
70 | \r | |
71 | \r | |
72 | //---------------------------------------------------------------------------------\r | |
73 | //++\r | |
74 | // AsmReadPmd\r | |
75 | //\r | |
76 | // This routine is used to Reads the current value of Performance Monitor Data Register (PMD).\r | |
77 | //\r | |
78 | // Arguments :\r | |
79 | //\r | |
80 | // On Entry : The 8-bit PMD index.\r | |
81 | //\r | |
82 | // Return Value: The current value of PMD by Index.\r | |
83 | //\r | |
84 | //--\r | |
85 | //----------------------------------------------------------------------------------\r | |
86 | .text\r | |
87 | .type AsmReadPmd, @function\r | |
88 | .proc AsmReadPmd\r | |
89 | .regstk 1, 0, 0, 0\r | |
90 | \r | |
91 | AsmReadPmd::\r | |
92 | srlz.i;;\r | |
93 | srlz.d;;\r | |
94 | mov r8 = pmd[in0];;\r | |
95 | br.ret.dpnt b0;;\r | |
96 | .endp AsmReadPmd\r | |
97 | \r | |
98 | //---------------------------------------------------------------------------------\r | |
99 | //++\r | |
100 | // AsmWritePmd\r | |
101 | //\r | |
102 | // This routine is used to write the current value to Performance Monitor Data Register (PMD).\r | |
103 | //\r | |
104 | // Arguments :\r | |
105 | //\r | |
106 | // On Entry : The 8-bit PMD index.\r | |
107 | // The value should be written to PMD\r | |
108 | //\r | |
109 | // Return Value: The value written to PMD.\r | |
110 | //\r | |
111 | //--\r | |
112 | //----------------------------------------------------------------------------------\r | |
113 | .text\r | |
114 | .type AsmWritePmd, @function\r | |
115 | .proc AsmWritePmd\r | |
116 | .regstk 2, 0, 0, 0\r | |
117 | \r | |
118 | AsmWritePmd::\r | |
119 | mov pmd[in0] = in1\r | |
120 | mov r8 = in1;;\r | |
121 | srlz.i;;\r | |
122 | srlz.d;;\r | |
123 | br.ret.dpnt b0;;\r | |
124 | .endp AsmWritePmd\r |