xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/cpu-or1k.c (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* BFD support for the OpenRISC 1000 architecture.
2*e992f068Schristos    Copyright (C) 2002-2022 Free Software Foundation, Inc.
375fd0b74Schristos    Contributed for OR32 by Ivan Guzvinec  <ivang@opencores.org>
475fd0b74Schristos 
575fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
675fd0b74Schristos 
775fd0b74Schristos    This program is free software; you can redistribute it and/or modify
875fd0b74Schristos    it under the terms of the GNU General Public License as published by
975fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
1075fd0b74Schristos    (at your option) any later version.
1175fd0b74Schristos 
1275fd0b74Schristos    This program is distributed in the hope that it will be useful,
1375fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1475fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1575fd0b74Schristos    GNU General Public License for more details.
1675fd0b74Schristos 
1775fd0b74Schristos    You should have received a copy of the GNU General Public License
1875fd0b74Schristos    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
1975fd0b74Schristos 
2075fd0b74Schristos #include "sysdep.h"
2175fd0b74Schristos #include "bfd.h"
2275fd0b74Schristos #include "libbfd.h"
2375fd0b74Schristos 
24012573ebSchristos #define N(NUMBER, PRINT, DEFAULT, NEXT)			\
25012573ebSchristos   {							\
26012573ebSchristos     32,     /* Bits in a word.  */			\
27012573ebSchristos     32,     /* Bits in an address.  */			\
28012573ebSchristos     8,	    /* Bits in a byte.  */			\
29012573ebSchristos     bfd_arch_or1k,					\
30012573ebSchristos     NUMBER,						\
31012573ebSchristos     PRINT,						\
32012573ebSchristos     PRINT,						\
33012573ebSchristos     4,		/* Section alignment power.  */		\
34012573ebSchristos     DEFAULT,						\
35012573ebSchristos     bfd_default_compatible,				\
36012573ebSchristos     bfd_default_scan,					\
37012573ebSchristos     bfd_arch_default_fill,				\
38012573ebSchristos     NEXT,						\
39012573ebSchristos     0 /* Maximum offset of a reloc from the start of an insn.  */ \
40012573ebSchristos   }
4175fd0b74Schristos 
4275fd0b74Schristos 
4375fd0b74Schristos const bfd_arch_info_type bfd_or1knd_arch =
44*e992f068Schristos   N (bfd_mach_or1knd, "or1knd", false, NULL);
45012573ebSchristos 
46012573ebSchristos const bfd_arch_info_type bfd_or1k_arch =
47*e992f068Schristos   N (bfd_mach_or1k, "or1k", true, &bfd_or1knd_arch);
48