1 /* BFD PowerPC CPU definition
2 Copyright 1994, 1995, 1996, 2000, 2001, 2002
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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 /* The common PowerPC architecture is compatible with the RS/6000. */
28 static const bfd_arch_info_type
*powerpc_compatible
29 PARAMS ((const bfd_arch_info_type
*, const bfd_arch_info_type
*));
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
;
36 BFD_ASSERT (a
->arch
== bfd_arch_powerpc
);
41 case bfd_arch_powerpc
:
42 return bfd_default_compatible (a
, b
);
44 if (a
->mach
== bfd_mach_ppc
)
51 const bfd_arch_info_type bfd_powerpc_archs
[] =
53 #if BFD_DEFAULT_TARGET_SIZE == 64
54 /* Default arch must come first. */
56 64, /* 64 bits in a word */
57 64, /* 64 bits in an address */
58 8, /* 8 bits in a byte */
64 TRUE
, /* default for 64 bit target */
69 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
70 being immediately after the 64 bit default. */
72 32, /* 32 bits in a word */
73 32, /* 32 bits in an address */
74 8, /* 8 bits in a byte */
76 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
83 &bfd_powerpc_archs
[2],
86 /* Default arch must come first. */
88 32, /* 32 bits in a word */
89 32, /* 32 bits in an address */
90 8, /* 8 bits in a byte */
92 bfd_mach_ppc
, /* for the POWER/PowerPC common architecture */
96 TRUE
, /* default for 32 bit target */
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_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_powerpc_archs
[3]
133 32, /* 32 bits in a word */
134 32, /* 32 bits in an address */
135 8, /* 8 bits in a byte */
141 FALSE
, /* not the default */
144 &bfd_powerpc_archs
[4]
147 32, /* 32 bits in a word */
148 32, /* 32 bits in an address */
149 8, /* 8 bits in a byte */
155 FALSE
, /* not the default */
158 &bfd_powerpc_archs
[5]
161 32, /* 32 bits in a word */
162 32, /* 32 bits in an address */
163 8, /* 8 bits in a byte */
169 FALSE
, /* not the default */
172 &bfd_powerpc_archs
[6]
175 32, /* 32 bits in a word */
176 32, /* 32 bits in an address */
177 8, /* 8 bits in a byte */
183 FALSE
, /* not the default */
186 &bfd_powerpc_archs
[7]
189 64, /* 64 bits in a word */
190 64, /* 64 bits in an address */
191 8, /* 8 bits in a byte */
197 FALSE
, /* not the default */
200 &bfd_powerpc_archs
[8]
203 64, /* 64 bits in a word */
204 64, /* 64 bits in an address */
205 8, /* 8 bits in a byte */
211 FALSE
, /* not the default */
214 &bfd_powerpc_archs
[9]
217 64, /* 64 bits in a word */
218 64, /* 64 bits in an address */
219 8, /* 8 bits in a byte */
225 FALSE
, /* not the default */
228 &bfd_powerpc_archs
[10]
231 64, /* 64 bits in a word */
232 64, /* 64 bits in an address */
233 8, /* 8 bits in a byte */
239 FALSE
, /* not the default */
242 &bfd_powerpc_archs
[11]
245 64, /* 64 bits in a word */
246 64, /* 64 bits in an address */
247 8, /* 8 bits in a byte */
249 bfd_mach_ppc_rs64iii
,
253 FALSE
, /* not the default */
256 &bfd_powerpc_archs
[12]
259 32, /* 32 bits in a word */
260 32, /* 32 bits in an address */
261 8, /* 8 bits in a byte */
267 FALSE
, /* not the default */
270 &bfd_powerpc_archs
[13]
273 32, /* 32 bits in a word */
274 32, /* 32 bits in an address */
275 8, /* 8 bits in a byte */
284 &bfd_powerpc_archs
[14]
287 32, /* 32 bits in a word */
288 32, /* 32 bits in an address */
289 8, /* 8 bits in a byte */
295 FALSE
, /* not the default */