Rev 3022 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3022 | Rev 4055 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2005 Martin Decky |
2 | * Copyright (c) 2005 Martin Decky |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
8 | * |
8 | * |
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * - Redistributions in binary form must reproduce the above copyright |
11 | * - Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
13 | * documentation and/or other materials provided with the distribution. |
14 | * - The name of the author may not be used to endorse or promote products |
14 | * - The name of the author may not be used to endorse or promote products |
15 | * derived from this software without specific prior written permission. |
15 | * derived from this software without specific prior written permission. |
16 | * |
16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | #ifndef __ppc32_REGNAME_H__ |
29 | #ifndef __ppc32_REGNAME_H__ |
30 | #define __ppc32_REGNAME_H__ |
30 | #define __ppc32_REGNAME_H__ |
31 | 31 | ||
32 | /* Condition Register Bit Fields */ |
32 | /* Condition Register Bit Fields */ |
33 | #define cr0 0 |
33 | #define cr0 0 |
34 | #define cr1 1 |
34 | #define cr1 1 |
35 | #define cr2 2 |
35 | #define cr2 2 |
36 | #define cr3 3 |
36 | #define cr3 3 |
37 | #define cr4 4 |
37 | #define cr4 4 |
38 | #define cr5 5 |
38 | #define cr5 5 |
39 | #define cr6 6 |
39 | #define cr6 6 |
40 | #define cr7 7 |
40 | #define cr7 7 |
41 | 41 | ||
42 | /* General Purpose Registers (GPRs) */ |
42 | /* General Purpose Registers (GPRs) */ |
43 | #define r0 0 |
43 | #define r0 0 |
44 | #define r1 1 |
44 | #define r1 1 |
45 | #define r2 2 |
45 | #define r2 2 |
46 | #define r3 3 |
46 | #define r3 3 |
47 | #define r4 4 |
47 | #define r4 4 |
48 | #define r5 5 |
48 | #define r5 5 |
49 | #define r6 6 |
49 | #define r6 6 |
50 | #define r7 7 |
50 | #define r7 7 |
51 | #define r8 8 |
51 | #define r8 8 |
52 | #define r9 9 |
52 | #define r9 9 |
53 | #define r10 10 |
53 | #define r10 10 |
54 | #define r11 11 |
54 | #define r11 11 |
55 | #define r12 12 |
55 | #define r12 12 |
56 | #define r13 13 |
56 | #define r13 13 |
57 | #define r14 14 |
57 | #define r14 14 |
58 | #define r15 15 |
58 | #define r15 15 |
59 | #define r16 16 |
59 | #define r16 16 |
60 | #define r17 17 |
60 | #define r17 17 |
61 | #define r18 18 |
61 | #define r18 18 |
62 | #define r19 19 |
62 | #define r19 19 |
63 | #define r20 20 |
63 | #define r20 20 |
64 | #define r21 21 |
64 | #define r21 21 |
65 | #define r22 22 |
65 | #define r22 22 |
66 | #define r23 23 |
66 | #define r23 23 |
67 | #define r24 24 |
67 | #define r24 24 |
68 | #define r25 25 |
68 | #define r25 25 |
69 | #define r26 26 |
69 | #define r26 26 |
70 | #define r27 27 |
70 | #define r27 27 |
71 | #define r28 28 |
71 | #define r28 28 |
72 | #define r29 29 |
72 | #define r29 29 |
73 | #define r30 30 |
73 | #define r30 30 |
74 | #define r31 31 |
74 | #define r31 31 |
75 | 75 | ||
76 | /* GPR Aliases */ |
76 | /* GPR Aliases */ |
77 | #define sp 1 |
77 | #define sp 1 |
78 | 78 | ||
79 | /* Floating Point Registers (FPRs) */ |
79 | /* Floating Point Registers (FPRs) */ |
80 | #define fr0 0 |
80 | #define fr0 0 |
81 | #define fr1 1 |
81 | #define fr1 1 |
82 | #define fr2 2 |
82 | #define fr2 2 |
83 | #define fr3 3 |
83 | #define fr3 3 |
84 | #define fr4 4 |
84 | #define fr4 4 |
85 | #define fr5 5 |
85 | #define fr5 5 |
86 | #define fr6 6 |
86 | #define fr6 6 |
87 | #define fr7 7 |
87 | #define fr7 7 |
88 | #define fr8 8 |
88 | #define fr8 8 |
89 | #define fr9 9 |
89 | #define fr9 9 |
90 | #define fr10 10 |
90 | #define fr10 10 |
91 | #define fr11 11 |
91 | #define fr11 11 |
92 | #define fr12 12 |
92 | #define fr12 12 |
93 | #define fr13 13 |
93 | #define fr13 13 |
94 | #define fr14 14 |
94 | #define fr14 14 |
95 | #define fr15 15 |
95 | #define fr15 15 |
96 | #define fr16 16 |
96 | #define fr16 16 |
97 | #define fr17 17 |
97 | #define fr17 17 |
98 | #define fr18 18 |
98 | #define fr18 18 |
99 | #define fr19 19 |
99 | #define fr19 19 |
100 | #define fr20 20 |
100 | #define fr20 20 |
101 | #define fr21 21 |
101 | #define fr21 21 |
102 | #define fr22 22 |
102 | #define fr22 22 |
103 | #define fr23 23 |
103 | #define fr23 23 |
104 | #define fr24 24 |
104 | #define fr24 24 |
105 | #define fr25 25 |
105 | #define fr25 25 |
106 | #define fr26 26 |
106 | #define fr26 26 |
107 | #define fr27 27 |
107 | #define fr27 27 |
108 | #define fr28 28 |
108 | #define fr28 28 |
109 | #define fr29 29 |
109 | #define fr29 29 |
110 | #define fr30 30 |
110 | #define fr30 30 |
111 | #define fr31 31 |
111 | #define fr31 31 |
112 | 112 | ||
113 | #define vr0 0 |
113 | #define vr0 0 |
114 | #define vr1 1 |
114 | #define vr1 1 |
115 | #define vr2 2 |
115 | #define vr2 2 |
116 | #define vr3 3 |
116 | #define vr3 3 |
117 | #define vr4 4 |
117 | #define vr4 4 |
118 | #define vr5 5 |
118 | #define vr5 5 |
119 | #define vr6 6 |
119 | #define vr6 6 |
120 | #define vr7 7 |
120 | #define vr7 7 |
121 | #define vr8 8 |
121 | #define vr8 8 |
122 | #define vr9 9 |
122 | #define vr9 9 |
123 | #define vr10 10 |
123 | #define vr10 10 |
124 | #define vr11 11 |
124 | #define vr11 11 |
125 | #define vr12 12 |
125 | #define vr12 12 |
126 | #define vr13 13 |
126 | #define vr13 13 |
127 | #define vr14 14 |
127 | #define vr14 14 |
128 | #define vr15 15 |
128 | #define vr15 15 |
129 | #define vr16 16 |
129 | #define vr16 16 |
130 | #define vr17 17 |
130 | #define vr17 17 |
131 | #define vr18 18 |
131 | #define vr18 18 |
132 | #define vr19 19 |
132 | #define vr19 19 |
133 | #define vr20 20 |
133 | #define vr20 20 |
134 | #define vr21 21 |
134 | #define vr21 21 |
135 | #define vr22 22 |
135 | #define vr22 22 |
136 | #define vr23 23 |
136 | #define vr23 23 |
137 | #define vr24 24 |
137 | #define vr24 24 |
138 | #define vr25 25 |
138 | #define vr25 25 |
139 | #define vr26 26 |
139 | #define vr26 26 |
140 | #define vr27 27 |
140 | #define vr27 27 |
141 | #define vr28 28 |
141 | #define vr28 28 |
142 | #define vr29 29 |
142 | #define vr29 29 |
143 | #define vr30 30 |
143 | #define vr30 30 |
144 | #define vr31 31 |
144 | #define vr31 31 |
145 | 145 | ||
146 | #define evr0 0 |
146 | #define evr0 0 |
147 | #define evr1 1 |
147 | #define evr1 1 |
148 | #define evr2 2 |
148 | #define evr2 2 |
149 | #define evr3 3 |
149 | #define evr3 3 |
150 | #define evr4 4 |
150 | #define evr4 4 |
151 | #define evr5 5 |
151 | #define evr5 5 |
152 | #define evr6 6 |
152 | #define evr6 6 |
153 | #define evr7 7 |
153 | #define evr7 7 |
154 | #define evr8 8 |
154 | #define evr8 8 |
155 | #define evr9 9 |
155 | #define evr9 9 |
156 | #define evr10 10 |
156 | #define evr10 10 |
157 | #define evr11 11 |
157 | #define evr11 11 |
158 | #define evr12 12 |
158 | #define evr12 12 |
159 | #define evr13 13 |
159 | #define evr13 13 |
160 | #define evr14 14 |
160 | #define evr14 14 |
161 | #define evr15 15 |
161 | #define evr15 15 |
162 | #define evr16 16 |
162 | #define evr16 16 |
163 | #define evr17 17 |
163 | #define evr17 17 |
164 | #define evr18 18 |
164 | #define evr18 18 |
165 | #define evr19 19 |
165 | #define evr19 19 |
166 | #define evr20 20 |
166 | #define evr20 20 |
167 | #define evr21 21 |
167 | #define evr21 21 |
168 | #define evr22 22 |
168 | #define evr22 22 |
169 | #define evr23 23 |
169 | #define evr23 23 |
170 | #define evr24 24 |
170 | #define evr24 24 |
171 | #define evr25 25 |
171 | #define evr25 25 |
172 | #define evr26 26 |
172 | #define evr26 26 |
173 | #define evr27 27 |
173 | #define evr27 27 |
174 | #define evr28 28 |
174 | #define evr28 28 |
175 | #define evr29 29 |
175 | #define evr29 29 |
176 | #define evr30 30 |
176 | #define evr30 30 |
177 | #define evr31 31 |
177 | #define evr31 31 |
178 | 178 | ||
179 | /* Special Purpose Registers (SPRs) */ |
179 | /* Special Purpose Registers (SPRs) */ |
180 | #define xer 1 |
180 | #define xer 1 |
181 | #define lr 8 |
181 | #define lr 8 |
182 | #define ctr 9 |
182 | #define ctr 9 |
183 | #define dec 22 |
183 | #define dec 22 |
184 | #define sdr1 25 |
184 | #define sdr1 25 |
185 | #define srr0 26 |
185 | #define srr0 26 |
186 | #define srr1 27 |
186 | #define srr1 27 |
187 | #define sprg0 272 |
187 | #define sprg0 272 |
188 | #define sprg1 273 |
188 | #define sprg1 273 |
189 | #define sprg2 274 |
189 | #define sprg2 274 |
190 | #define sprg3 275 |
190 | #define sprg3 275 |
191 | #define prv 287 |
191 | #define prv 287 |
192 | #define ibat0u 528 |
192 | #define ibat0u 528 |
193 | #define ibat0l 529 |
193 | #define ibat0l 529 |
194 | #define ibat1u 530 |
194 | #define ibat1u 530 |
195 | #define ibat1l 531 |
195 | #define ibat1l 531 |
196 | #define ibat2u 532 |
196 | #define ibat2u 532 |
197 | #define ibat2l 533 |
197 | #define ibat2l 533 |
198 | #define ibat3u 534 |
198 | #define ibat3u 534 |
199 | #define ibat3l 535 |
199 | #define ibat3l 535 |
200 | #define dbat0u 536 |
200 | #define dbat0u 536 |
201 | #define dbat0l 537 |
201 | #define dbat0l 537 |
202 | #define dbat1u 538 |
202 | #define dbat1u 538 |
203 | #define dbat1l 539 |
203 | #define dbat1l 539 |
204 | #define dbat2u 540 |
204 | #define dbat2u 540 |
205 | #define dbat2l 541 |
205 | #define dbat2l 541 |
206 | #define dbat3u 542 |
206 | #define dbat3u 542 |
207 | #define dbat3l 543 |
207 | #define dbat3l 543 |
208 | #define hid0 1008 |
208 | #define hid0 1008 |
209 | 209 | ||
210 | /* MSR bits */ |
210 | /* MSR bits */ |
211 | #define msr_ir (1 << 4) |
211 | #define msr_dr (1 << 4) |
212 | #define msr_dr (1 << 5) |
212 | #define msr_ir (1 << 5) |
- | 213 | #define msr_pr (1 << 14) |
|
213 | #define msr_ee (1 << 15) |
214 | #define msr_ee (1 << 15) |
214 | 215 | ||
215 | /* HID0 bits */ |
216 | /* HID0 bits */ |
- | 217 | #define hid0_sten (1 << 24) |
|
216 | #define hid0_ice (1 << 15) |
218 | #define hid0_ice (1 << 15) |
217 | #define hid0_dce (1 << 14) |
219 | #define hid0_dce (1 << 14) |
218 | #define hid0_icfi (1 << 11) |
220 | #define hid0_icfi (1 << 11) |
219 | #define hid0_dci (1 << 10) |
221 | #define hid0_dci (1 << 10) |
220 | 222 | ||
221 | #endif |
223 | #endif |
222 | 224 |