1 /* BFD PowerPC CPU definition
2 Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2007, 2008,
3 2010, 2012 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
*
30 powerpc_compatible (const bfd_arch_info_type
*a
,
31 const bfd_arch_info_type
*b
)
33 BFD_ASSERT (a
->arch
== bfd_arch_powerpc
);
38 case bfd_arch_powerpc
:
39 return bfd_default_compatible (a
, b
);
41 if (b
->mach
== bfd_mach_rs6k
)
48 const bfd_arch_info_type bfd_powerpc_archs
[] =
50 #if BFD_DEFAULT_TARGET_SIZE == 64
51 /* Default arch must come first. */
53 64, /* 64 bits in a word */
54 64, /* 64 bits in an address */
55 8, /* 8 bits in a byte */
61 TRUE
, /* default for 64 bit target */
64 bfd_arch_default_fill
,
67 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
68 being immediately after the 64 bit default. */
70 32, /* 32 bits in a word */
71 32, /* 32 bits in an address */
72 8, /* 8 bits in a byte */
74 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
81 bfd_arch_default_fill
,
82 &bfd_powerpc_archs
[2],
85 /* Default arch must come first. */
87 32, /* 32 bits in a word */
88 32, /* 32 bits in an address */
89 8, /* 8 bits in a byte */
91 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
95 TRUE
, /* default for 32 bit target */
98 bfd_arch_default_fill
,
99 &bfd_powerpc_archs
[1],
101 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
102 being immediately after the 32 bit default. */
104 64, /* 64 bits in a word */
105 64, /* 64 bits in an address */
106 8, /* 8 bits in a byte */
115 bfd_arch_default_fill
,
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_arch_default_fill
,
132 &bfd_powerpc_archs
[3]
135 32, /* 32 bits in a word */
136 32, /* 32 bits in an address */
137 8, /* 8 bits in a byte */
143 FALSE
, /* not the default */
146 bfd_arch_default_fill
,
147 &bfd_powerpc_archs
[4]
150 32, /* 32 bits in a word */
151 32, /* 32 bits in an address */
152 8, /* 8 bits in a byte */
158 FALSE
, /* not the default */
161 bfd_arch_default_fill
,
162 &bfd_powerpc_archs
[5]
165 32, /* 32 bits in a word */
166 32, /* 32 bits in an address */
167 8, /* 8 bits in a byte */
173 FALSE
, /* not the default */
176 bfd_arch_default_fill
,
177 &bfd_powerpc_archs
[6]
180 32, /* 32 bits in a word */
181 32, /* 32 bits in an address */
182 8, /* 8 bits in a byte */
188 FALSE
, /* not the default */
191 bfd_arch_default_fill
,
192 &bfd_powerpc_archs
[7]
195 64, /* 64 bits in a word */
196 64, /* 64 bits in an address */
197 8, /* 8 bits in a byte */
203 FALSE
, /* not the default */
206 bfd_arch_default_fill
,
207 &bfd_powerpc_archs
[8]
210 64, /* 64 bits in a word */
211 64, /* 64 bits in an address */
212 8, /* 8 bits in a byte */
218 FALSE
, /* not the default */
221 bfd_arch_default_fill
,
222 &bfd_powerpc_archs
[9]
225 64, /* 64 bits in a word */
226 64, /* 64 bits in an address */
227 8, /* 8 bits in a byte */
233 FALSE
, /* not the default */
236 bfd_arch_default_fill
,
237 &bfd_powerpc_archs
[10]
240 64, /* 64 bits in a word */
241 64, /* 64 bits in an address */
242 8, /* 8 bits in a byte */
248 FALSE
, /* not the default */
251 bfd_arch_default_fill
,
252 &bfd_powerpc_archs
[11]
255 64, /* 64 bits in a word */
256 64, /* 64 bits in an address */
257 8, /* 8 bits in a byte */
259 bfd_mach_ppc_rs64iii
,
263 FALSE
, /* not the default */
266 bfd_arch_default_fill
,
267 &bfd_powerpc_archs
[12]
270 32, /* 32 bits in a word */
271 32, /* 32 bits in an address */
272 8, /* 8 bits in a byte */
278 FALSE
, /* not the default */
281 bfd_arch_default_fill
,
282 &bfd_powerpc_archs
[13]
285 32, /* 32 bits in a word */
286 32, /* 32 bits in an address */
287 8, /* 8 bits in a byte */
296 bfd_arch_default_fill
,
297 &bfd_powerpc_archs
[14]
300 32, /* 32 bits in a word */
301 32, /* 32 bits in an address */
302 8, /* 8 bits in a byte */
308 FALSE
, /* not the default */
311 bfd_arch_default_fill
,
312 &bfd_powerpc_archs
[15]
315 64, /* 64 bits in a word */
316 64, /* 64 bits in an address */
317 8, /* 8 bits in a byte */
319 bfd_mach_ppc_e500mc64
,
323 FALSE
, /* not the default */
326 bfd_arch_default_fill
,
327 &bfd_powerpc_archs
[16]
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 */
341 bfd_arch_default_fill
,
342 &bfd_powerpc_archs
[17]
345 32, /* 32 bits in a word */
346 32, /* 32 bits in an address */
347 8, /* 8 bits in a byte */
353 FALSE
, /* not the default */
356 bfd_arch_default_fill
,
357 &bfd_powerpc_archs
[18]
360 32, /* 32 bits in a word */
361 32, /* 32 bits in an address */
362 8, /* 8 bits in a byte */
368 FALSE
, /* not the default */
371 bfd_arch_default_fill
,
372 &bfd_powerpc_archs
[19]
375 16, /* 16 or 32 bits in a word */
376 32, /* 32 bits in an address */
377 8, /* 8 bits in a byte */
383 FALSE
, /* not the default */
386 bfd_arch_default_fill
,
387 &bfd_powerpc_archs
[20]
390 64, /* 64 bits in a word */
391 64, /* 64 bits in an address */
392 8, /* 8 bits in a byte */
398 FALSE
, /* not the default */
401 bfd_arch_default_fill
,
402 &bfd_powerpc_archs
[21]
405 64, /* 64 bits in a word */
406 64, /* 64 bits in an address */
407 8, /* 8 bits in a byte */
413 FALSE
, /* not the default */
416 bfd_arch_default_fill
,