]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* BFD PowerPC CPU definition |
899f54f5 AM |
2 | Copyright 1994, 1995, 1996, 2000, 2001, 2002 |
3 | Free Software Foundation, Inc. | |
252b5132 RH |
4 | Contributed by Ian Lance Taylor, Cygnus Support. |
5 | ||
6 | This file is part of BFD, the Binary File Descriptor library. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 2 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program; if not, write to the Free Software | |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
21 | ||
22 | #include "bfd.h" | |
23 | #include "sysdep.h" | |
24 | #include "libbfd.h" | |
25 | ||
26 | /* The common PowerPC architecture is compatible with the RS/6000. */ | |
27 | ||
28 | static const bfd_arch_info_type *powerpc_compatible | |
29 | PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); | |
30 | ||
31 | static const bfd_arch_info_type * | |
32 | powerpc_compatible (a,b) | |
33 | const bfd_arch_info_type *a; | |
34 | const bfd_arch_info_type *b; | |
35 | { | |
36 | BFD_ASSERT (a->arch == bfd_arch_powerpc); | |
37 | switch (b->arch) | |
38 | { | |
39 | default: | |
40 | return NULL; | |
41 | case bfd_arch_powerpc: | |
42 | return bfd_default_compatible (a, b); | |
43 | case bfd_arch_rs6000: | |
44 | if (a->mach == 0) | |
45 | return a; | |
46 | return NULL; | |
47 | } | |
48 | /*NOTREACHED*/ | |
49 | } | |
50 | ||
899f54f5 | 51 | const bfd_arch_info_type bfd_powerpc_archs[] = |
252b5132 RH |
52 | { |
53 | { | |
54 | 32, /* 32 bits in a word */ | |
55 | 32, /* 32 bits in an address */ | |
56 | 8, /* 8 bits in a byte */ | |
57 | bfd_arch_powerpc, | |
87f33987 | 58 | bfd_mach_ppc_603, |
252b5132 RH |
59 | "powerpc", |
60 | "powerpc:603", | |
61 | 3, | |
62 | false, /* not the default */ | |
71f6b586 | 63 | powerpc_compatible, |
252b5132 | 64 | bfd_default_scan, |
899f54f5 | 65 | &bfd_powerpc_archs[1] |
252b5132 RH |
66 | }, |
67 | { | |
68 | 32, /* 32 bits in a word */ | |
69 | 32, /* 32 bits in an address */ | |
70 | 8, /* 8 bits in a byte */ | |
71 | bfd_arch_powerpc, | |
87f33987 | 72 | bfd_mach_ppc_ec603e, |
252b5132 | 73 | "powerpc", |
87f33987 | 74 | "powerpc:EC603e", |
252b5132 RH |
75 | 3, |
76 | false, /* not the default */ | |
71f6b586 | 77 | powerpc_compatible, |
252b5132 | 78 | bfd_default_scan, |
899f54f5 | 79 | &bfd_powerpc_archs[2] |
252b5132 RH |
80 | }, |
81 | { | |
82 | 32, /* 32 bits in a word */ | |
83 | 32, /* 32 bits in an address */ | |
84 | 8, /* 8 bits in a byte */ | |
85 | bfd_arch_powerpc, | |
87f33987 | 86 | bfd_mach_ppc_604, |
252b5132 | 87 | "powerpc", |
87f33987 | 88 | "powerpc:604", |
252b5132 RH |
89 | 3, |
90 | false, /* not the default */ | |
71f6b586 | 91 | powerpc_compatible, |
252b5132 | 92 | bfd_default_scan, |
899f54f5 | 93 | &bfd_powerpc_archs[3] |
252b5132 RH |
94 | }, |
95 | { | |
96 | 32, /* 32 bits in a word */ | |
97 | 32, /* 32 bits in an address */ | |
98 | 8, /* 8 bits in a byte */ | |
99 | bfd_arch_powerpc, | |
87f33987 | 100 | bfd_mach_ppc_403, |
252b5132 | 101 | "powerpc", |
87f33987 | 102 | "powerpc:403", |
252b5132 RH |
103 | 3, |
104 | false, /* not the default */ | |
71f6b586 | 105 | powerpc_compatible, |
252b5132 | 106 | bfd_default_scan, |
899f54f5 | 107 | &bfd_powerpc_archs[4] |
7f6d05e8 | 108 | }, |
87f33987 | 109 | { |
7f6d05e8 | 110 | 32, /* 32 bits in a word */ |
87f33987 ND |
111 | 32, /* 32 bits in an address */ |
112 | 8, /* 8 bits in a byte */ | |
113 | bfd_arch_powerpc, | |
114 | bfd_mach_ppc_601, | |
115 | "powerpc", | |
116 | "powerpc:601", | |
117 | 3, | |
118 | false, /* not the default */ | |
71f6b586 | 119 | powerpc_compatible, |
87f33987 | 120 | bfd_default_scan, |
899f54f5 | 121 | &bfd_powerpc_archs[5] |
87f33987 | 122 | }, |
71f6b586 | 123 | { |
87f33987 | 124 | 64, /* 64 bits in a word */ |
7f6d05e8 CP |
125 | 64, /* 64 bits in an address */ |
126 | 8, /* 8 bits in a byte */ | |
127 | bfd_arch_powerpc, | |
87f33987 | 128 | bfd_mach_ppc_620, |
7f6d05e8 CP |
129 | "powerpc", |
130 | "powerpc:620", | |
131 | 3, | |
899f54f5 | 132 | false, /* not the default */ |
71f6b586 | 133 | powerpc_compatible, |
7f6d05e8 | 134 | bfd_default_scan, |
899f54f5 | 135 | &bfd_powerpc_archs[6] |
87f33987 ND |
136 | }, |
137 | { | |
138 | 64, /* 64 bits in a word */ | |
139 | 64, /* 64 bits in an address */ | |
140 | 8, /* 8 bits in a byte */ | |
141 | bfd_arch_powerpc, | |
142 | bfd_mach_ppc_630, | |
143 | "powerpc", | |
144 | "powerpc:630", | |
145 | 3, | |
146 | false, /* not the default */ | |
147 | powerpc_compatible, | |
148 | bfd_default_scan, | |
899f54f5 | 149 | &bfd_powerpc_archs[7] |
87f33987 ND |
150 | }, |
151 | { | |
152 | 64, /* 64 bits in a word */ | |
153 | 64, /* 64 bits in an address */ | |
154 | 8, /* 8 bits in a byte */ | |
155 | bfd_arch_powerpc, | |
156 | bfd_mach_ppc_a35, | |
157 | "powerpc", | |
158 | "powerpc:a35", | |
159 | 3, | |
160 | false, /* not the default */ | |
161 | powerpc_compatible, | |
162 | bfd_default_scan, | |
899f54f5 | 163 | &bfd_powerpc_archs[8] |
87f33987 ND |
164 | }, |
165 | { | |
166 | 64, /* 64 bits in a word */ | |
167 | 64, /* 64 bits in an address */ | |
168 | 8, /* 8 bits in a byte */ | |
169 | bfd_arch_powerpc, | |
170 | bfd_mach_ppc_rs64ii, | |
171 | "powerpc", | |
172 | "powerpc:rs64ii", | |
173 | 3, | |
174 | false, /* not the default */ | |
175 | powerpc_compatible, | |
176 | bfd_default_scan, | |
899f54f5 | 177 | &bfd_powerpc_archs[9] |
87f33987 ND |
178 | }, |
179 | { | |
180 | 64, /* 64 bits in a word */ | |
181 | 64, /* 64 bits in an address */ | |
182 | 8, /* 8 bits in a byte */ | |
183 | bfd_arch_powerpc, | |
184 | bfd_mach_ppc_rs64iii, | |
185 | "powerpc", | |
186 | "powerpc:rs64iii", | |
187 | 3, | |
188 | false, /* not the default */ | |
189 | powerpc_compatible, | |
190 | bfd_default_scan, | |
899f54f5 | 191 | &bfd_powerpc_archs[10] |
87f33987 ND |
192 | }, |
193 | { | |
194 | 32, /* 32 bits in a word */ | |
195 | 32, /* 32 bits in an address */ | |
196 | 8, /* 8 bits in a byte */ | |
197 | bfd_arch_powerpc, | |
198 | bfd_mach_ppc_7400, | |
199 | "powerpc", | |
200 | "powerpc:7400", | |
201 | 3, | |
202 | false, /* not the default */ | |
203 | powerpc_compatible, | |
204 | bfd_default_scan, | |
899f54f5 | 205 | &bfd_powerpc_archs[11] |
188ac662 GK |
206 | }, |
207 | { | |
208 | 32, /* 32 bits in a word */ | |
209 | 32, /* 32 bits in an address */ | |
210 | 8, /* 8 bits in a byte */ | |
211 | bfd_arch_powerpc, | |
212 | bfd_mach_ppc_860, | |
213 | "powerpc", | |
214 | "powerpc:MPC8XX", | |
215 | 3, | |
216 | false, /* not the default */ | |
217 | powerpc_compatible, | |
218 | bfd_default_scan, | |
899f54f5 AM |
219 | &bfd_powerpc_archs[12] |
220 | }, | |
221 | { | |
222 | 64, /* 64 bits in a word */ | |
223 | 64, /* 64 bits in an address */ | |
224 | 8, /* 8 bits in a byte */ | |
225 | bfd_arch_powerpc, | |
226 | bfd_mach_ppc64, | |
227 | "powerpc", | |
228 | "powerpc:common64", | |
229 | 3, | |
230 | BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */ | |
231 | powerpc_compatible, | |
232 | bfd_default_scan, | |
233 | &bfd_powerpc_archs[13] | |
234 | }, | |
252b5132 RH |
235 | { |
236 | 32, /* 32 bits in a word */ | |
237 | 32, /* 32 bits in an address */ | |
238 | 8, /* 8 bits in a byte */ | |
239 | bfd_arch_powerpc, | |
87f33987 | 240 | bfd_mach_ppc, /* for the POWER/PowerPC common architecture */ |
252b5132 RH |
241 | "powerpc", |
242 | "powerpc:common", | |
243 | 3, | |
5bd4f169 | 244 | BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */ |
71f6b586 | 245 | powerpc_compatible, |
252b5132 | 246 | bfd_default_scan, |
899f54f5 AM |
247 | 0 |
248 | } | |
249 | }; |