1 /* BFD library support routines for the Hitachi-SH architecture.
2 Copyright 1993, 1994, 1997, 1998, 2000, 2001
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 SH_DSP_NEXT &arch_info_struct[2]
44 #define SH3_NEXT &arch_info_struct[3]
45 #define SH3_DSP_NEXT &arch_info_struct[4]
46 #define SH3E_NEXT &arch_info_struct[5]
49 #define SH4_NEXT &arch_info_struct[6]
50 #define SH64_NEXT NULL
52 static const bfd_arch_info_type arch_info_struct
[] =
55 32, /* 32 bits in a word */
56 32, /* 32 bits in an address */
57 8, /* 8 bits in a byte */
61 "sh2", /* printable name */
63 false, /* not the default */
64 bfd_default_compatible
,
69 32, /* 32 bits in a word */
70 32, /* 32 bits in an address */
71 8, /* 8 bits in a byte */
75 "sh-dsp", /* printable name */
77 false, /* not the default */
78 bfd_default_compatible
,
83 32, /* 32 bits in a word */
84 32, /* 32 bits in an address */
85 8, /* 8 bits in a byte */
89 "sh3", /* printable name */
91 false, /* not the default */
92 bfd_default_compatible
,
97 32, /* 32 bits in a word */
98 32, /* 32 bits in an address */
99 8, /* 8 bits in a byte */
102 "sh", /* arch_name */
103 "sh3-dsp", /* printable name */
105 false, /* not the default */
106 bfd_default_compatible
,
111 32, /* 32 bits in a word */
112 32, /* 32 bits in an address */
113 8, /* 8 bits in a byte */
116 "sh", /* arch_name */
117 "sh3e", /* printable name */
119 false, /* not the default */
120 bfd_default_compatible
,
125 32, /* 32 bits in a word */
126 32, /* 32 bits in an address */
127 8, /* 8 bits in a byte */
130 "sh", /* arch_name */
131 "sh4", /* printable name */
133 false, /* not the default */
134 bfd_default_compatible
,
139 64, /* 64 bits in a word */
140 64, /* 64 bits in an address */
141 8, /* 8 bits in a byte */
144 "sh", /* arch_name */
145 "sh5", /* printable name */
147 false, /* not the default */
148 bfd_default_compatible
,
154 const bfd_arch_info_type bfd_sh_arch
=
156 32, /* 32 bits in a word */
157 32, /* 32 bits in an address */
158 8, /* 8 bits in a byte */
161 "sh", /* arch_name */
162 "sh", /* printable name */
164 true, /* the default machine */
165 bfd_default_compatible
,