| 1 | /* BFD support for the SPARC architecture. |
| 2 | Copyright 1992, 1995, 1996, 1998, 2000, 2002 |
| 3 | Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of BFD, the Binary File Descriptor library. |
| 6 | |
| 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 2 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program; if not, write to the Free Software |
| 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| 20 | |
| 21 | #include "bfd.h" |
| 22 | #include "sysdep.h" |
| 23 | #include "libbfd.h" |
| 24 | |
| 25 | static const bfd_arch_info_type arch_info_struct[] = |
| 26 | { |
| 27 | { |
| 28 | 32, /* bits in a word */ |
| 29 | 32, /* bits in an address */ |
| 30 | 8, /* bits in a byte */ |
| 31 | bfd_arch_sparc, |
| 32 | bfd_mach_sparc_sparclet, |
| 33 | "sparc", |
| 34 | "sparc:sparclet", |
| 35 | 3, |
| 36 | FALSE, |
| 37 | bfd_default_compatible, |
| 38 | bfd_default_scan, |
| 39 | &arch_info_struct[1], |
| 40 | }, |
| 41 | { |
| 42 | 32, /* bits in a word */ |
| 43 | 32, /* bits in an address */ |
| 44 | 8, /* bits in a byte */ |
| 45 | bfd_arch_sparc, |
| 46 | bfd_mach_sparc_sparclite, |
| 47 | "sparc", |
| 48 | "sparc:sparclite", |
| 49 | 3, |
| 50 | FALSE, |
| 51 | bfd_default_compatible, |
| 52 | bfd_default_scan, |
| 53 | &arch_info_struct[2], |
| 54 | }, |
| 55 | { |
| 56 | 32, /* bits in a word */ |
| 57 | 32, /* bits in an address */ |
| 58 | 8, /* bits in a byte */ |
| 59 | bfd_arch_sparc, |
| 60 | bfd_mach_sparc_v8plus, |
| 61 | "sparc", |
| 62 | "sparc:v8plus", |
| 63 | 3, |
| 64 | FALSE, |
| 65 | bfd_default_compatible, |
| 66 | bfd_default_scan, |
| 67 | &arch_info_struct[3], |
| 68 | }, |
| 69 | { |
| 70 | 32, /* bits in a word */ |
| 71 | 32, /* bits in an address */ |
| 72 | 8, /* bits in a byte */ |
| 73 | bfd_arch_sparc, |
| 74 | bfd_mach_sparc_v8plusa, |
| 75 | "sparc", |
| 76 | "sparc:v8plusa", |
| 77 | 3, |
| 78 | FALSE, |
| 79 | bfd_default_compatible, |
| 80 | bfd_default_scan, |
| 81 | &arch_info_struct[4], |
| 82 | }, |
| 83 | { |
| 84 | 32, /* bits in a word */ |
| 85 | 32, /* bits in an address */ |
| 86 | 8, /* bits in a byte */ |
| 87 | bfd_arch_sparc, |
| 88 | bfd_mach_sparc_sparclite_le, |
| 89 | "sparc", |
| 90 | "sparc:sparclite_le", |
| 91 | 3, |
| 92 | FALSE, |
| 93 | bfd_default_compatible, |
| 94 | bfd_default_scan, |
| 95 | &arch_info_struct[5], |
| 96 | }, |
| 97 | { |
| 98 | 64, /* bits in a word */ |
| 99 | 64, /* bits in an address */ |
| 100 | 8, /* bits in a byte */ |
| 101 | bfd_arch_sparc, |
| 102 | bfd_mach_sparc_v9, |
| 103 | "sparc", |
| 104 | "sparc:v9", |
| 105 | 3, |
| 106 | FALSE, |
| 107 | bfd_default_compatible, |
| 108 | bfd_default_scan, |
| 109 | &arch_info_struct[6], |
| 110 | }, |
| 111 | { |
| 112 | 64, /* bits in a word */ |
| 113 | 64, /* bits in an address */ |
| 114 | 8, /* bits in a byte */ |
| 115 | bfd_arch_sparc, |
| 116 | bfd_mach_sparc_v9a, |
| 117 | "sparc", |
| 118 | "sparc:v9a", |
| 119 | 3, |
| 120 | FALSE, |
| 121 | bfd_default_compatible, |
| 122 | bfd_default_scan, |
| 123 | &arch_info_struct[7], |
| 124 | }, |
| 125 | { |
| 126 | 32, /* bits in a word */ |
| 127 | 32, /* bits in an address */ |
| 128 | 8, /* bits in a byte */ |
| 129 | bfd_arch_sparc, |
| 130 | bfd_mach_sparc_v8plusb, |
| 131 | "sparc", |
| 132 | "sparc:v8plusb", |
| 133 | 3, |
| 134 | FALSE, |
| 135 | bfd_default_compatible, |
| 136 | bfd_default_scan, |
| 137 | &arch_info_struct[8], |
| 138 | }, |
| 139 | { |
| 140 | 64, /* bits in a word */ |
| 141 | 64, /* bits in an address */ |
| 142 | 8, /* bits in a byte */ |
| 143 | bfd_arch_sparc, |
| 144 | bfd_mach_sparc_v9b, |
| 145 | "sparc", |
| 146 | "sparc:v9b", |
| 147 | 3, |
| 148 | FALSE, |
| 149 | bfd_default_compatible, |
| 150 | bfd_default_scan, |
| 151 | 0, |
| 152 | } |
| 153 | }; |
| 154 | |
| 155 | const bfd_arch_info_type bfd_sparc_arch = |
| 156 | { |
| 157 | 32, /* bits in a word */ |
| 158 | 32, /* bits in an address */ |
| 159 | 8, /* bits in a byte */ |
| 160 | bfd_arch_sparc, |
| 161 | bfd_mach_sparc, |
| 162 | "sparc", |
| 163 | "sparc", |
| 164 | 3, |
| 165 | TRUE, /* the default */ |
| 166 | bfd_default_compatible, |
| 167 | bfd_default_scan, |
| 168 | &arch_info_struct[0], |
| 169 | }; |