1 /* BFD PowerPC CPU definition
2 Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2010
3 Free Software Foundation, Inc.
4 Contributed by Ian Lance Taylor, Cygnus Support.
6 This file is part of BFD, the Binary File Descriptor library.
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 3 of the License, or
11 (at your option) any later version.
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.
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., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
27 /* The common PowerPC architecture is compatible with the RS/6000. */
29 static const bfd_arch_info_type *powerpc_compatible
30 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
32 static const bfd_arch_info_type *
33 powerpc_compatible (a,b)
34 const bfd_arch_info_type *a;
35 const bfd_arch_info_type *b;
37 BFD_ASSERT (a->arch == bfd_arch_powerpc);
42 case bfd_arch_powerpc:
43 return bfd_default_compatible (a, b);
45 if (b->mach == bfd_mach_rs6k)
52 const bfd_arch_info_type bfd_powerpc_archs[] =
54 #if BFD_DEFAULT_TARGET_SIZE == 64
55 /* Default arch must come first. */
57 64, /* 64 bits in a word */
58 64, /* 64 bits in an address */
59 8, /* 8 bits in a byte */
65 TRUE, /* default for 64 bit target */
70 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
71 being immediately after the 64 bit default. */
73 32, /* 32 bits in a word */
74 32, /* 32 bits in an address */
75 8, /* 8 bits in a byte */
77 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
84 &bfd_powerpc_archs[2],
87 /* Default arch must come first. */
89 32, /* 32 bits in a word */
90 32, /* 32 bits in an address */
91 8, /* 8 bits in a byte */
93 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
97 TRUE, /* default for 32 bit target */
100 &bfd_powerpc_archs[1],
102 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
103 being immediately after the 32 bit default. */
105 64, /* 64 bits in a word */
106 64, /* 64 bits in an address */
107 8, /* 8 bits in a byte */
116 &bfd_powerpc_archs[2]
120 32, /* 32 bits in a word */
121 32, /* 32 bits in an address */
122 8, /* 8 bits in a byte */
128 FALSE, /* not the default */
131 &bfd_powerpc_archs[3]
134 32, /* 32 bits in a word */
135 32, /* 32 bits in an address */
136 8, /* 8 bits in a byte */
142 FALSE, /* not the default */
145 &bfd_powerpc_archs[4]
148 32, /* 32 bits in a word */
149 32, /* 32 bits in an address */
150 8, /* 8 bits in a byte */
156 FALSE, /* not the default */
159 &bfd_powerpc_archs[5]
162 32, /* 32 bits in a word */
163 32, /* 32 bits in an address */
164 8, /* 8 bits in a byte */
170 FALSE, /* not the default */
173 &bfd_powerpc_archs[6]
176 32, /* 32 bits in a word */
177 32, /* 32 bits in an address */
178 8, /* 8 bits in a byte */
184 FALSE, /* not the default */
187 &bfd_powerpc_archs[7]
190 64, /* 64 bits in a word */
191 64, /* 64 bits in an address */
192 8, /* 8 bits in a byte */
198 FALSE, /* not the default */
201 &bfd_powerpc_archs[8]
204 64, /* 64 bits in a word */
205 64, /* 64 bits in an address */
206 8, /* 8 bits in a byte */
212 FALSE, /* not the default */
215 &bfd_powerpc_archs[9]
218 64, /* 64 bits in a word */
219 64, /* 64 bits in an address */
220 8, /* 8 bits in a byte */
226 FALSE, /* not the default */
229 &bfd_powerpc_archs[10]
232 64, /* 64 bits in a word */
233 64, /* 64 bits in an address */
234 8, /* 8 bits in a byte */
240 FALSE, /* not the default */
243 &bfd_powerpc_archs[11]
246 64, /* 64 bits in a word */
247 64, /* 64 bits in an address */
248 8, /* 8 bits in a byte */
250 bfd_mach_ppc_rs64iii,
254 FALSE, /* not the default */
257 &bfd_powerpc_archs[12]
260 32, /* 32 bits in a word */
261 32, /* 32 bits in an address */
262 8, /* 8 bits in a byte */
268 FALSE, /* not the default */
271 &bfd_powerpc_archs[13]
274 32, /* 32 bits in a word */
275 32, /* 32 bits in an address */
276 8, /* 8 bits in a byte */
285 &bfd_powerpc_archs[14]
288 32, /* 32 bits in a word */
289 32, /* 32 bits in an address */
290 8, /* 8 bits in a byte */
296 FALSE, /* not the default */
299 &bfd_powerpc_archs[15]
302 64, /* 64 bits in a word */
303 64, /* 64 bits in an address */
304 8, /* 8 bits in a byte */
306 bfd_mach_ppc_e500mc64,
310 FALSE, /* not the default */
313 &bfd_powerpc_archs[16]
316 32, /* 32 bits in a word */
317 32, /* 32 bits in an address */
318 8, /* 8 bits in a byte */
324 FALSE, /* not the default */
327 &bfd_powerpc_archs[17]
330 32, /* 32 bits in a word */
331 32, /* 32 bits in an address */
332 8, /* 8 bits in a byte */
338 FALSE, /* not the default */