New 2016 binutils ChangeLog files
[deliverable/binutils-gdb.git] / bfd / cpu-powerpc.c
CommitLineData
252b5132 1/* BFD PowerPC CPU definition
b90efa5b 2 Copyright (C) 1994-2015 Free Software Foundation, Inc.
252b5132
RH
3 Contributed by Ian Lance Taylor, Cygnus Support.
4
cd123cb7
NC
5 This file is part of BFD, the Binary File Descriptor library.
6
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.
11
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.
16
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. */
252b5132 21
252b5132 22#include "sysdep.h"
3db64b00 23#include "bfd.h"
252b5132
RH
24#include "libbfd.h"
25
26/* The common PowerPC architecture is compatible with the RS/6000. */
27
252b5132 28static const bfd_arch_info_type *
2c3fc389
NC
29powerpc_compatible (const bfd_arch_info_type *a,
30 const bfd_arch_info_type *b)
252b5132
RH
31{
32 BFD_ASSERT (a->arch == bfd_arch_powerpc);
33 switch (b->arch)
34 {
35 default:
36 return NULL;
37 case bfd_arch_powerpc:
38 return bfd_default_compatible (a, b);
39 case bfd_arch_rs6000:
43dd9340 40 if (b->mach == bfd_mach_rs6k)
252b5132
RH
41 return a;
42 return NULL;
43 }
44 /*NOTREACHED*/
45}
46
899f54f5 47const bfd_arch_info_type bfd_powerpc_archs[] =
252b5132 48{
feee612b
AM
49#if BFD_DEFAULT_TARGET_SIZE == 64
50 /* Default arch must come first. */
99dc0092
AM
51 {
52 64, /* 64 bits in a word */
53 64, /* 64 bits in an address */
54 8, /* 8 bits in a byte */
55 bfd_arch_powerpc,
56 bfd_mach_ppc64,
57 "powerpc",
58 "powerpc:common64",
59 3,
b34976b6 60 TRUE, /* default for 64 bit target */
99dc0092
AM
61 powerpc_compatible,
62 bfd_default_scan,
b7761f11 63 bfd_arch_default_fill,
99dc0092
AM
64 &bfd_powerpc_archs[1]
65 },
feee612b
AM
66 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
67 being immediately after the 64 bit default. */
99dc0092
AM
68 {
69 32, /* 32 bits in a word */
70 32, /* 32 bits in an address */
71 8, /* 8 bits in a byte */
72 bfd_arch_powerpc,
73 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
74 "powerpc",
75 "powerpc:common",
76 3,
b34976b6 77 FALSE,
99dc0092
AM
78 powerpc_compatible,
79 bfd_default_scan,
b7761f11 80 bfd_arch_default_fill,
99dc0092
AM
81 &bfd_powerpc_archs[2],
82 },
83#else
feee612b 84 /* Default arch must come first. */
99dc0092
AM
85 {
86 32, /* 32 bits in a word */
87 32, /* 32 bits in an address */
88 8, /* 8 bits in a byte */
89 bfd_arch_powerpc,
90 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
91 "powerpc",
92 "powerpc:common",
93 3,
b34976b6 94 TRUE, /* default for 32 bit target */
99dc0092
AM
95 powerpc_compatible,
96 bfd_default_scan,
b7761f11 97 bfd_arch_default_fill,
99dc0092
AM
98 &bfd_powerpc_archs[1],
99 },
feee612b
AM
100 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
101 being immediately after the 32 bit default. */
99dc0092
AM
102 {
103 64, /* 64 bits in a word */
104 64, /* 64 bits in an address */
105 8, /* 8 bits in a byte */
106 bfd_arch_powerpc,
107 bfd_mach_ppc64,
108 "powerpc",
109 "powerpc:common64",
110 3,
b34976b6 111 FALSE,
99dc0092
AM
112 powerpc_compatible,
113 bfd_default_scan,
b7761f11 114 bfd_arch_default_fill,
99dc0092
AM
115 &bfd_powerpc_archs[2]
116 },
117#endif
252b5132
RH
118 {
119 32, /* 32 bits in a word */
120 32, /* 32 bits in an address */
121 8, /* 8 bits in a byte */
122 bfd_arch_powerpc,
87f33987 123 bfd_mach_ppc_603,
252b5132
RH
124 "powerpc",
125 "powerpc:603",
126 3,
b34976b6 127 FALSE, /* not the default */
71f6b586 128 powerpc_compatible,
252b5132 129 bfd_default_scan,
b7761f11 130 bfd_arch_default_fill,
99dc0092 131 &bfd_powerpc_archs[3]
252b5132
RH
132 },
133 {
134 32, /* 32 bits in a word */
135 32, /* 32 bits in an address */
136 8, /* 8 bits in a byte */
137 bfd_arch_powerpc,
87f33987 138 bfd_mach_ppc_ec603e,
252b5132 139 "powerpc",
87f33987 140 "powerpc:EC603e",
252b5132 141 3,
b34976b6 142 FALSE, /* not the default */
71f6b586 143 powerpc_compatible,
252b5132 144 bfd_default_scan,
b7761f11 145 bfd_arch_default_fill,
99dc0092 146 &bfd_powerpc_archs[4]
252b5132
RH
147 },
148 {
149 32, /* 32 bits in a word */
150 32, /* 32 bits in an address */
151 8, /* 8 bits in a byte */
152 bfd_arch_powerpc,
87f33987 153 bfd_mach_ppc_604,
252b5132 154 "powerpc",
87f33987 155 "powerpc:604",
252b5132 156 3,
b34976b6 157 FALSE, /* not the default */
71f6b586 158 powerpc_compatible,
252b5132 159 bfd_default_scan,
b7761f11 160 bfd_arch_default_fill,
99dc0092 161 &bfd_powerpc_archs[5]
252b5132
RH
162 },
163 {
164 32, /* 32 bits in a word */
165 32, /* 32 bits in an address */
166 8, /* 8 bits in a byte */
167 bfd_arch_powerpc,
87f33987 168 bfd_mach_ppc_403,
252b5132 169 "powerpc",
87f33987 170 "powerpc:403",
252b5132 171 3,
b34976b6 172 FALSE, /* not the default */
71f6b586 173 powerpc_compatible,
252b5132 174 bfd_default_scan,
b7761f11 175 bfd_arch_default_fill,
99dc0092 176 &bfd_powerpc_archs[6]
7f6d05e8 177 },
87f33987 178 {
7f6d05e8 179 32, /* 32 bits in a word */
87f33987
ND
180 32, /* 32 bits in an address */
181 8, /* 8 bits in a byte */
182 bfd_arch_powerpc,
183 bfd_mach_ppc_601,
184 "powerpc",
185 "powerpc:601",
186 3,
b34976b6 187 FALSE, /* not the default */
71f6b586 188 powerpc_compatible,
87f33987 189 bfd_default_scan,
b7761f11 190 bfd_arch_default_fill,
99dc0092 191 &bfd_powerpc_archs[7]
87f33987 192 },
71f6b586 193 {
87f33987 194 64, /* 64 bits in a word */
7f6d05e8
CP
195 64, /* 64 bits in an address */
196 8, /* 8 bits in a byte */
197 bfd_arch_powerpc,
87f33987 198 bfd_mach_ppc_620,
7f6d05e8
CP
199 "powerpc",
200 "powerpc:620",
201 3,
b34976b6 202 FALSE, /* not the default */
71f6b586 203 powerpc_compatible,
7f6d05e8 204 bfd_default_scan,
b7761f11 205 bfd_arch_default_fill,
99dc0092 206 &bfd_powerpc_archs[8]
87f33987
ND
207 },
208 {
209 64, /* 64 bits in a word */
210 64, /* 64 bits in an address */
211 8, /* 8 bits in a byte */
212 bfd_arch_powerpc,
213 bfd_mach_ppc_630,
214 "powerpc",
215 "powerpc:630",
216 3,
b34976b6 217 FALSE, /* not the default */
87f33987
ND
218 powerpc_compatible,
219 bfd_default_scan,
b7761f11 220 bfd_arch_default_fill,
99dc0092 221 &bfd_powerpc_archs[9]
87f33987
ND
222 },
223 {
224 64, /* 64 bits in a word */
225 64, /* 64 bits in an address */
226 8, /* 8 bits in a byte */
227 bfd_arch_powerpc,
228 bfd_mach_ppc_a35,
229 "powerpc",
230 "powerpc:a35",
231 3,
b34976b6 232 FALSE, /* not the default */
87f33987
ND
233 powerpc_compatible,
234 bfd_default_scan,
b7761f11 235 bfd_arch_default_fill,
99dc0092 236 &bfd_powerpc_archs[10]
87f33987
ND
237 },
238 {
239 64, /* 64 bits in a word */
240 64, /* 64 bits in an address */
241 8, /* 8 bits in a byte */
242 bfd_arch_powerpc,
243 bfd_mach_ppc_rs64ii,
244 "powerpc",
245 "powerpc:rs64ii",
246 3,
b34976b6 247 FALSE, /* not the default */
87f33987
ND
248 powerpc_compatible,
249 bfd_default_scan,
b7761f11 250 bfd_arch_default_fill,
99dc0092 251 &bfd_powerpc_archs[11]
87f33987
ND
252 },
253 {
254 64, /* 64 bits in a word */
255 64, /* 64 bits in an address */
256 8, /* 8 bits in a byte */
257 bfd_arch_powerpc,
258 bfd_mach_ppc_rs64iii,
259 "powerpc",
260 "powerpc:rs64iii",
261 3,
b34976b6 262 FALSE, /* not the default */
87f33987
ND
263 powerpc_compatible,
264 bfd_default_scan,
b7761f11 265 bfd_arch_default_fill,
99dc0092 266 &bfd_powerpc_archs[12]
87f33987
ND
267 },
268 {
269 32, /* 32 bits in a word */
270 32, /* 32 bits in an address */
271 8, /* 8 bits in a byte */
272 bfd_arch_powerpc,
273 bfd_mach_ppc_7400,
274 "powerpc",
275 "powerpc:7400",
276 3,
b34976b6 277 FALSE, /* not the default */
87f33987
ND
278 powerpc_compatible,
279 bfd_default_scan,
b7761f11 280 bfd_arch_default_fill,
99dc0092 281 &bfd_powerpc_archs[13]
188ac662 282 },
d62b1198
EZ
283 {
284 32, /* 32 bits in a word */
285 32, /* 32 bits in an address */
286 8, /* 8 bits in a byte */
287 bfd_arch_powerpc,
288 bfd_mach_ppc_e500,
289 "powerpc",
290 "powerpc:e500",
291 3,
b34976b6 292 FALSE,
d62b1198
EZ
293 powerpc_compatible,
294 bfd_default_scan,
b7761f11 295 bfd_arch_default_fill,
d62b1198
EZ
296 &bfd_powerpc_archs[14]
297 },
9239aded
AM
298 {
299 32, /* 32 bits in a word */
300 32, /* 32 bits in an address */
301 8, /* 8 bits in a byte */
302 bfd_arch_powerpc,
303 bfd_mach_ppc_e500mc,
304 "powerpc",
305 "powerpc:e500mc",
306 3,
307 FALSE, /* not the default */
308 powerpc_compatible,
309 bfd_default_scan,
b7761f11 310 bfd_arch_default_fill,
9239aded
AM
311 &bfd_powerpc_archs[15]
312 },
0dc93057
AM
313 {
314 64, /* 64 bits in a word */
315 64, /* 64 bits in an address */
316 8, /* 8 bits in a byte */
317 bfd_arch_powerpc,
318 bfd_mach_ppc_e500mc64,
319 "powerpc",
320 "powerpc:e500mc64",
321 3,
322 FALSE, /* not the default */
323 powerpc_compatible,
324 bfd_default_scan,
b7761f11 325 bfd_arch_default_fill,
0dc93057
AM
326 &bfd_powerpc_archs[16]
327 },
188ac662
GK
328 {
329 32, /* 32 bits in a word */
330 32, /* 32 bits in an address */
331 8, /* 8 bits in a byte */
332 bfd_arch_powerpc,
333 bfd_mach_ppc_860,
334 "powerpc",
335 "powerpc:MPC8XX",
336 3,
b34976b6 337 FALSE, /* not the default */
188ac662
GK
338 powerpc_compatible,
339 bfd_default_scan,
b7761f11 340 bfd_arch_default_fill,
0dc93057 341 &bfd_powerpc_archs[17]
1ca81d72
AM
342 },
343 {
344 32, /* 32 bits in a word */
345 32, /* 32 bits in an address */
346 8, /* 8 bits in a byte */
347 bfd_arch_powerpc,
348 bfd_mach_ppc_750,
349 "powerpc",
350 "powerpc:750",
351 3,
352 FALSE, /* not the default */
353 powerpc_compatible,
354 bfd_default_scan,
b7761f11 355 bfd_arch_default_fill,
ce3d2015
AM
356 &bfd_powerpc_archs[18]
357 },
358 {
359 32, /* 32 bits in a word */
360 32, /* 32 bits in an address */
361 8, /* 8 bits in a byte */
362 bfd_arch_powerpc,
363 bfd_mach_ppc_titan,
364 "powerpc",
365 "powerpc:titan",
366 3,
367 FALSE, /* not the default */
368 powerpc_compatible,
369 bfd_default_scan,
b7761f11 370 bfd_arch_default_fill,
aea77599
AM
371 &bfd_powerpc_archs[19]
372 },
b9c361e0
JL
373 {
374 16, /* 16 or 32 bits in a word */
375 32, /* 32 bits in an address */
376 8, /* 8 bits in a byte */
377 bfd_arch_powerpc,
378 bfd_mach_ppc_vle,
379 "powerpc",
380 "powerpc:vle",
381 3,
382 FALSE, /* not the default */
383 powerpc_compatible,
384 bfd_default_scan,
385 bfd_arch_default_fill,
386 &bfd_powerpc_archs[20]
387 },
aea77599
AM
388 {
389 64, /* 64 bits in a word */
390 64, /* 64 bits in an address */
391 8, /* 8 bits in a byte */
392 bfd_arch_powerpc,
393 bfd_mach_ppc_e5500,
394 "powerpc",
395 "powerpc:e5500",
396 3,
397 FALSE, /* not the default */
398 powerpc_compatible,
399 bfd_default_scan,
400 bfd_arch_default_fill,
b9c361e0 401 &bfd_powerpc_archs[21]
aea77599
AM
402 },
403 {
404 64, /* 64 bits in a word */
405 64, /* 64 bits in an address */
406 8, /* 8 bits in a byte */
407 bfd_arch_powerpc,
408 bfd_mach_ppc_e6500,
409 "powerpc",
410 "powerpc:e6500",
411 3,
412 FALSE, /* not the default */
413 powerpc_compatible,
414 bfd_default_scan,
415 bfd_arch_default_fill,
899f54f5
AM
416 0
417 }
418};
This page took 0.745356 seconds and 4 git commands to generate.