* mi/mi-interp.c (mi_interpreter_resume): Route target error
[deliverable/binutils-gdb.git] / bfd / cpu-powerpc.c
CommitLineData
252b5132 1/* BFD PowerPC CPU definition
9553c638 2 Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003
899f54f5 3 Free Software Foundation, Inc.
252b5132
RH
4 Contributed by Ian Lance Taylor, Cygnus Support.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
3e110533 20Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
252b5132
RH
21
22#include "bfd.h"
23#include "sysdep.h"
24#include "libbfd.h"
25
26/* The common PowerPC architecture is compatible with the RS/6000. */
27
28static const bfd_arch_info_type *powerpc_compatible
29 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
30
31static const bfd_arch_info_type *
32powerpc_compatible (a,b)
33 const bfd_arch_info_type *a;
34 const bfd_arch_info_type *b;
35{
36 BFD_ASSERT (a->arch == bfd_arch_powerpc);
37 switch (b->arch)
38 {
39 default:
40 return NULL;
41 case bfd_arch_powerpc:
42 return bfd_default_compatible (a, b);
43 case bfd_arch_rs6000:
43dd9340 44 if (b->mach == bfd_mach_rs6k)
252b5132
RH
45 return a;
46 return NULL;
47 }
48 /*NOTREACHED*/
49}
50
899f54f5 51const bfd_arch_info_type bfd_powerpc_archs[] =
252b5132 52{
feee612b
AM
53#if BFD_DEFAULT_TARGET_SIZE == 64
54 /* Default arch must come first. */
99dc0092
AM
55 {
56 64, /* 64 bits in a word */
57 64, /* 64 bits in an address */
58 8, /* 8 bits in a byte */
59 bfd_arch_powerpc,
60 bfd_mach_ppc64,
61 "powerpc",
62 "powerpc:common64",
63 3,
b34976b6 64 TRUE, /* default for 64 bit target */
99dc0092
AM
65 powerpc_compatible,
66 bfd_default_scan,
67 &bfd_powerpc_archs[1]
68 },
feee612b
AM
69 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
70 being immediately after the 64 bit default. */
99dc0092
AM
71 {
72 32, /* 32 bits in a word */
73 32, /* 32 bits in an address */
74 8, /* 8 bits in a byte */
75 bfd_arch_powerpc,
76 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
77 "powerpc",
78 "powerpc:common",
79 3,
b34976b6 80 FALSE,
99dc0092
AM
81 powerpc_compatible,
82 bfd_default_scan,
83 &bfd_powerpc_archs[2],
84 },
85#else
feee612b 86 /* Default arch must come first. */
99dc0092
AM
87 {
88 32, /* 32 bits in a word */
89 32, /* 32 bits in an address */
90 8, /* 8 bits in a byte */
91 bfd_arch_powerpc,
92 bfd_mach_ppc, /* for the POWER/PowerPC common architecture */
93 "powerpc",
94 "powerpc:common",
95 3,
b34976b6 96 TRUE, /* default for 32 bit target */
99dc0092
AM
97 powerpc_compatible,
98 bfd_default_scan,
99 &bfd_powerpc_archs[1],
100 },
feee612b
AM
101 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
102 being immediately after the 32 bit default. */
99dc0092
AM
103 {
104 64, /* 64 bits in a word */
105 64, /* 64 bits in an address */
106 8, /* 8 bits in a byte */
107 bfd_arch_powerpc,
108 bfd_mach_ppc64,
109 "powerpc",
110 "powerpc:common64",
111 3,
b34976b6 112 FALSE,
99dc0092
AM
113 powerpc_compatible,
114 bfd_default_scan,
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,
99dc0092 130 &bfd_powerpc_archs[3]
252b5132
RH
131 },
132 {
133 32, /* 32 bits in a word */
134 32, /* 32 bits in an address */
135 8, /* 8 bits in a byte */
136 bfd_arch_powerpc,
87f33987 137 bfd_mach_ppc_ec603e,
252b5132 138 "powerpc",
87f33987 139 "powerpc:EC603e",
252b5132 140 3,
b34976b6 141 FALSE, /* not the default */
71f6b586 142 powerpc_compatible,
252b5132 143 bfd_default_scan,
99dc0092 144 &bfd_powerpc_archs[4]
252b5132
RH
145 },
146 {
147 32, /* 32 bits in a word */
148 32, /* 32 bits in an address */
149 8, /* 8 bits in a byte */
150 bfd_arch_powerpc,
87f33987 151 bfd_mach_ppc_604,
252b5132 152 "powerpc",
87f33987 153 "powerpc:604",
252b5132 154 3,
b34976b6 155 FALSE, /* not the default */
71f6b586 156 powerpc_compatible,
252b5132 157 bfd_default_scan,
99dc0092 158 &bfd_powerpc_archs[5]
252b5132
RH
159 },
160 {
161 32, /* 32 bits in a word */
162 32, /* 32 bits in an address */
163 8, /* 8 bits in a byte */
164 bfd_arch_powerpc,
87f33987 165 bfd_mach_ppc_403,
252b5132 166 "powerpc",
87f33987 167 "powerpc:403",
252b5132 168 3,
b34976b6 169 FALSE, /* not the default */
71f6b586 170 powerpc_compatible,
252b5132 171 bfd_default_scan,
99dc0092 172 &bfd_powerpc_archs[6]
7f6d05e8 173 },
87f33987 174 {
7f6d05e8 175 32, /* 32 bits in a word */
87f33987
ND
176 32, /* 32 bits in an address */
177 8, /* 8 bits in a byte */
178 bfd_arch_powerpc,
179 bfd_mach_ppc_601,
180 "powerpc",
181 "powerpc:601",
182 3,
b34976b6 183 FALSE, /* not the default */
71f6b586 184 powerpc_compatible,
87f33987 185 bfd_default_scan,
99dc0092 186 &bfd_powerpc_archs[7]
87f33987 187 },
71f6b586 188 {
87f33987 189 64, /* 64 bits in a word */
7f6d05e8
CP
190 64, /* 64 bits in an address */
191 8, /* 8 bits in a byte */
192 bfd_arch_powerpc,
87f33987 193 bfd_mach_ppc_620,
7f6d05e8
CP
194 "powerpc",
195 "powerpc:620",
196 3,
b34976b6 197 FALSE, /* not the default */
71f6b586 198 powerpc_compatible,
7f6d05e8 199 bfd_default_scan,
99dc0092 200 &bfd_powerpc_archs[8]
87f33987
ND
201 },
202 {
203 64, /* 64 bits in a word */
204 64, /* 64 bits in an address */
205 8, /* 8 bits in a byte */
206 bfd_arch_powerpc,
207 bfd_mach_ppc_630,
208 "powerpc",
209 "powerpc:630",
210 3,
b34976b6 211 FALSE, /* not the default */
87f33987
ND
212 powerpc_compatible,
213 bfd_default_scan,
99dc0092 214 &bfd_powerpc_archs[9]
87f33987
ND
215 },
216 {
217 64, /* 64 bits in a word */
218 64, /* 64 bits in an address */
219 8, /* 8 bits in a byte */
220 bfd_arch_powerpc,
221 bfd_mach_ppc_a35,
222 "powerpc",
223 "powerpc:a35",
224 3,
b34976b6 225 FALSE, /* not the default */
87f33987
ND
226 powerpc_compatible,
227 bfd_default_scan,
99dc0092 228 &bfd_powerpc_archs[10]
87f33987
ND
229 },
230 {
231 64, /* 64 bits in a word */
232 64, /* 64 bits in an address */
233 8, /* 8 bits in a byte */
234 bfd_arch_powerpc,
235 bfd_mach_ppc_rs64ii,
236 "powerpc",
237 "powerpc:rs64ii",
238 3,
b34976b6 239 FALSE, /* not the default */
87f33987
ND
240 powerpc_compatible,
241 bfd_default_scan,
99dc0092 242 &bfd_powerpc_archs[11]
87f33987
ND
243 },
244 {
245 64, /* 64 bits in a word */
246 64, /* 64 bits in an address */
247 8, /* 8 bits in a byte */
248 bfd_arch_powerpc,
249 bfd_mach_ppc_rs64iii,
250 "powerpc",
251 "powerpc:rs64iii",
252 3,
b34976b6 253 FALSE, /* not the default */
87f33987
ND
254 powerpc_compatible,
255 bfd_default_scan,
99dc0092 256 &bfd_powerpc_archs[12]
87f33987
ND
257 },
258 {
259 32, /* 32 bits in a word */
260 32, /* 32 bits in an address */
261 8, /* 8 bits in a byte */
262 bfd_arch_powerpc,
263 bfd_mach_ppc_7400,
264 "powerpc",
265 "powerpc:7400",
266 3,
b34976b6 267 FALSE, /* not the default */
87f33987
ND
268 powerpc_compatible,
269 bfd_default_scan,
99dc0092 270 &bfd_powerpc_archs[13]
188ac662 271 },
d62b1198
EZ
272 {
273 32, /* 32 bits in a word */
274 32, /* 32 bits in an address */
275 8, /* 8 bits in a byte */
276 bfd_arch_powerpc,
277 bfd_mach_ppc_e500,
278 "powerpc",
279 "powerpc:e500",
280 3,
b34976b6 281 FALSE,
d62b1198
EZ
282 powerpc_compatible,
283 bfd_default_scan,
284 &bfd_powerpc_archs[14]
285 },
188ac662
GK
286 {
287 32, /* 32 bits in a word */
288 32, /* 32 bits in an address */
289 8, /* 8 bits in a byte */
290 bfd_arch_powerpc,
291 bfd_mach_ppc_860,
292 "powerpc",
293 "powerpc:MPC8XX",
294 3,
b34976b6 295 FALSE, /* not the default */
188ac662
GK
296 powerpc_compatible,
297 bfd_default_scan,
899f54f5
AM
298 0
299 }
300};
This page took 0.380957 seconds and 4 git commands to generate.