Commit | Line | Data |
---|---|---|
ef230218 | 1 | /* BFD library support routines for the Renesas / SuperH SH architecture. |
5177500f | 2 | Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003 |
dc810e39 | 3 | Free Software Foundation, Inc. |
252b5132 RH |
4 | Hacked by Steve Chamberlain of Cygnus Support. |
5 | ||
5177500f | 6 | This file is part of BFD, the Binary File Descriptor library. |
252b5132 | 7 | |
5177500f NC |
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. | |
252b5132 | 12 | |
5177500f NC |
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. | |
252b5132 | 17 | |
5177500f NC |
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. */ | |
252b5132 RH |
21 | |
22 | #include "bfd.h" | |
23 | #include "sysdep.h" | |
24 | #include "libbfd.h" | |
25 | ||
38b1a46c NC |
26 | #define SH_NEXT &arch_info_struct[0] |
27 | #define SH2_NEXT &arch_info_struct[1] | |
5177500f NC |
28 | #define SH2E_NEXT &arch_info_struct[2] |
29 | #define SH_DSP_NEXT &arch_info_struct[3] | |
30 | #define SH3_NEXT &arch_info_struct[4] | |
31 | #define SH3_DSP_NEXT &arch_info_struct[5] | |
32 | #define SH3E_NEXT &arch_info_struct[6] | |
33 | #define SH4_NEXT &arch_info_struct[7] | |
af9ba621 CV |
34 | #define SH4A_NEXT &arch_info_struct[8] |
35 | #define SH4AL_DSP_NEXT &arch_info_struct[9] | |
36 | #define SH4_NOFPU_NEXT &arch_info_struct[10] | |
37 | #define SH4A_NOFPU_NEXT &arch_info_struct[11] | |
fbca6ad9 | 38 | #define SH64_NEXT NULL |
252b5132 | 39 | |
71f6b586 | 40 | static const bfd_arch_info_type arch_info_struct[] = |
252b5132 | 41 | { |
d4845d57 JR |
42 | { |
43 | 32, /* 32 bits in a word */ | |
44 | 32, /* 32 bits in an address */ | |
45 | 8, /* 8 bits in a byte */ | |
46 | bfd_arch_sh, | |
47 | bfd_mach_sh2, | |
48 | "sh", /* arch_name */ | |
49 | "sh2", /* printable name */ | |
50 | 1, | |
b34976b6 | 51 | FALSE, /* not the default */ |
d4845d57 | 52 | bfd_default_compatible, |
a44d7f9c | 53 | bfd_default_scan, |
d4845d57 JR |
54 | SH2_NEXT |
55 | }, | |
5177500f NC |
56 | { |
57 | 32, /* 32 bits in a word */ | |
58 | 32, /* 32 bits in an address */ | |
59 | 8, /* 8 bits in a byte */ | |
60 | bfd_arch_sh, | |
61 | bfd_mach_sh2e, | |
62 | "sh", /* arch_name */ | |
63 | "sh2e", /* printable name */ | |
64 | 1, | |
65 | FALSE, /* not the default */ | |
66 | bfd_default_compatible, | |
67 | bfd_default_scan, | |
68 | SH2E_NEXT | |
69 | }, | |
d4845d57 JR |
70 | { |
71 | 32, /* 32 bits in a word */ | |
72 | 32, /* 32 bits in an address */ | |
73 | 8, /* 8 bits in a byte */ | |
74 | bfd_arch_sh, | |
75 | bfd_mach_sh_dsp, | |
76 | "sh", /* arch_name */ | |
77 | "sh-dsp", /* printable name */ | |
78 | 1, | |
b34976b6 | 79 | FALSE, /* not the default */ |
d4845d57 | 80 | bfd_default_compatible, |
a44d7f9c | 81 | bfd_default_scan, |
d4845d57 JR |
82 | SH_DSP_NEXT |
83 | }, | |
252b5132 RH |
84 | { |
85 | 32, /* 32 bits in a word */ | |
86 | 32, /* 32 bits in an address */ | |
87 | 8, /* 8 bits in a byte */ | |
88 | bfd_arch_sh, | |
89 | bfd_mach_sh3, | |
90 | "sh", /* arch_name */ | |
91 | "sh3", /* printable name */ | |
92 | 1, | |
b34976b6 | 93 | FALSE, /* not the default */ |
252b5132 | 94 | bfd_default_compatible, |
a44d7f9c | 95 | bfd_default_scan, |
252b5132 RH |
96 | SH3_NEXT |
97 | }, | |
d4845d57 JR |
98 | { |
99 | 32, /* 32 bits in a word */ | |
100 | 32, /* 32 bits in an address */ | |
101 | 8, /* 8 bits in a byte */ | |
102 | bfd_arch_sh, | |
103 | bfd_mach_sh3_dsp, | |
104 | "sh", /* arch_name */ | |
105 | "sh3-dsp", /* printable name */ | |
106 | 1, | |
b34976b6 | 107 | FALSE, /* not the default */ |
d4845d57 | 108 | bfd_default_compatible, |
a44d7f9c | 109 | bfd_default_scan, |
d4845d57 JR |
110 | SH3_DSP_NEXT |
111 | }, | |
252b5132 RH |
112 | { |
113 | 32, /* 32 bits in a word */ | |
114 | 32, /* 32 bits in an address */ | |
115 | 8, /* 8 bits in a byte */ | |
116 | bfd_arch_sh, | |
117 | bfd_mach_sh3e, | |
118 | "sh", /* arch_name */ | |
119 | "sh3e", /* printable name */ | |
120 | 1, | |
b34976b6 | 121 | FALSE, /* not the default */ |
252b5132 | 122 | bfd_default_compatible, |
a44d7f9c | 123 | bfd_default_scan, |
252b5132 RH |
124 | SH3E_NEXT |
125 | }, | |
d4845d57 JR |
126 | { |
127 | 32, /* 32 bits in a word */ | |
128 | 32, /* 32 bits in an address */ | |
129 | 8, /* 8 bits in a byte */ | |
130 | bfd_arch_sh, | |
131 | bfd_mach_sh4, | |
132 | "sh", /* arch_name */ | |
133 | "sh4", /* printable name */ | |
134 | 1, | |
b34976b6 | 135 | FALSE, /* not the default */ |
d4845d57 | 136 | bfd_default_compatible, |
a44d7f9c | 137 | bfd_default_scan, |
d4845d57 JR |
138 | SH4_NEXT |
139 | }, | |
af9ba621 CV |
140 | { |
141 | 32, /* 32 bits in a word */ | |
142 | 32, /* 32 bits in an address */ | |
143 | 8, /* 8 bits in a byte */ | |
144 | bfd_arch_sh, | |
145 | bfd_mach_sh4a, | |
146 | "sh", /* arch_name */ | |
147 | "sh4a", /* printable name */ | |
148 | 1, | |
149 | FALSE, /* not the default */ | |
150 | bfd_default_compatible, | |
151 | bfd_default_scan, | |
152 | SH4A_NEXT | |
153 | }, | |
154 | { | |
155 | 32, /* 32 bits in a word */ | |
156 | 32, /* 32 bits in an address */ | |
157 | 8, /* 8 bits in a byte */ | |
158 | bfd_arch_sh, | |
159 | bfd_mach_sh4al_dsp, | |
160 | "sh", /* arch_name */ | |
161 | "sh4al-dsp", /* printable name */ | |
162 | 1, | |
163 | FALSE, /* not the default */ | |
164 | bfd_default_compatible, | |
165 | bfd_default_scan, | |
166 | SH4AL_DSP_NEXT | |
167 | }, | |
168 | { | |
169 | 32, /* 32 bits in a word */ | |
170 | 32, /* 32 bits in an address */ | |
171 | 8, /* 8 bits in a byte */ | |
172 | bfd_arch_sh, | |
173 | bfd_mach_sh4_nofpu, | |
174 | "sh", /* arch_name */ | |
175 | "sh4-nofpu", /* printable name */ | |
176 | 1, | |
177 | FALSE, /* not the default */ | |
178 | bfd_default_compatible, | |
179 | bfd_default_scan, | |
180 | SH4_NOFPU_NEXT | |
181 | }, | |
182 | { | |
183 | 32, /* 32 bits in a word */ | |
184 | 32, /* 32 bits in an address */ | |
185 | 8, /* 8 bits in a byte */ | |
186 | bfd_arch_sh, | |
187 | bfd_mach_sh4a_nofpu, | |
188 | "sh", /* arch_name */ | |
189 | "sh4a-nofpu", /* printable name */ | |
190 | 1, | |
191 | FALSE, /* not the default */ | |
192 | bfd_default_compatible, | |
193 | bfd_default_scan, | |
194 | SH4A_NOFPU_NEXT | |
195 | }, | |
fbca6ad9 AO |
196 | { |
197 | 64, /* 64 bits in a word */ | |
198 | 64, /* 64 bits in an address */ | |
199 | 8, /* 8 bits in a byte */ | |
200 | bfd_arch_sh, | |
201 | bfd_mach_sh5, | |
202 | "sh", /* arch_name */ | |
203 | "sh5", /* printable name */ | |
204 | 1, | |
b34976b6 | 205 | FALSE, /* not the default */ |
fbca6ad9 | 206 | bfd_default_compatible, |
a44d7f9c | 207 | bfd_default_scan, |
fbca6ad9 AO |
208 | SH64_NEXT |
209 | }, | |
252b5132 RH |
210 | }; |
211 | ||
212 | const bfd_arch_info_type bfd_sh_arch = | |
213 | { | |
214 | 32, /* 32 bits in a word */ | |
215 | 32, /* 32 bits in an address */ | |
216 | 8, /* 8 bits in a byte */ | |
217 | bfd_arch_sh, | |
218 | bfd_mach_sh, | |
219 | "sh", /* arch_name */ | |
220 | "sh", /* printable name */ | |
221 | 1, | |
b34976b6 | 222 | TRUE, /* the default machine */ |
252b5132 | 223 | bfd_default_compatible, |
a44d7f9c | 224 | bfd_default_scan, |
252b5132 RH |
225 | SH_NEXT |
226 | }; |