1 /* bfd back-end for TMS320C[34]x support
2 Copyright (C) 1996, 1997, 2002 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 static boolean c4x_scan
27 PARAMS ((const struct bfd_arch_info
*, const char * ));
31 c4x_scan (info
, string
)
32 const struct bfd_arch_info
*info
;
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')
39 if (*string
== 'C' || *string
== 'c')
41 if (string
[1] < '0' && string
[1] > '9')
45 return (info
->mach
== bfd_mach_c3x
);
46 else if (*string
== '4')
47 return info
->mach
== bfd_mach_c4x
;
53 const bfd_arch_info_type bfd_tic3x_arch
=
55 32, /* 32 bits in a word. */
56 32, /* 32 bits in an address. */
57 32, /* 32 bits in a byte. */
59 bfd_mach_c3x
, /* Machine number. */
60 "c3x", /* Architecture name. */
61 "tms320c3x", /* Printable name. */
62 0, /* Alignment power. */
63 false, /* Not the default architecture. */
64 bfd_default_compatible
,
69 const bfd_arch_info_type bfd_tic4x_arch
=
71 32, /* 32 bits in a word. */
72 32, /* 32 bits in an address. */
73 32, /* 32 bits in a byte. */
75 bfd_mach_c4x
, /* Machine number. */
76 "c4x", /* Architecture name. */
77 "tms320c4x", /* Printable name. */
78 0, /* Alignment power. */
79 true, /* The default architecture. */
80 bfd_default_compatible
,