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