Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Side by Side Diff: bfd/cpu-sh.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/cpu-score.c ('k') | bfd/cpu-sparc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* BFD library support routines for the Renesas / SuperH SH architecture. 1 /* BFD library support routines for the Renesas / SuperH SH architecture.
2 Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2 Copyright 1993, 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
3 2007 Free Software Foundation, Inc. 3 2007 Free Software Foundation, Inc.
4 Hacked by Steve Chamberlain of Cygnus Support. 4 Hacked by Steve Chamberlain of Cygnus Support.
5 5
6 This file is part of BFD, the Binary File Descriptor library. 6 This file is part of BFD, the Binary File Descriptor library.
7 7
8 This program is free software; you can redistribute it and/or modify 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 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or 10 the Free Software Foundation; either version 3 of the License, or
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 32, /* 32 bits in an address. */ 54 32, /* 32 bits in an address. */
55 8, /* 8 bits in a byte. */ 55 8, /* 8 bits in a byte. */
56 bfd_arch_sh, 56 bfd_arch_sh,
57 bfd_mach_sh2, 57 bfd_mach_sh2,
58 "sh", /* Architecture name. */ 58 "sh", /* Architecture name. */
59 "sh2", /* Machine name. */ 59 "sh2", /* Machine name. */
60 1, 60 1,
61 FALSE, /* Not the default. */ 61 FALSE, /* Not the default. */
62 bfd_default_compatible, 62 bfd_default_compatible,
63 bfd_default_scan, 63 bfd_default_scan,
64 bfd_arch_default_fill,
64 SH2_NEXT 65 SH2_NEXT
65 }, 66 },
66 { 67 {
67 32, /* 32 bits in a word. */ 68 32, /* 32 bits in a word. */
68 32, /* 32 bits in an address. */ 69 32, /* 32 bits in an address. */
69 8, /* 8 bits in a byte. */ 70 8, /* 8 bits in a byte. */
70 bfd_arch_sh, 71 bfd_arch_sh,
71 bfd_mach_sh2e, 72 bfd_mach_sh2e,
72 "sh", /* Architecture name. */ 73 "sh", /* Architecture name. */
73 "sh2e", /* Machine name. */ 74 "sh2e", /* Machine name. */
74 1, 75 1,
75 FALSE, /* Not the default. */ 76 FALSE, /* Not the default. */
76 bfd_default_compatible, 77 bfd_default_compatible,
77 bfd_default_scan, 78 bfd_default_scan,
79 bfd_arch_default_fill,
78 SH2E_NEXT 80 SH2E_NEXT
79 }, 81 },
80 { 82 {
81 32, /* 32 bits in a word. */ 83 32, /* 32 bits in a word. */
82 32, /* 32 bits in an address. */ 84 32, /* 32 bits in an address. */
83 8, /* 8 bits in a byte. */ 85 8, /* 8 bits in a byte. */
84 bfd_arch_sh, 86 bfd_arch_sh,
85 bfd_mach_sh_dsp, 87 bfd_mach_sh_dsp,
86 "sh", /* Architecture name. */ 88 "sh", /* Architecture name. */
87 "sh-dsp", /* Machine name. */ 89 "sh-dsp", /* Machine name. */
88 1, 90 1,
89 FALSE, /* Not the default. */ 91 FALSE, /* Not the default. */
90 bfd_default_compatible, 92 bfd_default_compatible,
91 bfd_default_scan, 93 bfd_default_scan,
94 bfd_arch_default_fill,
92 SH_DSP_NEXT 95 SH_DSP_NEXT
93 }, 96 },
94 { 97 {
95 32, /* 32 bits in a word. */ 98 32, /* 32 bits in a word. */
96 32, /* 32 bits in an address. */ 99 32, /* 32 bits in an address. */
97 8, /* 8 bits in a byte. */ 100 8, /* 8 bits in a byte. */
98 bfd_arch_sh, 101 bfd_arch_sh,
99 bfd_mach_sh3, 102 bfd_mach_sh3,
100 "sh", /* Architecture name. */ 103 "sh", /* Architecture name. */
101 "sh3", /* Machine name. */ 104 "sh3", /* Machine name. */
102 1, 105 1,
103 FALSE, /* Not the default. */ 106 FALSE, /* Not the default. */
104 bfd_default_compatible, 107 bfd_default_compatible,
105 bfd_default_scan, 108 bfd_default_scan,
109 bfd_arch_default_fill,
106 SH3_NEXT 110 SH3_NEXT
107 }, 111 },
108 { 112 {
109 32, /* 32 bits in a word. */ 113 32, /* 32 bits in a word. */
110 32, /* 32 bits in an address. */ 114 32, /* 32 bits in an address. */
111 8, /* 8 bits in a byte. */ 115 8, /* 8 bits in a byte. */
112 bfd_arch_sh, 116 bfd_arch_sh,
113 bfd_mach_sh3_nommu, 117 bfd_mach_sh3_nommu,
114 "sh", /* Architecture name. */ 118 "sh", /* Architecture name. */
115 "sh3-nommu", /* Machine name. */ 119 "sh3-nommu", /* Machine name. */
116 1, 120 1,
117 FALSE, /* Not the default. */ 121 FALSE, /* Not the default. */
118 bfd_default_compatible, 122 bfd_default_compatible,
119 bfd_default_scan, 123 bfd_default_scan,
124 bfd_arch_default_fill,
120 SH3_NOMMU_NEXT 125 SH3_NOMMU_NEXT
121 }, 126 },
122 { 127 {
123 32, /* 32 bits in a word. */ 128 32, /* 32 bits in a word. */
124 32, /* 32 bits in an address. */ 129 32, /* 32 bits in an address. */
125 8, /* 8 bits in a byte. */ 130 8, /* 8 bits in a byte. */
126 bfd_arch_sh, 131 bfd_arch_sh,
127 bfd_mach_sh3_dsp, 132 bfd_mach_sh3_dsp,
128 "sh", /* Architecture name. */ 133 "sh", /* Architecture name. */
129 "sh3-dsp", /* Machine name. */ 134 "sh3-dsp", /* Machine name. */
130 1, 135 1,
131 FALSE, /* Not the default. */ 136 FALSE, /* Not the default. */
132 bfd_default_compatible, 137 bfd_default_compatible,
133 bfd_default_scan, 138 bfd_default_scan,
139 bfd_arch_default_fill,
134 SH3_DSP_NEXT 140 SH3_DSP_NEXT
135 }, 141 },
136 { 142 {
137 32, /* 32 bits in a word. */ 143 32, /* 32 bits in a word. */
138 32, /* 32 bits in an address. */ 144 32, /* 32 bits in an address. */
139 8, /* 8 bits in a byte. */ 145 8, /* 8 bits in a byte. */
140 bfd_arch_sh, 146 bfd_arch_sh,
141 bfd_mach_sh3e, 147 bfd_mach_sh3e,
142 "sh", /* Architecture name. */ 148 "sh", /* Architecture name. */
143 "sh3e", /* Machine name. */ 149 "sh3e", /* Machine name. */
144 1, 150 1,
145 FALSE, /* Not the default. */ 151 FALSE, /* Not the default. */
146 bfd_default_compatible, 152 bfd_default_compatible,
147 bfd_default_scan, 153 bfd_default_scan,
154 bfd_arch_default_fill,
148 SH3E_NEXT 155 SH3E_NEXT
149 }, 156 },
150 { 157 {
151 32, /* 32 bits in a word. */ 158 32, /* 32 bits in a word. */
152 32, /* 32 bits in an address. */ 159 32, /* 32 bits in an address. */
153 8, /* 8 bits in a byte. */ 160 8, /* 8 bits in a byte. */
154 bfd_arch_sh, 161 bfd_arch_sh,
155 bfd_mach_sh4, 162 bfd_mach_sh4,
156 "sh", /* Architecture name. */ 163 "sh", /* Architecture name. */
157 "sh4", /* Machine name. */ 164 "sh4", /* Machine name. */
158 1, 165 1,
159 FALSE, /* Not the default. */ 166 FALSE, /* Not the default. */
160 bfd_default_compatible, 167 bfd_default_compatible,
161 bfd_default_scan, 168 bfd_default_scan,
169 bfd_arch_default_fill,
162 SH4_NEXT 170 SH4_NEXT
163 }, 171 },
164 { 172 {
165 32, /* 32 bits in a word. */ 173 32, /* 32 bits in a word. */
166 32, /* 32 bits in an address. */ 174 32, /* 32 bits in an address. */
167 8, /* 8 bits in a byte. */ 175 8, /* 8 bits in a byte. */
168 bfd_arch_sh, 176 bfd_arch_sh,
169 bfd_mach_sh4a, 177 bfd_mach_sh4a,
170 "sh", /* Architecture name. */ 178 "sh", /* Architecture name. */
171 "sh4a", /* Machine name. */ 179 "sh4a", /* Machine name. */
172 1, 180 1,
173 FALSE, /* Not the default. */ 181 FALSE, /* Not the default. */
174 bfd_default_compatible, 182 bfd_default_compatible,
175 bfd_default_scan, 183 bfd_default_scan,
184 bfd_arch_default_fill,
176 SH4A_NEXT 185 SH4A_NEXT
177 }, 186 },
178 { 187 {
179 32, /* 32 bits in a word. */ 188 32, /* 32 bits in a word. */
180 32, /* 32 bits in an address. */ 189 32, /* 32 bits in an address. */
181 8, /* 8 bits in a byte. */ 190 8, /* 8 bits in a byte. */
182 bfd_arch_sh, 191 bfd_arch_sh,
183 bfd_mach_sh4al_dsp, 192 bfd_mach_sh4al_dsp,
184 "sh", /* Architecture name. */ 193 "sh", /* Architecture name. */
185 "sh4al-dsp", /* Machine name. */ 194 "sh4al-dsp", /* Machine name. */
186 1, 195 1,
187 FALSE, /* Not the default. */ 196 FALSE, /* Not the default. */
188 bfd_default_compatible, 197 bfd_default_compatible,
189 bfd_default_scan, 198 bfd_default_scan,
199 bfd_arch_default_fill,
190 SH4AL_DSP_NEXT 200 SH4AL_DSP_NEXT
191 }, 201 },
192 { 202 {
193 32, /* 32 bits in a word. */ 203 32, /* 32 bits in a word. */
194 32, /* 32 bits in an address. */ 204 32, /* 32 bits in an address. */
195 8, /* 8 bits in a byte. */ 205 8, /* 8 bits in a byte. */
196 bfd_arch_sh, 206 bfd_arch_sh,
197 bfd_mach_sh4_nofpu, 207 bfd_mach_sh4_nofpu,
198 "sh", /* Architecture name. */ 208 "sh", /* Architecture name. */
199 "sh4-nofpu", /* Machine name. */ 209 "sh4-nofpu", /* Machine name. */
200 1, 210 1,
201 FALSE, /* Not the default. */ 211 FALSE, /* Not the default. */
202 bfd_default_compatible, 212 bfd_default_compatible,
203 bfd_default_scan, 213 bfd_default_scan,
214 bfd_arch_default_fill,
204 SH4_NOFPU_NEXT 215 SH4_NOFPU_NEXT
205 }, 216 },
206 { 217 {
207 32, /* 32 bits in a word. */ 218 32, /* 32 bits in a word. */
208 32, /* 32 bits in an address. */ 219 32, /* 32 bits in an address. */
209 8, /* 8 bits in a byte. */ 220 8, /* 8 bits in a byte. */
210 bfd_arch_sh, 221 bfd_arch_sh,
211 bfd_mach_sh4_nommu_nofpu, 222 bfd_mach_sh4_nommu_nofpu,
212 "sh", /* Architecture name. */ 223 "sh", /* Architecture name. */
213 "sh4-nommu-nofpu", /* Machine name. */ 224 "sh4-nommu-nofpu", /* Machine name. */
214 1, 225 1,
215 FALSE, /* Not the default. */ 226 FALSE, /* Not the default. */
216 bfd_default_compatible, 227 bfd_default_compatible,
217 bfd_default_scan, 228 bfd_default_scan,
229 bfd_arch_default_fill,
218 SH4_NOMMU_NOFPU_NEXT 230 SH4_NOMMU_NOFPU_NEXT
219 }, 231 },
220 { 232 {
221 32, /* 32 bits in a word. */ 233 32, /* 32 bits in a word. */
222 32, /* 32 bits in an address. */ 234 32, /* 32 bits in an address. */
223 8, /* 8 bits in a byte. */ 235 8, /* 8 bits in a byte. */
224 bfd_arch_sh, 236 bfd_arch_sh,
225 bfd_mach_sh4a_nofpu, 237 bfd_mach_sh4a_nofpu,
226 "sh", /* Architecture name. */ 238 "sh", /* Architecture name. */
227 "sh4a-nofpu", /* Machine name. */ 239 "sh4a-nofpu", /* Machine name. */
228 1, 240 1,
229 FALSE, /* Not the default. */ 241 FALSE, /* Not the default. */
230 bfd_default_compatible, 242 bfd_default_compatible,
231 bfd_default_scan, 243 bfd_default_scan,
244 bfd_arch_default_fill,
232 SH4A_NOFPU_NEXT 245 SH4A_NOFPU_NEXT
233 }, 246 },
234 { 247 {
235 32, /* 32 bits in a word. */ 248 32, /* 32 bits in a word. */
236 32, /* 32 bits in an address. */ 249 32, /* 32 bits in an address. */
237 8, /* 8 bits in a byte. */ 250 8, /* 8 bits in a byte. */
238 bfd_arch_sh, 251 bfd_arch_sh,
239 bfd_mach_sh2a, 252 bfd_mach_sh2a,
240 "sh", /* Architecture name. */ 253 "sh", /* Architecture name. */
241 "sh2a", /* Machine name. */ 254 "sh2a", /* Machine name. */
242 1, 255 1,
243 FALSE, /* Not the default. */ 256 FALSE, /* Not the default. */
244 bfd_default_compatible, 257 bfd_default_compatible,
245 bfd_default_scan, 258 bfd_default_scan,
259 bfd_arch_default_fill,
246 SH2A_NEXT 260 SH2A_NEXT
247 }, 261 },
248 { 262 {
249 32, /* 32 bits in a word. */ 263 32, /* 32 bits in a word. */
250 32, /* 32 bits in an address. */ 264 32, /* 32 bits in an address. */
251 8, /* 8 bits in a byte. */ 265 8, /* 8 bits in a byte. */
252 bfd_arch_sh, 266 bfd_arch_sh,
253 bfd_mach_sh2a_nofpu, 267 bfd_mach_sh2a_nofpu,
254 "sh", /* Architecture name. */ 268 "sh", /* Architecture name. */
255 "sh2a-nofpu", /* Machine name. */ 269 "sh2a-nofpu", /* Machine name. */
256 1, 270 1,
257 FALSE, /* Not the default. */ 271 FALSE, /* Not the default. */
258 bfd_default_compatible, 272 bfd_default_compatible,
259 bfd_default_scan, 273 bfd_default_scan,
274 bfd_arch_default_fill,
260 SH2A_NOFPU_NEXT 275 SH2A_NOFPU_NEXT
261 }, 276 },
262 { 277 {
263 32, /* 32 bits in a word. */ 278 32, /* 32 bits in a word. */
264 32, /* 32 bits in an address. */ 279 32, /* 32 bits in an address. */
265 8, /* 8 bits in a byte. */ 280 8, /* 8 bits in a byte. */
266 bfd_arch_sh, 281 bfd_arch_sh,
267 bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, 282 bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu,
268 "sh", /* Architecture name. */ 283 "sh", /* Architecture name. */
269 "sh2a-nofpu-or-sh4-nommu-nofpu", /* Machine name. */ 284 "sh2a-nofpu-or-sh4-nommu-nofpu", /* Machine name. */
270 1, 285 1,
271 FALSE, /* Not the default. */ 286 FALSE, /* Not the default. */
272 bfd_default_compatible, 287 bfd_default_compatible,
273 bfd_default_scan, 288 bfd_default_scan,
289 bfd_arch_default_fill,
274 SH2A_NOFPU_OR_SH4_NOMMU_NOFPU_NEXT 290 SH2A_NOFPU_OR_SH4_NOMMU_NOFPU_NEXT
275 }, 291 },
276 { 292 {
277 32, /* 32 bits in a word. */ 293 32, /* 32 bits in a word. */
278 32, /* 32 bits in an address. */ 294 32, /* 32 bits in an address. */
279 8, /* 8 bits in a byte. */ 295 8, /* 8 bits in a byte. */
280 bfd_arch_sh, 296 bfd_arch_sh,
281 bfd_mach_sh2a_nofpu_or_sh3_nommu, 297 bfd_mach_sh2a_nofpu_or_sh3_nommu,
282 "sh", /* Architecture name. . */ 298 "sh", /* Architecture name. . */
283 "sh2a-nofpu-or-sh3-nommu", /* Machine name. */ 299 "sh2a-nofpu-or-sh3-nommu", /* Machine name. */
284 1, 300 1,
285 FALSE, /* Not the default. */ 301 FALSE, /* Not the default. */
286 bfd_default_compatible, 302 bfd_default_compatible,
287 bfd_default_scan, 303 bfd_default_scan,
304 bfd_arch_default_fill,
288 SH2A_NOFPU_OR_SH3_NOMMU_NEXT 305 SH2A_NOFPU_OR_SH3_NOMMU_NEXT
289 }, 306 },
290 { 307 {
291 32, /* 32 bits in a word. */ 308 32, /* 32 bits in a word. */
292 32, /* 32 bits in an address. */ 309 32, /* 32 bits in an address. */
293 8, /* 8 bits in a byte. */ 310 8, /* 8 bits in a byte. */
294 bfd_arch_sh, 311 bfd_arch_sh,
295 bfd_mach_sh2a_or_sh4, 312 bfd_mach_sh2a_or_sh4,
296 "sh", /* Architecture name. */ 313 "sh", /* Architecture name. */
297 "sh2a-or-sh4", /* Machine name. */ 314 "sh2a-or-sh4", /* Machine name. */
298 1, 315 1,
299 FALSE, /* Not the default. */ 316 FALSE, /* Not the default. */
300 bfd_default_compatible, 317 bfd_default_compatible,
301 bfd_default_scan, 318 bfd_default_scan,
319 bfd_arch_default_fill,
302 SH2A_OR_SH4_NEXT 320 SH2A_OR_SH4_NEXT
303 }, 321 },
304 { 322 {
305 32, /* 32 bits in a word. */ 323 32, /* 32 bits in a word. */
306 32, /* 32 bits in an address. */ 324 32, /* 32 bits in an address. */
307 8, /* 8 bits in a byte. */ 325 8, /* 8 bits in a byte. */
308 bfd_arch_sh, 326 bfd_arch_sh,
309 bfd_mach_sh2a_or_sh3e, 327 bfd_mach_sh2a_or_sh3e,
310 "sh", /* Architecture name. */ 328 "sh", /* Architecture name. */
311 "sh2a-or-sh3e", /* Machine name. */ 329 "sh2a-or-sh3e", /* Machine name. */
312 1, 330 1,
313 FALSE, /* Not the default. */ 331 FALSE, /* Not the default. */
314 bfd_default_compatible, 332 bfd_default_compatible,
315 bfd_default_scan, 333 bfd_default_scan,
334 bfd_arch_default_fill,
316 SH2A_OR_SH3E_NEXT 335 SH2A_OR_SH3E_NEXT
317 }, 336 },
318 { 337 {
319 64, /* 64 bits in a word. */ 338 64, /* 64 bits in a word. */
320 64, /* 64 bits in an address. */ 339 64, /* 64 bits in an address. */
321 8, /* 8 bits in a byte. */ 340 8, /* 8 bits in a byte. */
322 bfd_arch_sh, 341 bfd_arch_sh,
323 bfd_mach_sh5, 342 bfd_mach_sh5,
324 "sh", /* Architecture name. */ 343 "sh", /* Architecture name. */
325 "sh5", /* Machine name. */ 344 "sh5", /* Machine name. */
326 1, 345 1,
327 FALSE, /* Not the default. */ 346 FALSE, /* Not the default. */
328 bfd_default_compatible, 347 bfd_default_compatible,
329 bfd_default_scan, 348 bfd_default_scan,
349 bfd_arch_default_fill,
330 SH64_NEXT 350 SH64_NEXT
331 }, 351 },
332 }; 352 };
333 353
334 const bfd_arch_info_type bfd_sh_arch = 354 const bfd_arch_info_type bfd_sh_arch =
335 { 355 {
336 32, /* 32 bits in a word. */ 356 32, /* 32 bits in a word. */
337 32, /* 32 bits in an address. */ 357 32, /* 32 bits in an address. */
338 8, /* 8 bits in a byte. */ 358 8, /* 8 bits in a byte. */
339 bfd_arch_sh, 359 bfd_arch_sh,
340 bfd_mach_sh, 360 bfd_mach_sh,
341 "sh", /* Architecture name. */ 361 "sh", /* Architecture name. */
342 "sh", /* Machine name. */ 362 "sh", /* Machine name. */
343 1, 363 1,
344 TRUE, /* The default machine. */ 364 TRUE, /* The default machine. */
345 bfd_default_compatible, 365 bfd_default_compatible,
346 bfd_default_scan, 366 bfd_default_scan,
367 bfd_arch_default_fill,
347 SH_NEXT 368 SH_NEXT
348 }; 369 };
349 370
350 371
351 /* This table defines the mappings from the BFD internal numbering 372 /* This table defines the mappings from the BFD internal numbering
352 system to the opcodes internal flags system. 373 system to the opcodes internal flags system.
353 It is used by the functions defined below. 374 It is used by the functions defined below.
354 The prototypes for these SH specific functions are found in 375 The prototypes for these SH specific functions are found in
355 sh-opc.h . */ 376 sh-opc.h . */
356 377
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 bfd_printable_name (ibfd)); 537 bfd_printable_name (ibfd));
517 bfd_set_error (bfd_error_bad_value); 538 bfd_set_error (bfd_error_bad_value);
518 return FALSE; 539 return FALSE;
519 } 540 }
520 541
521 bfd_default_set_arch_mach (obfd, bfd_arch_sh, 542 bfd_default_set_arch_mach (obfd, bfd_arch_sh,
522 sh_get_bfd_mach_from_arch_set (merged_arch)); 543 sh_get_bfd_mach_from_arch_set (merged_arch));
523 544
524 return TRUE; 545 return TRUE;
525 } 546 }
OLDNEW
« no previous file with comments | « bfd/cpu-score.c ('k') | bfd/cpu-sparc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698