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