1 /* bfd back-end for TMS320C[34]x support
2 Copyright 1996, 1997, 2002, 2003, 2005, 2007, 2012
3 Free Software Foundation, Inc.
5 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
7 This file is part of BFD, the Binary File Descriptor library.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 MA 02110-1301, USA. */
29 tic4x_scan (const struct bfd_arch_info *info,
32 /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky
33 about strange numbered machines in C3x or C4x series. */
34 if (string[0] == 't' && string[1] == 'i')
36 if (*string == 'C' || *string == 'c')
38 if (string[1] < '0' && string[1] > '9')
42 return (info->mach == bfd_mach_tic3x);
43 else if (*string == '4')
44 return info->mach == bfd_mach_tic4x;
50 const bfd_arch_info_type bfd_tic3x_arch =
52 32, /* 32 bits in a word. */
53 32, /* 32 bits in an address. */
54 32, /* 32 bits in a byte. */
56 bfd_mach_tic3x, /* Machine number. */
57 "tic3x", /* Architecture name. */
58 "tms320c3x", /* Printable name. */
59 0, /* Alignment power. */
60 FALSE, /* Not the default architecture. */
61 bfd_default_compatible,
63 bfd_arch_default_fill,
67 const bfd_arch_info_type bfd_tic4x_arch =
69 32, /* 32 bits in a word. */
70 32, /* 32 bits in an address. */
71 32, /* 32 bits in a byte. */
73 bfd_mach_tic4x, /* Machine number. */
74 "tic4x", /* Architecture name. */
75 "tms320c4x", /* Printable name. */
76 0, /* Alignment power. */
77 TRUE, /* The default architecture. */
78 bfd_default_compatible,
80 bfd_arch_default_fill,