00001 /* bfd back-end for TMS320C[34]x support 00002 Copyright 1996, 1997, 2002, 2003 Free Software Foundation, Inc. 00003 00004 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) 00005 00006 This file is part of BFD, the Binary File Descriptor library. 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00021 00022 #include "bfd.h" 00023 #include "sysdep.h" 00024 #include "libbfd.h" 00025 00026 static bfd_boolean tic4x_scan 00027 PARAMS ((const struct bfd_arch_info *, const char * )); 00028 00029 00030 static bfd_boolean 00031 tic4x_scan (info, string) 00032 const struct bfd_arch_info *info; 00033 const char *string; 00034 { 00035 /* Allow strings of form [ti][Cc][34][0-9], let's not be too picky 00036 about strange numbered machines in C3x or C4x series. */ 00037 if (string[0] == 't' && string[1] == 'i') 00038 string += 2; 00039 if (*string == 'C' || *string == 'c') 00040 string++; 00041 if (string[1] < '0' && string[1] > '9') 00042 return FALSE; 00043 00044 if (*string == '3') 00045 return (info->mach == bfd_mach_tic3x); 00046 else if (*string == '4') 00047 return info->mach == bfd_mach_tic4x; 00048 00049 return FALSE; 00050 } 00051 00052 00053 const bfd_arch_info_type bfd_tic3x_arch = 00054 { 00055 32, /* 32 bits in a word. */ 00056 32, /* 32 bits in an address. */ 00057 32, /* 32 bits in a byte. */ 00058 bfd_arch_tic4x, 00059 bfd_mach_tic3x, /* Machine number. */ 00060 "tic3x", /* Architecture name. */ 00061 "tms320c3x", /* Printable name. */ 00062 0, /* Alignment power. */ 00063 FALSE, /* Not the default architecture. */ 00064 bfd_default_compatible, 00065 tic4x_scan, 00066 0 00067 }; 00068 00069 const bfd_arch_info_type bfd_tic4x_arch = 00070 { 00071 32, /* 32 bits in a word. */ 00072 32, /* 32 bits in an address. */ 00073 32, /* 32 bits in a byte. */ 00074 bfd_arch_tic4x, 00075 bfd_mach_tic4x, /* Machine number. */ 00076 "tic4x", /* Architecture name. */ 00077 "tms320c4x", /* Printable name. */ 00078 0, /* Alignment power. */ 00079 TRUE, /* The default architecture. */ 00080 bfd_default_compatible, 00081 tic4x_scan, 00082 &bfd_tic3x_arch, 00083 }; 00084 00085
1.5.6