1 /* BFD PowerPC CPU definition
2 Copyright (C) 1994-2019 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 if (a
->mach
== bfd_mach_ppc_vle
&& b
->bits_per_word
== 32)
40 if (b
->mach
== bfd_mach_ppc_vle
&& a
->bits_per_word
== 32)
42 return bfd_default_compatible (a
, b
);
44 if (b
->mach
== bfd_mach_rs6k
)
51 #define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \
53 BITS, /* Bits in a word. */ \
54 BITS, /* Bits in an address. */ \
55 8, /* Bits in a byte. */ \
60 3, /* Section alignment power. */ \
64 bfd_arch_default_fill, \
66 0 /* Maximum offset of a reloc from the start of an insn. */ \
69 const bfd_arch_info_type bfd_powerpc_archs
[] =
71 #if BFD_DEFAULT_TARGET_SIZE == 64
72 /* Default for 64 bit target. */
73 N (64, bfd_mach_ppc64
, "powerpc:common64", TRUE
, bfd_powerpc_archs
+ 1),
74 /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
75 being immediately after the 64 bit default. */
76 N (32, bfd_mach_ppc
, "powerpc:common", FALSE
, bfd_powerpc_archs
+ 2),
78 /* Default arch must come first. */
79 N (32, bfd_mach_ppc
, "powerpc:common", TRUE
, bfd_powerpc_archs
+ 1),
80 /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
81 being immediately after the 32 bit default. */
82 N (64, bfd_mach_ppc64
, "powerpc:common64", FALSE
, bfd_powerpc_archs
+ 2),
84 N (32, bfd_mach_ppc_603
, "powerpc:603", FALSE
, bfd_powerpc_archs
+ 3),
85 N (32, bfd_mach_ppc_ec603e
, "powerpc:EC603e", FALSE
, bfd_powerpc_archs
+ 4),
86 N (32, bfd_mach_ppc_604
, "powerpc:604", FALSE
, bfd_powerpc_archs
+ 5),
87 N (32, bfd_mach_ppc_403
, "powerpc:403", FALSE
, bfd_powerpc_archs
+ 6),
88 N (32, bfd_mach_ppc_601
, "powerpc:601", FALSE
, bfd_powerpc_archs
+ 7),
89 N (64, bfd_mach_ppc_620
, "powerpc:620", FALSE
, bfd_powerpc_archs
+ 8),
90 N (64, bfd_mach_ppc_630
, "powerpc:630", FALSE
, bfd_powerpc_archs
+ 9),
91 N (64, bfd_mach_ppc_a35
, "powerpc:a35", FALSE
, bfd_powerpc_archs
+ 10),
92 N (64, bfd_mach_ppc_rs64ii
, "powerpc:rs64ii", FALSE
, bfd_powerpc_archs
+ 11),
93 N (64, bfd_mach_ppc_rs64iii
, "powerpc:rs64iii", FALSE
, bfd_powerpc_archs
+ 12),
94 N (32, bfd_mach_ppc_7400
, "powerpc:7400", FALSE
, bfd_powerpc_archs
+ 13),
95 N (32, bfd_mach_ppc_e500
, "powerpc:e500", FALSE
, bfd_powerpc_archs
+ 14),
96 N (32, bfd_mach_ppc_e500mc
, "powerpc:e500mc", FALSE
, bfd_powerpc_archs
+ 15),
97 N (64, bfd_mach_ppc_e500mc64
, "powerpc:e500mc64",FALSE
, bfd_powerpc_archs
+ 16),
98 N (32, bfd_mach_ppc_860
, "powerpc:MPC8XX", FALSE
, bfd_powerpc_archs
+ 17),
99 N (32, bfd_mach_ppc_750
, "powerpc:750", FALSE
, bfd_powerpc_archs
+ 18),
100 N (32, bfd_mach_ppc_titan
, "powerpc:titan", FALSE
, bfd_powerpc_archs
+ 19),
103 16, /* Bits in a word. */
104 32, /* Bits in an address. */
105 8, /* Bits in a byte. */
111 FALSE
, /* Not the default. */
114 bfd_arch_default_fill
,
115 bfd_powerpc_archs
+ 20,
116 0 /* Maximum offset of a reloc from the start of an insn. */
119 N (64, bfd_mach_ppc_e5500
, "powerpc:e5500", FALSE
, bfd_powerpc_archs
+ 21),
120 N (64, bfd_mach_ppc_e6500
, "powerpc:e6500", FALSE
, NULL
)