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 */
68 bfd_arch_default_fill
,
71 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
72 being immediately after the 64 bit default. */
74 32, /* 32 bits in a word */
75 32, /* 32 bits in an address */
76 8, /* 8 bits in a byte */
78 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
85 bfd_arch_default_fill
,
86 &bfd_powerpc_archs
[2],
89 /* Default arch must come first. */
91 32, /* 32 bits in a word */
92 32, /* 32 bits in an address */
93 8, /* 8 bits in a byte */
95 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
99 TRUE
, /* default for 32 bit target */
102 bfd_arch_default_fill
,
103 &bfd_powerpc_archs
[1],
105 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
106 being immediately after the 32 bit default. */
108 64, /* 64 bits in a word */
109 64, /* 64 bits in an address */
110 8, /* 8 bits in a byte */
119 bfd_arch_default_fill
,
120 &bfd_powerpc_archs
[2]
124 32, /* 32 bits in a word */
125 32, /* 32 bits in an address */
126 8, /* 8 bits in a byte */
132 FALSE
, /* not the default */
135 bfd_arch_default_fill
,
136 &bfd_powerpc_archs
[3]
139 32, /* 32 bits in a word */
140 32, /* 32 bits in an address */
141 8, /* 8 bits in a byte */
147 FALSE
, /* not the default */
150 bfd_arch_default_fill
,
151 &bfd_powerpc_archs
[4]
154 32, /* 32 bits in a word */
155 32, /* 32 bits in an address */
156 8, /* 8 bits in a byte */
162 FALSE
, /* not the default */
165 bfd_arch_default_fill
,
166 &bfd_powerpc_archs
[5]
169 32, /* 32 bits in a word */
170 32, /* 32 bits in an address */
171 8, /* 8 bits in a byte */
177 FALSE
, /* not the default */
180 bfd_arch_default_fill
,
181 &bfd_powerpc_archs
[6]
184 32, /* 32 bits in a word */
185 32, /* 32 bits in an address */
186 8, /* 8 bits in a byte */
192 FALSE
, /* not the default */
195 bfd_arch_default_fill
,
196 &bfd_powerpc_archs
[7]
199 64, /* 64 bits in a word */
200 64, /* 64 bits in an address */
201 8, /* 8 bits in a byte */
207 FALSE
, /* not the default */
210 bfd_arch_default_fill
,
211 &bfd_powerpc_archs
[8]
214 64, /* 64 bits in a word */
215 64, /* 64 bits in an address */
216 8, /* 8 bits in a byte */
222 FALSE
, /* not the default */
225 bfd_arch_default_fill
,
226 &bfd_powerpc_archs
[9]
229 64, /* 64 bits in a word */
230 64, /* 64 bits in an address */
231 8, /* 8 bits in a byte */
237 FALSE
, /* not the default */
240 bfd_arch_default_fill
,
241 &bfd_powerpc_archs
[10]
244 64, /* 64 bits in a word */
245 64, /* 64 bits in an address */
246 8, /* 8 bits in a byte */
252 FALSE
, /* not the default */
255 bfd_arch_default_fill
,
256 &bfd_powerpc_archs
[11]
259 64, /* 64 bits in a word */
260 64, /* 64 bits in an address */
261 8, /* 8 bits in a byte */
263 bfd_mach_ppc_rs64iii
,
267 FALSE
, /* not the default */
270 bfd_arch_default_fill
,
271 &bfd_powerpc_archs
[12]
274 32, /* 32 bits in a word */
275 32, /* 32 bits in an address */
276 8, /* 8 bits in a byte */
282 FALSE
, /* not the default */
285 bfd_arch_default_fill
,
286 &bfd_powerpc_archs
[13]
289 32, /* 32 bits in a word */
290 32, /* 32 bits in an address */
291 8, /* 8 bits in a byte */
300 bfd_arch_default_fill
,
301 &bfd_powerpc_archs
[14]
304 32, /* 32 bits in a word */
305 32, /* 32 bits in an address */
306 8, /* 8 bits in a byte */
312 FALSE
, /* not the default */
315 bfd_arch_default_fill
,
316 &bfd_powerpc_archs
[15]
319 64, /* 64 bits in a word */
320 64, /* 64 bits in an address */
321 8, /* 8 bits in a byte */
323 bfd_mach_ppc_e500mc64
,
327 FALSE
, /* not the default */
330 bfd_arch_default_fill
,
331 &bfd_powerpc_archs
[16]
334 32, /* 32 bits in a word */
335 32, /* 32 bits in an address */
336 8, /* 8 bits in a byte */
342 FALSE
, /* not the default */
345 bfd_arch_default_fill
,
346 &bfd_powerpc_archs
[17]
349 32, /* 32 bits in a word */
350 32, /* 32 bits in an address */
351 8, /* 8 bits in a byte */
357 FALSE
, /* not the default */
360 bfd_arch_default_fill
,
361 &bfd_powerpc_archs
[18]
364 32, /* 32 bits in a word */
365 32, /* 32 bits in an address */
366 8, /* 8 bits in a byte */
372 FALSE
, /* not the default */
375 bfd_arch_default_fill
,