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