1 /* bfd back-end for TMS320C[34]x support
2 Copyright 1996, 1997, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
4 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
6 This file is part of BFD, the Binary File Descriptor library.
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 3 of the License, or
11 (at your option) any later version.
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.
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
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
27 static bfd_boolean tic4x_scan
28 PARAMS ((const struct bfd_arch_info
*, const char * ));
32 tic4x_scan (info
, string
)
33 const struct bfd_arch_info
*info
;
36 /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky
37 about strange numbered machines in C3x or C4x series. */
38 if (string
[0] == 't' && string
[1] == 'i')
40 if (*string
== 'C' || *string
== 'c')
42 if (string
[1] < '0' && string
[1] > '9')
46 return (info
->mach
== bfd_mach_tic3x
);
47 else if (*string
== '4')
48 return info
->mach
== bfd_mach_tic4x
;
54 const bfd_arch_info_type bfd_tic3x_arch
=
56 32, /* 32 bits in a word. */
57 32, /* 32 bits in an address. */
58 32, /* 32 bits in a byte. */
60 bfd_mach_tic3x
, /* Machine number. */
61 "tic3x", /* Architecture name. */
62 "tms320c3x", /* Printable name. */
63 0, /* Alignment power. */
64 FALSE
, /* Not the default architecture. */
65 bfd_default_compatible
,
67 bfd_arch_default_fill
,
71 const bfd_arch_info_type bfd_tic4x_arch
=
73 32, /* 32 bits in a word. */
74 32, /* 32 bits in an address. */
75 32, /* 32 bits in a byte. */
77 bfd_mach_tic4x
, /* Machine number. */
78 "tic4x", /* Architecture name. */
79 "tms320c4x", /* Printable name. */
80 0, /* Alignment power. */
81 TRUE
, /* The default architecture. */
82 bfd_default_compatible
,
84 bfd_arch_default_fill
,