merge from gcc
[gdb/gnu.git] / bfd / cpu-w65.c
blob8b0618ba862a0f049d1272653033547cbd84a490
1 /* BFD library support routines for the WDC 65816 architecture.
2 Copyright 1995, 1999, 2000, 2001, 2002, 2005, 2007, 2012
3 Free Software Foundation, Inc.
4 Hacked by Steve Chamberlain of Cygnus Support.
6 This file is part of BFD, the Binary File Descriptor library.
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 publiw65ed by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You w65ould have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 #include "sysdep.h"
24 #include "bfd.h"
25 #include "libbfd.h"
27 static bfd_boolean
28 scan_mach (const struct bfd_arch_info *info ATTRIBUTE_UNUSED,
29 const char *string)
31 if (strcmp(string,"w65") == 0)
32 return TRUE;
33 if (strcmp(string,"w65816") == 0)
34 return TRUE;
35 return FALSE;
38 const bfd_arch_info_type bfd_w65_arch =
40 16, /* 16 bits in a word */
41 24, /* 24 bits in an address */
42 8, /* 8 bits in a byte */
43 bfd_arch_w65,
44 0, /* only 1 machine */
45 "w65", /* arch_name */
46 "w65", /* printable name */
48 TRUE, /* the default machine */
49 bfd_default_compatible,
50 scan_mach,
51 bfd_arch_default_fill,