daily update
[binutils.git] / bfd / cpu-sh.c
blob2f33240bb07ba445fc2594d11a3103e054bf1e0d
1 /* BFD library support routines for the Renesas / SuperH 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. */
22 #include "bfd.h"
23 #include "sysdep.h"
24 #include "libbfd.h"
26 #define SH_NEXT &arch_info_struct[0]
27 #define SH2_NEXT &arch_info_struct[1]
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]
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]
38 #define SH64_NEXT NULL
40 static const bfd_arch_info_type arch_info_struct[] =
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 */
51 FALSE, /* not the default */
52 bfd_default_compatible,
53 bfd_default_scan,
54 SH2_NEXT
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 */
65 FALSE, /* not the default */
66 bfd_default_compatible,
67 bfd_default_scan,
68 SH2E_NEXT
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 */
79 FALSE, /* not the default */
80 bfd_default_compatible,
81 bfd_default_scan,
82 SH_DSP_NEXT
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 */
93 FALSE, /* not the default */
94 bfd_default_compatible,
95 bfd_default_scan,
96 SH3_NEXT
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 */
107 FALSE, /* not the default */
108 bfd_default_compatible,
109 bfd_default_scan,
110 SH3_DSP_NEXT
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 */
121 FALSE, /* not the default */
122 bfd_default_compatible,
123 bfd_default_scan,
124 SH3E_NEXT
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 */
135 FALSE, /* not the default */
136 bfd_default_compatible,
137 bfd_default_scan,
138 SH4_NEXT
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 */
149 FALSE, /* not the default */
150 bfd_default_compatible,
151 bfd_default_scan,
152 SH4A_NEXT
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 */
163 FALSE, /* not the default */
164 bfd_default_compatible,
165 bfd_default_scan,
166 SH4AL_DSP_NEXT
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 */
177 FALSE, /* not the default */
178 bfd_default_compatible,
179 bfd_default_scan,
180 SH4_NOFPU_NEXT
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 */
191 FALSE, /* not the default */
192 bfd_default_compatible,
193 bfd_default_scan,
194 SH4A_NOFPU_NEXT
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 */
205 FALSE, /* not the default */
206 bfd_default_compatible,
207 bfd_default_scan,
208 SH64_NEXT
212 const bfd_arch_info_type bfd_sh_arch =
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 */
222 TRUE, /* the default machine */
223 bfd_default_compatible,
224 bfd_default_scan,
225 SH_NEXT