1 /* BFD library support routines for the Hitachi H8/300 architecture.
2 Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
3 Hacked by Steve Chamberlain of Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
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.
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.
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. */
25 int bfd_default_scan_num_mach ();
28 h8300_scan (info
, string
)
29 const struct bfd_arch_info
*info
;
32 if (*string
!= 'h' && *string
!= 'H')
54 if (*string
== 'h' || *string
== 'H')
56 return (info
->mach
== bfd_mach_h8300h
);
58 else if (*string
== 's' || *string
== 'S')
60 return (info
->mach
== bfd_mach_h8300s
);
64 return info
->mach
== bfd_mach_h8300
;
68 /* This routine is provided two arch_infos and works out the machine
69 which would be compatible with both and returns a pointer to its
72 static const bfd_arch_info_type
*
74 const bfd_arch_info_type
*in
;
75 const bfd_arch_info_type
*out
;
77 /* It's really not a good idea to mix and match modes. */
78 if (in
->mach
!= out
->mach
)
84 static const bfd_arch_info_type h8300_info_struct
=
86 16, /* 16 bits in a word */
87 16, /* 16 bits in an address */
88 8, /* 8 bits in a byte */
91 "h8300", /* arch_name */
92 "h8300", /* printable name */
94 true, /* the default machine */
98 local_bfd_reloc_type_lookup
,
103 static const bfd_arch_info_type h8300h_info_struct
=
105 32, /* 32 bits in a word */
106 32, /* 32 bits in an address */
107 8, /* 8 bits in a byte */
110 "h8300h", /* arch_name */
111 "h8300h", /* printable name */
113 false, /* the default machine */
117 local_bfd_reloc_type_lookup
,
122 const bfd_arch_info_type bfd_h8300_arch
=
124 32, /* 32 bits in a word */
125 32, /* 32 bits in an address */
126 8, /* 8 bits in a byte */
129 "h8300s", /* arch_name */
130 "h8300s", /* printable name */
132 false, /* the default machine */
136 local_bfd_reloc_type_lookup
,