* Makefile.am (elf32-h8300.lo): New target.
[binutils.git] / bfd / cpu-sparc.c
blobdbc83bad534a5113670c506b748eda1bba479f32
1 /* BFD support for the SPARC architecture.
2 Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 #include "bfd.h"
21 #include "sysdep.h"
22 #include "libbfd.h"
24 /* Don't mix 32 bit and 64 bit files. */
26 static const bfd_arch_info_type *sparc_compatible
27 PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
29 static const bfd_arch_info_type *
30 sparc_compatible (a, b)
31 const bfd_arch_info_type *a;
32 const bfd_arch_info_type *b;
34 if (a->bits_per_word != b->bits_per_word)
35 return NULL;
37 return bfd_default_compatible (a, b);
40 static const bfd_arch_info_type arch_info_struct[] =
43 32, /* bits in a word */
44 32, /* bits in an address */
45 8, /* bits in a byte */
46 bfd_arch_sparc,
47 bfd_mach_sparc_sparclet,
48 "sparc",
49 "sparc:sparclet",
51 false,
52 sparc_compatible,
53 bfd_default_scan,
54 &arch_info_struct[1],
57 32, /* bits in a word */
58 32, /* bits in an address */
59 8, /* bits in a byte */
60 bfd_arch_sparc,
61 bfd_mach_sparc_sparclite,
62 "sparc",
63 "sparc:sparclite",
65 false,
66 sparc_compatible,
67 bfd_default_scan,
68 &arch_info_struct[2],
71 32, /* bits in a word */
72 32, /* bits in an address */
73 8, /* bits in a byte */
74 bfd_arch_sparc,
75 bfd_mach_sparc_v8plus,
76 "sparc",
77 "sparc:v8plus",
79 false,
80 sparc_compatible,
81 bfd_default_scan,
82 &arch_info_struct[3],
85 32, /* bits in a word */
86 32, /* bits in an address */
87 8, /* bits in a byte */
88 bfd_arch_sparc,
89 bfd_mach_sparc_v8plusa,
90 "sparc",
91 "sparc:v8plusa",
93 false,
94 sparc_compatible,
95 bfd_default_scan,
96 &arch_info_struct[4],
99 32, /* bits in a word */
100 32, /* bits in an address */
101 8, /* bits in a byte */
102 bfd_arch_sparc,
103 bfd_mach_sparc_sparclite_le,
104 "sparc",
105 "sparc:sparclite_le",
107 false,
108 sparc_compatible,
109 bfd_default_scan,
110 &arch_info_struct[5],
113 64, /* bits in a word */
114 64, /* bits in an address */
115 8, /* bits in a byte */
116 bfd_arch_sparc,
117 bfd_mach_sparc_v9,
118 "sparc",
119 "sparc:v9",
121 false,
122 sparc_compatible,
123 bfd_default_scan,
124 &arch_info_struct[6],
127 64, /* bits in a word */
128 64, /* bits in an address */
129 8, /* bits in a byte */
130 bfd_arch_sparc,
131 bfd_mach_sparc_v9a,
132 "sparc",
133 "sparc:v9a",
135 false,
136 sparc_compatible,
137 bfd_default_scan,
138 &arch_info_struct[7],
141 32, /* bits in a word */
142 32, /* bits in an address */
143 8, /* bits in a byte */
144 bfd_arch_sparc,
145 bfd_mach_sparc_v8plusb,
146 "sparc",
147 "sparc:v8plusb",
149 false,
150 sparc_compatible,
151 bfd_default_scan,
152 &arch_info_struct[8],
155 64, /* bits in a word */
156 64, /* bits in an address */
157 8, /* bits in a byte */
158 bfd_arch_sparc,
159 bfd_mach_sparc_v9b,
160 "sparc",
161 "sparc:v9b",
163 false,
164 sparc_compatible,
165 bfd_default_scan,
170 const bfd_arch_info_type bfd_sparc_arch =
172 32, /* bits in a word */
173 32, /* bits in an address */
174 8, /* bits in a byte */
175 bfd_arch_sparc,
176 bfd_mach_sparc,
177 "sparc",
178 "sparc",
180 true, /* the default */
181 sparc_compatible,
182 bfd_default_scan,
183 &arch_info_struct[0],