1 /* BFD library support routines for the Renesas SH architecture.
2 Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003
3 Free Software Foundation, Inc.
4 Hacked by Steve Chamberlain of 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. */
27 /* This routine is provided two arch_infos and returns whether
28 they'd be compatible. */
30 static const bfd_arch_info_type *
32 const bfd_arch_info_type *a;
33 const bfd_arch_info_type *b;
35 if (a->arch != b->arch || a->mach != b->mach)
41 #define SH_NEXT &arch_info_struct[0]
42 #define SH2_NEXT &arch_info_struct[1]
43 #define SH2E_NEXT &arch_info_struct[2]
44 #define SH_DSP_NEXT &arch_info_struct[3]
45 #define SH3_NEXT &arch_info_struct[4]
46 #define SH3_DSP_NEXT &arch_info_struct[5]
47 #define SH3E_NEXT &arch_info_struct[6]
48 #define SH4_NEXT &arch_info_struct[7]
49 #define SH64_NEXT NULL
51 static const bfd_arch_info_type arch_info_struct[] =
54 32, /* 32 bits in a word */
55 32, /* 32 bits in an address */
56 8, /* 8 bits in a byte */
60 "sh2", /* printable name */
62 FALSE, /* not the default */
63 bfd_default_compatible,
68 32, /* 32 bits in a word */
69 32, /* 32 bits in an address */
70 8, /* 8 bits in a byte */
74 "sh2e", /* printable name */
76 FALSE, /* not the default */
77 bfd_default_compatible,
82 32, /* 32 bits in a word */
83 32, /* 32 bits in an address */
84 8, /* 8 bits in a byte */
88 "sh-dsp", /* printable name */
90 FALSE, /* not the default */
91 bfd_default_compatible,
96 32, /* 32 bits in a word */
97 32, /* 32 bits in an address */
98 8, /* 8 bits in a byte */
101 "sh", /* arch_name */
102 "sh3", /* printable name */
104 FALSE, /* not the default */
105 bfd_default_compatible,
110 32, /* 32 bits in a word */
111 32, /* 32 bits in an address */
112 8, /* 8 bits in a byte */
115 "sh", /* arch_name */
116 "sh3-dsp", /* printable name */
118 FALSE, /* not the default */
119 bfd_default_compatible,
124 32, /* 32 bits in a word */
125 32, /* 32 bits in an address */
126 8, /* 8 bits in a byte */
129 "sh", /* arch_name */
130 "sh3e", /* printable name */
132 FALSE, /* not the default */
133 bfd_default_compatible,
138 32, /* 32 bits in a word */
139 32, /* 32 bits in an address */
140 8, /* 8 bits in a byte */
143 "sh", /* arch_name */
144 "sh4", /* printable name */
146 FALSE, /* not the default */
147 bfd_default_compatible,
152 64, /* 64 bits in a word */
153 64, /* 64 bits in an address */
154 8, /* 8 bits in a byte */
157 "sh", /* arch_name */
158 "sh5", /* printable name */
160 FALSE, /* not the default */
161 bfd_default_compatible,
167 const bfd_arch_info_type bfd_sh_arch =
169 32, /* 32 bits in a word */
170 32, /* 32 bits in an address */
171 8, /* 8 bits in a byte */
174 "sh", /* arch_name */
175 "sh", /* printable name */
177 TRUE, /* the default machine */
178 bfd_default_compatible,