2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
[deliverable/binutils-gdb.git] / bfd / cpu-sh.c
CommitLineData
ef230218 1/* BFD library support routines for the Renesas / SuperH SH architecture.
ae51a426 2 Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004
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]
ae51a426
JR
37#define SH4_NOMMU_NOFPU_NEXT &arch_info_struct[11]
38#define SH4A_NOFPU_NEXT &arch_info_struct[12]
fbca6ad9 39#define SH64_NEXT NULL
252b5132 40
71f6b586 41static const bfd_arch_info_type arch_info_struct[] =
252b5132 42{
d4845d57
JR
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,
b34976b6 52 FALSE, /* not the default */
d4845d57 53 bfd_default_compatible,
a44d7f9c 54 bfd_default_scan,
d4845d57
JR
55 SH2_NEXT
56 },
5177500f
NC
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 },
d4845d57
JR
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,
b34976b6 80 FALSE, /* not the default */
d4845d57 81 bfd_default_compatible,
a44d7f9c 82 bfd_default_scan,
d4845d57
JR
83 SH_DSP_NEXT
84 },
252b5132
RH
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,
b34976b6 94 FALSE, /* not the default */
252b5132 95 bfd_default_compatible,
a44d7f9c 96 bfd_default_scan,
252b5132
RH
97 SH3_NEXT
98 },
d4845d57
JR
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,
b34976b6 108 FALSE, /* not the default */
d4845d57 109 bfd_default_compatible,
a44d7f9c 110 bfd_default_scan,
d4845d57
JR
111 SH3_DSP_NEXT
112 },
252b5132
RH
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,
b34976b6 122 FALSE, /* not the default */
252b5132 123 bfd_default_compatible,
a44d7f9c 124 bfd_default_scan,
252b5132
RH
125 SH3E_NEXT
126 },
d4845d57
JR
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,
b34976b6 136 FALSE, /* not the default */
d4845d57 137 bfd_default_compatible,
a44d7f9c 138 bfd_default_scan,
d4845d57
JR
139 SH4_NEXT
140 },
af9ba621
CV
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 },
ae51a426
JR
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 },
af9ba621
CV
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 },
fbca6ad9
AO
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,
b34976b6 220 FALSE, /* not the default */
fbca6ad9 221 bfd_default_compatible,
a44d7f9c 222 bfd_default_scan,
fbca6ad9
AO
223 SH64_NEXT
224 },
252b5132
RH
225};
226
227const 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,
b34976b6 237 TRUE, /* the default machine */
252b5132 238 bfd_default_compatible,
a44d7f9c 239 bfd_default_scan,
252b5132
RH
240 SH_NEXT
241};
This page took 0.220623 seconds and 4 git commands to generate.