]>
Commit | Line | Data |
---|---|---|
026df7c5 | 1 | /* bfd back-end for TMS320C[34]x support |
be33c5dd | 2 | Copyright 1996, 1997, 2002, 2003 Free Software Foundation, Inc. |
026df7c5 NC |
3 | |
4 | Contributed by Michael Hayes ([email protected]) | |
5 | ||
6 | This file is part of BFD, the Binary File Descriptor library. | |
7 | ||
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 | |
10 | the Free Software Foundation; either version 2 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program; if not, write to the Free Software | |
3e110533 | 20 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ |
026df7c5 NC |
21 | |
22 | #include "bfd.h" | |
23 | #include "sysdep.h" | |
24 | #include "libbfd.h" | |
25 | ||
be33c5dd | 26 | static bfd_boolean tic4x_scan |
a6588c30 AM |
27 | PARAMS ((const struct bfd_arch_info *, const char * )); |
28 | ||
29 | ||
b34976b6 | 30 | static bfd_boolean |
be33c5dd | 31 | tic4x_scan (info, string) |
026df7c5 NC |
32 | const struct bfd_arch_info *info; |
33 | const char *string; | |
34 | { | |
35 | /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky | |
36 | about strange numbered machines in C3x or C4x series. */ | |
37 | if (string[0] == 't' && string[1] == 'i') | |
38 | string += 2; | |
39 | if (*string == 'C' || *string == 'c') | |
40 | string++; | |
41 | if (string[1] < '0' && string[1] > '9') | |
b34976b6 | 42 | return FALSE; |
026df7c5 NC |
43 | |
44 | if (*string == '3') | |
be33c5dd | 45 | return (info->mach == bfd_mach_tic3x); |
026df7c5 | 46 | else if (*string == '4') |
be33c5dd | 47 | return info->mach == bfd_mach_tic4x; |
026df7c5 | 48 | |
b34976b6 | 49 | return FALSE; |
026df7c5 NC |
50 | } |
51 | ||
52 | ||
53 | const bfd_arch_info_type bfd_tic3x_arch = | |
54 | { | |
55 | 32, /* 32 bits in a word. */ | |
56 | 32, /* 32 bits in an address. */ | |
57 | 32, /* 32 bits in a byte. */ | |
58 | bfd_arch_tic4x, | |
be33c5dd SS |
59 | bfd_mach_tic3x, /* Machine number. */ |
60 | "tic3x", /* Architecture name. */ | |
026df7c5 NC |
61 | "tms320c3x", /* Printable name. */ |
62 | 0, /* Alignment power. */ | |
b34976b6 AM |
63 | FALSE, /* Not the default architecture. */ |
64 | bfd_default_compatible, | |
be33c5dd | 65 | tic4x_scan, |
026df7c5 NC |
66 | 0 |
67 | }; | |
68 | ||
69 | const bfd_arch_info_type bfd_tic4x_arch = | |
70 | { | |
71 | 32, /* 32 bits in a word. */ | |
72 | 32, /* 32 bits in an address. */ | |
73 | 32, /* 32 bits in a byte. */ | |
74 | bfd_arch_tic4x, | |
be33c5dd SS |
75 | bfd_mach_tic4x, /* Machine number. */ |
76 | "tic4x", /* Architecture name. */ | |
026df7c5 NC |
77 | "tms320c4x", /* Printable name. */ |
78 | 0, /* Alignment power. */ | |
b34976b6 AM |
79 | TRUE, /* The default architecture. */ |
80 | bfd_default_compatible, | |
be33c5dd | 81 | tic4x_scan, |
026df7c5 NC |
82 | &bfd_tic3x_arch, |
83 | }; | |
84 | ||
85 |