| OLD | NEW |
| 1 /* BFD library support routines for the Renesas H8/300 architecture. | 1 /* BFD library support routines for the Renesas H8/300 architecture. |
| 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002, | 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002, |
| 3 2003, 2004, 2005, 2007 Free Software Foundation, Inc. | 3 2003, 2004, 2005, 2007 Free Software Foundation, Inc. |
| 4 Hacked by Steve Chamberlain of Cygnus Support. | 4 Hacked by Steve Chamberlain of Cygnus Support. |
| 5 | 5 |
| 6 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
| 7 | 7 |
| 8 This program is free software; you can redistribute it and/or modify | 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 | 9 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 | 10 the Free Software Foundation; either version 3 of the License, or |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 16, /* 16 bits in an address */ | 120 16, /* 16 bits in an address */ |
| 121 8, /* 8 bits in a byte */ | 121 8, /* 8 bits in a byte */ |
| 122 bfd_arch_h8300, | 122 bfd_arch_h8300, |
| 123 bfd_mach_h8300sxn, | 123 bfd_mach_h8300sxn, |
| 124 "h8300sxn", /* arch_name */ | 124 "h8300sxn", /* arch_name */ |
| 125 "h8300sxn", /* printable name */ | 125 "h8300sxn", /* printable name */ |
| 126 1, | 126 1, |
| 127 FALSE, /* the default machine */ | 127 FALSE, /* the default machine */ |
| 128 compatible, | 128 compatible, |
| 129 h8300_scan, | 129 h8300_scan, |
| 130 bfd_arch_default_fill, |
| 130 0 | 131 0 |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 static const bfd_arch_info_type h8300sx_info_struct = | 134 static const bfd_arch_info_type h8300sx_info_struct = |
| 134 { | 135 { |
| 135 32, /* 32 bits in a word */ | 136 32, /* 32 bits in a word */ |
| 136 32, /* 32 bits in an address */ | 137 32, /* 32 bits in an address */ |
| 137 8, /* 8 bits in a byte */ | 138 8, /* 8 bits in a byte */ |
| 138 bfd_arch_h8300, | 139 bfd_arch_h8300, |
| 139 bfd_mach_h8300sx, | 140 bfd_mach_h8300sx, |
| 140 "h8300sx", /* arch_name */ | 141 "h8300sx", /* arch_name */ |
| 141 "h8300sx", /* printable name */ | 142 "h8300sx", /* printable name */ |
| 142 1, | 143 1, |
| 143 FALSE, /* the default machine */ | 144 FALSE, /* the default machine */ |
| 144 compatible, | 145 compatible, |
| 145 h8300_scan, | 146 h8300_scan, |
| 147 bfd_arch_default_fill, |
| 146 &h8300sxn_info_struct | 148 &h8300sxn_info_struct |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 static const bfd_arch_info_type h8300sn_info_struct = | 151 static const bfd_arch_info_type h8300sn_info_struct = |
| 150 { | 152 { |
| 151 32, /* 32 bits in a word. */ | 153 32, /* 32 bits in a word. */ |
| 152 16, /* 16 bits in an address. */ | 154 16, /* 16 bits in an address. */ |
| 153 8, /* 8 bits in a byte. */ | 155 8, /* 8 bits in a byte. */ |
| 154 bfd_arch_h8300, | 156 bfd_arch_h8300, |
| 155 bfd_mach_h8300sn, | 157 bfd_mach_h8300sn, |
| 156 "h8300sn", /* Architecture name. */ | 158 "h8300sn", /* Architecture name. */ |
| 157 "h8300sn", /* Printable name. */ | 159 "h8300sn", /* Printable name. */ |
| 158 1, | 160 1, |
| 159 FALSE, /* The default machine. */ | 161 FALSE, /* The default machine. */ |
| 160 compatible, | 162 compatible, |
| 161 h8300_scan, | 163 h8300_scan, |
| 164 bfd_arch_default_fill, |
| 162 &h8300sx_info_struct | 165 &h8300sx_info_struct |
| 163 }; | 166 }; |
| 164 | 167 |
| 165 static const bfd_arch_info_type h8300hn_info_struct = | 168 static const bfd_arch_info_type h8300hn_info_struct = |
| 166 { | 169 { |
| 167 32, /* 32 bits in a word. */ | 170 32, /* 32 bits in a word. */ |
| 168 16, /* 16 bits in an address. */ | 171 16, /* 16 bits in an address. */ |
| 169 8, /* 8 bits in a byte. */ | 172 8, /* 8 bits in a byte. */ |
| 170 bfd_arch_h8300, | 173 bfd_arch_h8300, |
| 171 bfd_mach_h8300hn, | 174 bfd_mach_h8300hn, |
| 172 "h8300hn", /* Architecture name. */ | 175 "h8300hn", /* Architecture name. */ |
| 173 "h8300hn", /* Printable name. */ | 176 "h8300hn", /* Printable name. */ |
| 174 1, | 177 1, |
| 175 FALSE, /* The default machine. */ | 178 FALSE, /* The default machine. */ |
| 176 compatible, | 179 compatible, |
| 177 h8300_scan, | 180 h8300_scan, |
| 181 bfd_arch_default_fill, |
| 178 &h8300sn_info_struct | 182 &h8300sn_info_struct |
| 179 }; | 183 }; |
| 180 | 184 |
| 181 static const bfd_arch_info_type h8300s_info_struct = | 185 static const bfd_arch_info_type h8300s_info_struct = |
| 182 { | 186 { |
| 183 32, /* 32 bits in a word. */ | 187 32, /* 32 bits in a word. */ |
| 184 32, /* 32 bits in an address. */ | 188 32, /* 32 bits in an address. */ |
| 185 8, /* 8 bits in a byte. */ | 189 8, /* 8 bits in a byte. */ |
| 186 bfd_arch_h8300, | 190 bfd_arch_h8300, |
| 187 bfd_mach_h8300s, | 191 bfd_mach_h8300s, |
| 188 "h8300s", /* Architecture name. */ | 192 "h8300s", /* Architecture name. */ |
| 189 "h8300s", /* Printable name. */ | 193 "h8300s", /* Printable name. */ |
| 190 1, | 194 1, |
| 191 FALSE, /* The default machine. */ | 195 FALSE, /* The default machine. */ |
| 192 compatible, | 196 compatible, |
| 193 h8300_scan, | 197 h8300_scan, |
| 198 bfd_arch_default_fill, |
| 194 & h8300hn_info_struct | 199 & h8300hn_info_struct |
| 195 }; | 200 }; |
| 196 | 201 |
| 197 static const bfd_arch_info_type h8300h_info_struct = | 202 static const bfd_arch_info_type h8300h_info_struct = |
| 198 { | 203 { |
| 199 32, /* 32 bits in a word. */ | 204 32, /* 32 bits in a word. */ |
| 200 32, /* 32 bits in an address. */ | 205 32, /* 32 bits in an address. */ |
| 201 8, /* 8 bits in a byte. */ | 206 8, /* 8 bits in a byte. */ |
| 202 bfd_arch_h8300, | 207 bfd_arch_h8300, |
| 203 bfd_mach_h8300h, | 208 bfd_mach_h8300h, |
| 204 "h8300h", /* Architecture name. */ | 209 "h8300h", /* Architecture name. */ |
| 205 "h8300h", /* Printable name. */ | 210 "h8300h", /* Printable name. */ |
| 206 1, | 211 1, |
| 207 FALSE, /* The default machine. */ | 212 FALSE, /* The default machine. */ |
| 208 compatible, | 213 compatible, |
| 209 h8300_scan, | 214 h8300_scan, |
| 215 bfd_arch_default_fill, |
| 210 &h8300s_info_struct | 216 &h8300s_info_struct |
| 211 }; | 217 }; |
| 212 | 218 |
| 213 const bfd_arch_info_type bfd_h8300_arch = | 219 const bfd_arch_info_type bfd_h8300_arch = |
| 214 { | 220 { |
| 215 16, /* 16 bits in a word. */ | 221 16, /* 16 bits in a word. */ |
| 216 16, /* 16 bits in an address. */ | 222 16, /* 16 bits in an address. */ |
| 217 8, /* 8 bits in a byte. */ | 223 8, /* 8 bits in a byte. */ |
| 218 bfd_arch_h8300, | 224 bfd_arch_h8300, |
| 219 bfd_mach_h8300, | 225 bfd_mach_h8300, |
| 220 "h8300", /* Architecture name. */ | 226 "h8300", /* Architecture name. */ |
| 221 "h8300", /* Printable name. */ | 227 "h8300", /* Printable name. */ |
| 222 1, | 228 1, |
| 223 TRUE, /* The default machine. */ | 229 TRUE, /* The default machine. */ |
| 224 compatible, | 230 compatible, |
| 225 h8300_scan, | 231 h8300_scan, |
| 232 bfd_arch_default_fill, |
| 226 &h8300h_info_struct | 233 &h8300h_info_struct |
| 227 }; | 234 }; |
| 228 | 235 |
| 229 /* Pad the given address to 32 bits, converting 16-bit and 24-bit | 236 /* Pad the given address to 32 bits, converting 16-bit and 24-bit |
| 230 addresses into the values they would have had on a h8s target. */ | 237 addresses into the values they would have had on a h8s target. */ |
| 231 | 238 |
| 232 bfd_vma | 239 bfd_vma |
| 233 bfd_h8300_pad_address (bfd *abfd, bfd_vma address) | 240 bfd_h8300_pad_address (bfd *abfd, bfd_vma address) |
| 234 { | 241 { |
| 235 /* Cope with bfd_vma's larger than 32 bits. */ | 242 /* Cope with bfd_vma's larger than 32 bits. */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 253 return address; | 260 return address; |
| 254 | 261 |
| 255 case bfd_mach_h8300s: | 262 case bfd_mach_h8300s: |
| 256 case bfd_mach_h8300sx: | 263 case bfd_mach_h8300sx: |
| 257 return address; | 264 return address; |
| 258 | 265 |
| 259 default: | 266 default: |
| 260 abort (); | 267 abort (); |
| 261 } | 268 } |
| 262 } | 269 } |
| OLD | NEW |