daily update
[deliverable/binutils-gdb.git] / bfd / cpu-sh.c
CommitLineData
252b5132 1/* BFD library support routines for the Hitachi-SH architecture.
dc810e39
AM
2 Copyright 1993, 1994, 1997, 1998, 2000, 2001
3 Free Software Foundation, Inc.
252b5132
RH
4 Hacked by Steve Chamberlain of Cygnus Support.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, 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
252b5132
RH
26#if 0
27/* This routine is provided two arch_infos and returns whether
28 they'd be compatible */
29
30static const bfd_arch_info_type *
31compatible (a,b)
32 const bfd_arch_info_type *a;
33 const bfd_arch_info_type *b;
34{
35 if (a->arch != b->arch || a->mach != b->mach)
36 return NULL;
37 return a;
38}
39#endif
40
38b1a46c
NC
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]
d4845d57 45#define SH3_DSP_NEXT &arch_info_struct[4]
38b1a46c
NC
46#define SH3E_NEXT &arch_info_struct[5]
47#define SH4_NEXT NULL
fbca6ad9
AO
48#undef SH4_NEXT
49#define SH4_NEXT &arch_info_struct[6]
50#define SH64_NEXT NULL
252b5132 51
71f6b586 52static const bfd_arch_info_type arch_info_struct[] =
252b5132 53{
d4845d57
JR
54 {
55 32, /* 32 bits in a word */
56 32, /* 32 bits in an address */
57 8, /* 8 bits in a byte */
58 bfd_arch_sh,
59 bfd_mach_sh2,
60 "sh", /* arch_name */
61 "sh2", /* printable name */
62 1,
63 false, /* not the default */
64 bfd_default_compatible,
a44d7f9c 65 bfd_default_scan,
d4845d57
JR
66 SH2_NEXT
67 },
68 {
69 32, /* 32 bits in a word */
70 32, /* 32 bits in an address */
71 8, /* 8 bits in a byte */
72 bfd_arch_sh,
73 bfd_mach_sh_dsp,
74 "sh", /* arch_name */
75 "sh-dsp", /* printable name */
76 1,
77 false, /* not the default */
78 bfd_default_compatible,
a44d7f9c 79 bfd_default_scan,
d4845d57
JR
80 SH_DSP_NEXT
81 },
252b5132
RH
82 {
83 32, /* 32 bits in a word */
84 32, /* 32 bits in an address */
85 8, /* 8 bits in a byte */
86 bfd_arch_sh,
87 bfd_mach_sh3,
88 "sh", /* arch_name */
89 "sh3", /* printable name */
90 1,
91 false, /* not the default */
92 bfd_default_compatible,
a44d7f9c 93 bfd_default_scan,
252b5132
RH
94 SH3_NEXT
95 },
d4845d57
JR
96 {
97 32, /* 32 bits in a word */
98 32, /* 32 bits in an address */
99 8, /* 8 bits in a byte */
100 bfd_arch_sh,
101 bfd_mach_sh3_dsp,
102 "sh", /* arch_name */
103 "sh3-dsp", /* printable name */
104 1,
105 false, /* not the default */
106 bfd_default_compatible,
a44d7f9c 107 bfd_default_scan,
d4845d57
JR
108 SH3_DSP_NEXT
109 },
252b5132
RH
110 {
111 32, /* 32 bits in a word */
112 32, /* 32 bits in an address */
113 8, /* 8 bits in a byte */
114 bfd_arch_sh,
115 bfd_mach_sh3e,
116 "sh", /* arch_name */
117 "sh3e", /* printable name */
118 1,
119 false, /* not the default */
120 bfd_default_compatible,
a44d7f9c 121 bfd_default_scan,
252b5132
RH
122 SH3E_NEXT
123 },
d4845d57
JR
124 {
125 32, /* 32 bits in a word */
126 32, /* 32 bits in an address */
127 8, /* 8 bits in a byte */
128 bfd_arch_sh,
129 bfd_mach_sh4,
130 "sh", /* arch_name */
131 "sh4", /* printable name */
132 1,
133 false, /* not the default */
134 bfd_default_compatible,
a44d7f9c 135 bfd_default_scan,
d4845d57
JR
136 SH4_NEXT
137 },
fbca6ad9
AO
138 {
139 64, /* 64 bits in a word */
140 64, /* 64 bits in an address */
141 8, /* 8 bits in a byte */
142 bfd_arch_sh,
143 bfd_mach_sh5,
144 "sh", /* arch_name */
145 "sh5", /* printable name */
146 1,
147 false, /* not the default */
148 bfd_default_compatible,
a44d7f9c 149 bfd_default_scan,
fbca6ad9
AO
150 SH64_NEXT
151 },
252b5132
RH
152};
153
154const bfd_arch_info_type bfd_sh_arch =
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_sh,
161 "sh", /* arch_name */
162 "sh", /* printable name */
163 1,
164 true, /* the default machine */
165 bfd_default_compatible,
a44d7f9c 166 bfd_default_scan,
252b5132
RH
167 SH_NEXT
168};
This page took 0.154781 seconds and 4 git commands to generate.