1 /* BFD PowerPC CPU definition
2 Copyright (C) 1994-2015 Free Software Foundation, Inc.
3 Contributed by Ian Lance Taylor, Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
26 /* The common PowerPC architecture is compatible with the RS/6000. */
28 static const bfd_arch_info_type
*
29 powerpc_compatible (const bfd_arch_info_type
*a
,
30 const bfd_arch_info_type
*b
)
32 BFD_ASSERT (a
->arch
== bfd_arch_powerpc
);
37 case bfd_arch_powerpc
:
38 return bfd_default_compatible (a
, b
);
40 if (b
->mach
== bfd_mach_rs6k
)
47 const bfd_arch_info_type bfd_powerpc_archs
[] =
49 #if BFD_DEFAULT_TARGET_SIZE == 64
50 /* Default arch must come first. */
52 64, /* 64 bits in a word */
53 64, /* 64 bits in an address */
54 8, /* 8 bits in a byte */
60 TRUE
, /* default for 64 bit target */
63 bfd_arch_default_fill
,
66 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
67 being immediately after the 64 bit default. */
69 32, /* 32 bits in a word */
70 32, /* 32 bits in an address */
71 8, /* 8 bits in a byte */
73 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
80 bfd_arch_default_fill
,
81 &bfd_powerpc_archs
[2],
84 /* Default arch must come first. */
86 32, /* 32 bits in a word */
87 32, /* 32 bits in an address */
88 8, /* 8 bits in a byte */
90 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
94 TRUE
, /* default for 32 bit target */
97 bfd_arch_default_fill
,
98 &bfd_powerpc_archs
[1],
100 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
101 being immediately after the 32 bit default. */
103 64, /* 64 bits in a word */
104 64, /* 64 bits in an address */
105 8, /* 8 bits in a byte */
114 bfd_arch_default_fill
,
115 &bfd_powerpc_archs
[2]
119 32, /* 32 bits in a word */
120 32, /* 32 bits in an address */
121 8, /* 8 bits in a byte */
127 FALSE
, /* not the default */
130 bfd_arch_default_fill
,
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_arch_default_fill
,
146 &bfd_powerpc_archs
[4]
149 32, /* 32 bits in a word */
150 32, /* 32 bits in an address */
151 8, /* 8 bits in a byte */
157 FALSE
, /* not the default */
160 bfd_arch_default_fill
,
161 &bfd_powerpc_archs
[5]
164 32, /* 32 bits in a word */
165 32, /* 32 bits in an address */
166 8, /* 8 bits in a byte */
172 FALSE
, /* not the default */
175 bfd_arch_default_fill
,
176 &bfd_powerpc_archs
[6]
179 32, /* 32 bits in a word */
180 32, /* 32 bits in an address */
181 8, /* 8 bits in a byte */
187 FALSE
, /* not the default */
190 bfd_arch_default_fill
,
191 &bfd_powerpc_archs
[7]
194 64, /* 64 bits in a word */
195 64, /* 64 bits in an address */
196 8, /* 8 bits in a byte */
202 FALSE
, /* not the default */
205 bfd_arch_default_fill
,
206 &bfd_powerpc_archs
[8]
209 64, /* 64 bits in a word */
210 64, /* 64 bits in an address */
211 8, /* 8 bits in a byte */
217 FALSE
, /* not the default */
220 bfd_arch_default_fill
,
221 &bfd_powerpc_archs
[9]
224 64, /* 64 bits in a word */
225 64, /* 64 bits in an address */
226 8, /* 8 bits in a byte */
232 FALSE
, /* not the default */
235 bfd_arch_default_fill
,
236 &bfd_powerpc_archs
[10]
239 64, /* 64 bits in a word */
240 64, /* 64 bits in an address */
241 8, /* 8 bits in a byte */
247 FALSE
, /* not the default */
250 bfd_arch_default_fill
,
251 &bfd_powerpc_archs
[11]
254 64, /* 64 bits in a word */
255 64, /* 64 bits in an address */
256 8, /* 8 bits in a byte */
258 bfd_mach_ppc_rs64iii
,
262 FALSE
, /* not the default */
265 bfd_arch_default_fill
,
266 &bfd_powerpc_archs
[12]
269 32, /* 32 bits in a word */
270 32, /* 32 bits in an address */
271 8, /* 8 bits in a byte */
277 FALSE
, /* not the default */
280 bfd_arch_default_fill
,
281 &bfd_powerpc_archs
[13]
284 32, /* 32 bits in a word */
285 32, /* 32 bits in an address */
286 8, /* 8 bits in a byte */
295 bfd_arch_default_fill
,
296 &bfd_powerpc_archs
[14]
299 32, /* 32 bits in a word */
300 32, /* 32 bits in an address */
301 8, /* 8 bits in a byte */
307 FALSE
, /* not the default */
310 bfd_arch_default_fill
,
311 &bfd_powerpc_archs
[15]
314 64, /* 64 bits in a word */
315 64, /* 64 bits in an address */
316 8, /* 8 bits in a byte */
318 bfd_mach_ppc_e500mc64
,
322 FALSE
, /* not the default */
325 bfd_arch_default_fill
,
326 &bfd_powerpc_archs
[16]
329 32, /* 32 bits in a word */
330 32, /* 32 bits in an address */
331 8, /* 8 bits in a byte */
337 FALSE
, /* not the default */
340 bfd_arch_default_fill
,
341 &bfd_powerpc_archs
[17]
344 32, /* 32 bits in a word */
345 32, /* 32 bits in an address */
346 8, /* 8 bits in a byte */
352 FALSE
, /* not the default */
355 bfd_arch_default_fill
,
356 &bfd_powerpc_archs
[18]
359 32, /* 32 bits in a word */
360 32, /* 32 bits in an address */
361 8, /* 8 bits in a byte */
367 FALSE
, /* not the default */
370 bfd_arch_default_fill
,
371 &bfd_powerpc_archs
[19]
374 16, /* 16 or 32 bits in a word */
375 32, /* 32 bits in an address */
376 8, /* 8 bits in a byte */
382 FALSE
, /* not the default */
385 bfd_arch_default_fill
,
386 &bfd_powerpc_archs
[20]
389 64, /* 64 bits in a word */
390 64, /* 64 bits in an address */
391 8, /* 8 bits in a byte */
397 FALSE
, /* not the default */
400 bfd_arch_default_fill
,
401 &bfd_powerpc_archs
[21]
404 64, /* 64 bits in a word */
405 64, /* 64 bits in an address */
406 8, /* 8 bits in a byte */
412 FALSE
, /* not the default */
415 bfd_arch_default_fill
,