175fd0b74Schristos /* BFD support for the FRV processor. 2*e992f068Schristos Copyright (C) 2002-2022 Free Software Foundation, Inc. 375fd0b74Schristos 475fd0b74Schristos This file is part of BFD, the Binary File Descriptor library. 575fd0b74Schristos 675fd0b74Schristos This program is free software; you can redistribute it and/or modify 775fd0b74Schristos it under the terms of the GNU General Public License as published by 875fd0b74Schristos the Free Software Foundation; either version 3 of the License, or 975fd0b74Schristos (at your option) any later version. 1075fd0b74Schristos 1175fd0b74Schristos This program is distributed in the hope that it will be useful, 1275fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1375fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1475fd0b74Schristos GNU General Public License for more details. 1575fd0b74Schristos 1675fd0b74Schristos You should have received a copy of the GNU General Public License 1775fd0b74Schristos along with this program; if not, write to the Free Software 1875fd0b74Schristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 1975fd0b74Schristos MA 02110-1301, USA. */ 2075fd0b74Schristos 2175fd0b74Schristos #include "sysdep.h" 2275fd0b74Schristos #include "bfd.h" 2375fd0b74Schristos #include "libbfd.h" 2475fd0b74Schristos 2575fd0b74Schristos #define FRV_ARCH(MACHINE, NAME, DEFAULT, NEXT) \ 2675fd0b74Schristos { \ 27012573ebSchristos 32, /* Bits in a word. */ \ 28012573ebSchristos 32, /* Bits in an address. */ \ 29012573ebSchristos 8, /* Bits in a byte. */ \ 30012573ebSchristos bfd_arch_frv, /* Architecture number. */ \ 31012573ebSchristos MACHINE, /* Machine number. */ \ 32012573ebSchristos "frv", /* Architecture name. */ \ 33012573ebSchristos NAME, /* Machine name. */ \ 34012573ebSchristos 4, /* Section alignment. */ \ 35012573ebSchristos DEFAULT, /* Is this the default? */ \ 36012573ebSchristos bfd_default_compatible, /* Architecture comparison fn. */ \ 37012573ebSchristos bfd_default_scan, /* String to architecture convert fn. */\ 3875fd0b74Schristos bfd_arch_default_fill, /* Default fill. */ \ 39012573ebSchristos NEXT, /* Next in list. */ \ 40012573ebSchristos 0 /* Maximum offset of a reloc from the start of an insn. */ \ 4175fd0b74Schristos } 4275fd0b74Schristos 4375fd0b74Schristos static const bfd_arch_info_type arch_info_300 44*e992f068Schristos = FRV_ARCH (bfd_mach_fr300, "fr300", false, (bfd_arch_info_type *)0); 4575fd0b74Schristos 4675fd0b74Schristos static const bfd_arch_info_type arch_info_400 47*e992f068Schristos = FRV_ARCH (bfd_mach_fr400, "fr400", false, &arch_info_300); 4875fd0b74Schristos 4975fd0b74Schristos static const bfd_arch_info_type arch_info_450 50*e992f068Schristos = FRV_ARCH (bfd_mach_fr450, "fr450", false, &arch_info_400); 5175fd0b74Schristos 5275fd0b74Schristos static const bfd_arch_info_type arch_info_500 53*e992f068Schristos = FRV_ARCH (bfd_mach_fr500, "fr500", false, &arch_info_450); 5475fd0b74Schristos 5575fd0b74Schristos static const bfd_arch_info_type arch_info_550 56*e992f068Schristos = FRV_ARCH (bfd_mach_fr550, "fr550", false, &arch_info_500); 5775fd0b74Schristos 5875fd0b74Schristos static const bfd_arch_info_type arch_info_simple 59*e992f068Schristos = FRV_ARCH (bfd_mach_frvsimple, "simple", false, &arch_info_550); 6075fd0b74Schristos 6175fd0b74Schristos static const bfd_arch_info_type arch_info_tomcat 62*e992f068Schristos = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", false, &arch_info_simple); 6375fd0b74Schristos 6475fd0b74Schristos const bfd_arch_info_type bfd_frv_arch 65*e992f068Schristos = FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat); 6675fd0b74Schristos 67