xref: /netbsd/external/gpl3/gdb/dist/bfd/cpu-sparc.c (revision 377e23a2)
1*377e23a2Schristos /* BFD support for the SPARC architecture.
2*377e23a2Schristos    Copyright 1992, 1995, 1996, 1998, 2000, 2002, 2005, 2007
3*377e23a2Schristos    Free Software Foundation, Inc.
4*377e23a2Schristos 
5*377e23a2Schristos    This file is part of BFD, the Binary File Descriptor library.
6*377e23a2Schristos 
7*377e23a2Schristos    This program is free software; you can redistribute it and/or modify
8*377e23a2Schristos    it under the terms of the GNU General Public License as published by
9*377e23a2Schristos    the Free Software Foundation; either version 3 of the License, or
10*377e23a2Schristos    (at your option) any later version.
11*377e23a2Schristos 
12*377e23a2Schristos    This program is distributed in the hope that it will be useful,
13*377e23a2Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*377e23a2Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*377e23a2Schristos    GNU General Public License for more details.
16*377e23a2Schristos 
17*377e23a2Schristos    You should have received a copy of the GNU General Public License
18*377e23a2Schristos    along with this program; if not, write to the Free Software
19*377e23a2Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20*377e23a2Schristos    MA 02110-1301, USA.  */
21*377e23a2Schristos 
22*377e23a2Schristos #include "sysdep.h"
23*377e23a2Schristos #include "bfd.h"
24*377e23a2Schristos #include "libbfd.h"
25*377e23a2Schristos 
26*377e23a2Schristos static const bfd_arch_info_type arch_info_struct[] =
27*377e23a2Schristos {
28*377e23a2Schristos   {
29*377e23a2Schristos     32,	/* bits in a word */
30*377e23a2Schristos     32,	/* bits in an address */
31*377e23a2Schristos     8,	/* bits in a byte */
32*377e23a2Schristos     bfd_arch_sparc,
33*377e23a2Schristos     bfd_mach_sparc_sparclet,
34*377e23a2Schristos     "sparc",
35*377e23a2Schristos     "sparc:sparclet",
36*377e23a2Schristos     3,
37*377e23a2Schristos     FALSE,
38*377e23a2Schristos     bfd_default_compatible,
39*377e23a2Schristos     bfd_default_scan,
40*377e23a2Schristos     &arch_info_struct[1],
41*377e23a2Schristos   },
42*377e23a2Schristos   {
43*377e23a2Schristos     32,	/* bits in a word */
44*377e23a2Schristos     32,	/* bits in an address */
45*377e23a2Schristos     8,	/* bits in a byte */
46*377e23a2Schristos     bfd_arch_sparc,
47*377e23a2Schristos     bfd_mach_sparc_sparclite,
48*377e23a2Schristos     "sparc",
49*377e23a2Schristos     "sparc:sparclite",
50*377e23a2Schristos     3,
51*377e23a2Schristos     FALSE,
52*377e23a2Schristos     bfd_default_compatible,
53*377e23a2Schristos     bfd_default_scan,
54*377e23a2Schristos     &arch_info_struct[2],
55*377e23a2Schristos   },
56*377e23a2Schristos   {
57*377e23a2Schristos     32,	/* bits in a word */
58*377e23a2Schristos     32,	/* bits in an address */
59*377e23a2Schristos     8,	/* bits in a byte */
60*377e23a2Schristos     bfd_arch_sparc,
61*377e23a2Schristos     bfd_mach_sparc_v8plus,
62*377e23a2Schristos     "sparc",
63*377e23a2Schristos     "sparc:v8plus",
64*377e23a2Schristos     3,
65*377e23a2Schristos     FALSE,
66*377e23a2Schristos     bfd_default_compatible,
67*377e23a2Schristos     bfd_default_scan,
68*377e23a2Schristos     &arch_info_struct[3],
69*377e23a2Schristos   },
70*377e23a2Schristos   {
71*377e23a2Schristos     32,	/* bits in a word */
72*377e23a2Schristos     32,	/* bits in an address */
73*377e23a2Schristos     8,	/* bits in a byte */
74*377e23a2Schristos     bfd_arch_sparc,
75*377e23a2Schristos     bfd_mach_sparc_v8plusa,
76*377e23a2Schristos     "sparc",
77*377e23a2Schristos     "sparc:v8plusa",
78*377e23a2Schristos     3,
79*377e23a2Schristos     FALSE,
80*377e23a2Schristos     bfd_default_compatible,
81*377e23a2Schristos     bfd_default_scan,
82*377e23a2Schristos     &arch_info_struct[4],
83*377e23a2Schristos   },
84*377e23a2Schristos   {
85*377e23a2Schristos     32,	/* bits in a word */
86*377e23a2Schristos     32,	/* bits in an address */
87*377e23a2Schristos     8,	/* bits in a byte */
88*377e23a2Schristos     bfd_arch_sparc,
89*377e23a2Schristos     bfd_mach_sparc_sparclite_le,
90*377e23a2Schristos     "sparc",
91*377e23a2Schristos     "sparc:sparclite_le",
92*377e23a2Schristos     3,
93*377e23a2Schristos     FALSE,
94*377e23a2Schristos     bfd_default_compatible,
95*377e23a2Schristos     bfd_default_scan,
96*377e23a2Schristos     &arch_info_struct[5],
97*377e23a2Schristos   },
98*377e23a2Schristos   {
99*377e23a2Schristos     64,	/* bits in a word */
100*377e23a2Schristos     64,	/* bits in an address */
101*377e23a2Schristos     8,	/* bits in a byte */
102*377e23a2Schristos     bfd_arch_sparc,
103*377e23a2Schristos     bfd_mach_sparc_v9,
104*377e23a2Schristos     "sparc",
105*377e23a2Schristos     "sparc:v9",
106*377e23a2Schristos     3,
107*377e23a2Schristos     FALSE,
108*377e23a2Schristos     bfd_default_compatible,
109*377e23a2Schristos     bfd_default_scan,
110*377e23a2Schristos     &arch_info_struct[6],
111*377e23a2Schristos   },
112*377e23a2Schristos   {
113*377e23a2Schristos     64,	/* bits in a word */
114*377e23a2Schristos     64,	/* bits in an address */
115*377e23a2Schristos     8,	/* bits in a byte */
116*377e23a2Schristos     bfd_arch_sparc,
117*377e23a2Schristos     bfd_mach_sparc_v9a,
118*377e23a2Schristos     "sparc",
119*377e23a2Schristos     "sparc:v9a",
120*377e23a2Schristos     3,
121*377e23a2Schristos     FALSE,
122*377e23a2Schristos     bfd_default_compatible,
123*377e23a2Schristos     bfd_default_scan,
124*377e23a2Schristos     &arch_info_struct[7],
125*377e23a2Schristos   },
126*377e23a2Schristos   {
127*377e23a2Schristos     32,	/* bits in a word */
128*377e23a2Schristos     32,	/* bits in an address */
129*377e23a2Schristos     8,	/* bits in a byte */
130*377e23a2Schristos     bfd_arch_sparc,
131*377e23a2Schristos     bfd_mach_sparc_v8plusb,
132*377e23a2Schristos     "sparc",
133*377e23a2Schristos     "sparc:v8plusb",
134*377e23a2Schristos     3,
135*377e23a2Schristos     FALSE,
136*377e23a2Schristos     bfd_default_compatible,
137*377e23a2Schristos     bfd_default_scan,
138*377e23a2Schristos     &arch_info_struct[8],
139*377e23a2Schristos   },
140*377e23a2Schristos   {
141*377e23a2Schristos     64,	/* bits in a word */
142*377e23a2Schristos     64,	/* bits in an address */
143*377e23a2Schristos     8,	/* bits in a byte */
144*377e23a2Schristos     bfd_arch_sparc,
145*377e23a2Schristos     bfd_mach_sparc_v9b,
146*377e23a2Schristos     "sparc",
147*377e23a2Schristos     "sparc:v9b",
148*377e23a2Schristos     3,
149*377e23a2Schristos     FALSE,
150*377e23a2Schristos     bfd_default_compatible,
151*377e23a2Schristos     bfd_default_scan,
152*377e23a2Schristos     0,
153*377e23a2Schristos   }
154*377e23a2Schristos };
155*377e23a2Schristos 
156*377e23a2Schristos const bfd_arch_info_type bfd_sparc_arch =
157*377e23a2Schristos   {
158*377e23a2Schristos     32,	/* bits in a word */
159*377e23a2Schristos     32,	/* bits in an address */
160*377e23a2Schristos     8,	/* bits in a byte */
161*377e23a2Schristos     bfd_arch_sparc,
162*377e23a2Schristos     bfd_mach_sparc,
163*377e23a2Schristos     "sparc",
164*377e23a2Schristos     "sparc",
165*377e23a2Schristos     3,
166*377e23a2Schristos     TRUE, /* the default */
167*377e23a2Schristos     bfd_default_compatible,
168*377e23a2Schristos     bfd_default_scan,
169*377e23a2Schristos     &arch_info_struct[0],
170*377e23a2Schristos   };
171