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