]>
Commit | Line | Data |
---|---|---|
f1baef62 | 1 | /// @file\r |
2 | /// IPF specific Debug Breakpoint Registers accessing functions\r | |
3 | ///\r | |
bb817c56 HT |
4 | /// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r |
5 | /// This program and the accompanying materials\r | |
f1baef62 | 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: AccessDbr.s\r | |
14 | ///\r | |
15 | ///\r | |
16 | \r | |
17 | //---------------------------------------------------------------------------------\r | |
18 | //++\r | |
19 | // AsmReadDbr\r | |
20 | //\r | |
21 | // This routine is used to Reads the current value of Data Breakpoint Register (DBR).\r | |
22 | //\r | |
23 | // Arguments :\r | |
24 | //\r | |
25 | // On Entry : The 8-bit DBR index to read.\r | |
26 | //\r | |
27 | // Return Value: The current value of DBR by Index.\r | |
28 | //\r | |
29 | //--\r | |
30 | //----------------------------------------------------------------------------------\r | |
31 | .text\r | |
32 | .type AsmReadDbr, @function\r | |
33 | .proc AsmReadDbr\r | |
34 | .regstk 1, 0, 0, 0\r | |
35 | \r | |
36 | AsmReadDbr::\r | |
37 | mov r8 = dbr[in0];;\r | |
38 | br.ret.dpnt b0;;\r | |
39 | .endp AsmReadDbr\r | |
40 | \r | |
41 | //---------------------------------------------------------------------------------\r | |
42 | //++\r | |
43 | // AsmWriteDbr\r | |
44 | //\r | |
45 | // This routine is used to write the current value to Data Breakpoint Register (DBR).\r | |
46 | //\r | |
47 | // Arguments :\r | |
48 | //\r | |
49 | // On Entry : The 8-bit DBR index to read.\r | |
50 | // The value should be written to DBR\r | |
51 | //\r | |
52 | // Return Value: The value written to DBR.\r | |
53 | //\r | |
54 | //--\r | |
55 | //----------------------------------------------------------------------------------\r | |
56 | .text\r | |
57 | .type AsmWriteDbr, @function\r | |
58 | .proc AsmWriteDbr\r | |
59 | .regstk 2, 0, 0, 0\r | |
60 | \r | |
61 | AsmWriteDbr::\r | |
62 | mov dbr[in0] = in1\r | |
63 | mov r8 = in1;;\r | |
64 | srlz.d;;\r | |
65 | br.ret.dpnt b0;;\r | |
66 | .endp AsmWriteDbr\r | |
67 | \r | |
68 | \r | |
69 | //---------------------------------------------------------------------------------\r | |
70 | //++\r | |
71 | // AsmReadIbr\r | |
72 | //\r | |
73 | // This routine is used to Reads the current value of Instruction Breakpoint Register (IBR).\r | |
74 | //\r | |
75 | // Arguments :\r | |
76 | //\r | |
77 | // On Entry : The 8-bit IBR index.\r | |
78 | //\r | |
79 | // Return Value: The current value of IBR by Index.\r | |
80 | //\r | |
81 | //--\r | |
82 | //----------------------------------------------------------------------------------\r | |
83 | .text\r | |
84 | .type AsmReadIbr, @function\r | |
85 | .proc AsmReadIbr\r | |
86 | .regstk 1, 0, 0, 0\r | |
87 | \r | |
88 | AsmReadIbr::\r | |
89 | mov r8 = ibr[in0];;\r | |
90 | br.ret.dpnt b0;;\r | |
91 | .endp AsmReadIbr\r | |
92 | \r | |
93 | //---------------------------------------------------------------------------------\r | |
94 | //++\r | |
95 | // AsmWriteIbr\r | |
96 | //\r | |
97 | // This routine is used to write the current value to Instruction Breakpoint Register (IBR).\r | |
98 | //\r | |
99 | // Arguments :\r | |
100 | //\r | |
101 | // On Entry : The 8-bit IBR index.\r | |
102 | // The value should be written to IBR\r | |
103 | //\r | |
104 | // Return Value: The value written to IBR.\r | |
105 | //\r | |
106 | //--\r | |
107 | //----------------------------------------------------------------------------------\r | |
108 | .text\r | |
109 | .type AsmWriteIbr, @function\r | |
110 | .proc AsmWriteIbr\r | |
111 | .regstk 2, 0, 0, 0\r | |
112 | \r | |
113 | AsmWriteIbr::\r | |
114 | mov ibr[in0] = in1\r | |
115 | mov r8 = in1;;\r | |
116 | srlz.i;;\r | |
117 | br.ret.dpnt b0;;\r | |
118 | .endp AsmWriteIbr\r |