xref: /openbsd/gnu/usr.bin/binutils/bfd/cpu-frv.c (revision cf2f2c56)
1d2201f2fSdrahn /* BFD support for the FRV processor.
2*cf2f2c56Smiod    Copyright 2002, 2003 Free Software Foundation, Inc.
3d2201f2fSdrahn 
4d2201f2fSdrahn This file is part of BFD, the Binary File Descriptor library.
5d2201f2fSdrahn 
6d2201f2fSdrahn This program is free software; you can redistribute it and/or modify
7d2201f2fSdrahn it under the terms of the GNU General Public License as published by
8d2201f2fSdrahn the Free Software Foundation; either version 2 of the License, or
9d2201f2fSdrahn (at your option) any later version.
10d2201f2fSdrahn 
11d2201f2fSdrahn This program is distributed in the hope that it will be useful,
12d2201f2fSdrahn but WITHOUT ANY WARRANTY; without even the implied warranty of
13d2201f2fSdrahn MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14d2201f2fSdrahn GNU General Public License for more details.
15d2201f2fSdrahn 
16d2201f2fSdrahn You should have received a copy of the GNU General Public License
17d2201f2fSdrahn along with this program; if not, write to the Free Software
18d2201f2fSdrahn Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19d2201f2fSdrahn 
20d2201f2fSdrahn #include "bfd.h"
21d2201f2fSdrahn #include "sysdep.h"
22d2201f2fSdrahn #include "libbfd.h"
23d2201f2fSdrahn 
24d2201f2fSdrahn #define FRV_ARCH(MACHINE, NAME, DEFAULT, NEXT)				\
25d2201f2fSdrahn {									\
26d2201f2fSdrahn   32,	                        /* 32 bits in a word */			\
27d2201f2fSdrahn   32,	                        /* 32 bits in an address */		\
28d2201f2fSdrahn   8,	                        /* 8 bits in a byte */			\
29d2201f2fSdrahn   bfd_arch_frv,			/* architecture */			\
30d2201f2fSdrahn   MACHINE,			/* which machine */			\
31d2201f2fSdrahn   "frv",			/* architecture name */			\
32d2201f2fSdrahn   NAME,				/* machine name */			\
33d2201f2fSdrahn   4,				/* default alignment */			\
34d2201f2fSdrahn   DEFAULT,			/* is this the default? */		\
35d2201f2fSdrahn   bfd_default_compatible,	/* architecture comparison fn */	\
36d2201f2fSdrahn   bfd_default_scan,		/* string to architecture convert fn */	\
37d2201f2fSdrahn   NEXT				/* next in list */			\
38d2201f2fSdrahn }
39d2201f2fSdrahn 
40d2201f2fSdrahn static const bfd_arch_info_type arch_info_300
41d2201f2fSdrahn   = FRV_ARCH (bfd_mach_fr300,   "fr300",   FALSE, (bfd_arch_info_type *)0);
42d2201f2fSdrahn 
43d2201f2fSdrahn static const bfd_arch_info_type arch_info_400
44d2201f2fSdrahn   = FRV_ARCH (bfd_mach_fr400, "fr400", FALSE, &arch_info_300);
45d2201f2fSdrahn 
46d2201f2fSdrahn static const bfd_arch_info_type arch_info_500
47d2201f2fSdrahn   = FRV_ARCH (bfd_mach_fr500, "fr500", FALSE, &arch_info_400);
48d2201f2fSdrahn 
49*cf2f2c56Smiod static const bfd_arch_info_type arch_info_550
50*cf2f2c56Smiod   = FRV_ARCH (bfd_mach_fr550, "fr550", FALSE, &arch_info_500);
51*cf2f2c56Smiod 
52d2201f2fSdrahn static const bfd_arch_info_type arch_info_simple
53*cf2f2c56Smiod   = FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_550);
54d2201f2fSdrahn 
55d2201f2fSdrahn static const bfd_arch_info_type arch_info_tomcat
56d2201f2fSdrahn   = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", FALSE, &arch_info_simple);
57d2201f2fSdrahn 
58d2201f2fSdrahn const bfd_arch_info_type bfd_frv_arch
59d2201f2fSdrahn   = FRV_ARCH (bfd_mach_frv, "frv", TRUE, &arch_info_tomcat);
60d2201f2fSdrahn 
61