* gas/s390/reloc.s: Add test for PLT reloc against locally defined
[deliverable/binutils-gdb.git] / bfd / cpu-sh.c
CommitLineData
252b5132 1/* BFD library support routines for the Hitachi-SH architecture.
b34976b6 2 Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002
dc810e39 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,
b34976b6 63 FALSE, /* not the default */
d4845d57 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,
b34976b6 77 FALSE, /* not the default */
d4845d57 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,
b34976b6 91 FALSE, /* not the default */
252b5132 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,
b34976b6 105 FALSE, /* not the default */
d4845d57 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,
b34976b6 119 FALSE, /* not the default */
252b5132 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,
b34976b6 133 FALSE, /* not the default */
d4845d57 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,
b34976b6 147 FALSE, /* not the default */
fbca6ad9 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,
b34976b6 164 TRUE, /* the default machine */
252b5132 165 bfd_default_compatible,
a44d7f9c 166 bfd_default_scan,
252b5132
RH
167 SH_NEXT
168};
This page took 0.167205 seconds and 4 git commands to generate.