xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/cpu-spu.c (revision e992f068c547fd6e84b3f104dc2340adcc955732)
1*e992f068Schristos /* Copyright (C) 2006-2022 Free Software Foundation, Inc.
275fd0b74Schristos 
375fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
475fd0b74Schristos 
575fd0b74Schristos    This program is free software; you can redistribute it and/or modify
675fd0b74Schristos    it under the terms of the GNU General Public License as published by
775fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
875fd0b74Schristos    (at your option) any later version.
975fd0b74Schristos 
1075fd0b74Schristos    This program is distributed in the hope that it will be useful,
1175fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1275fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1375fd0b74Schristos    GNU General Public License for more details.
1475fd0b74Schristos 
1575fd0b74Schristos    You should have received a copy of the GNU General Public License along
1675fd0b74Schristos    with this program; if not, write to the Free Software Foundation, Inc.,
1775fd0b74Schristos    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1875fd0b74Schristos 
1975fd0b74Schristos #include "sysdep.h"
2075fd0b74Schristos #include "bfd.h"
2175fd0b74Schristos #include "libbfd.h"
2275fd0b74Schristos 
2375fd0b74Schristos static const bfd_arch_info_type *
spu_compatible(const bfd_arch_info_type * a,const bfd_arch_info_type * b)2475fd0b74Schristos spu_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
2575fd0b74Schristos {
2675fd0b74Schristos   BFD_ASSERT (a->arch == bfd_arch_spu);
2775fd0b74Schristos   switch (b->arch)
2875fd0b74Schristos     {
2975fd0b74Schristos     default:
3075fd0b74Schristos       return NULL;
3175fd0b74Schristos     case bfd_arch_spu:
3275fd0b74Schristos       return bfd_default_compatible (a, b);
3375fd0b74Schristos     }
3475fd0b74Schristos   /*NOTREACHED*/
3575fd0b74Schristos }
3675fd0b74Schristos 
37012573ebSchristos const bfd_arch_info_type bfd_spu_arch =
3875fd0b74Schristos {
39012573ebSchristos   32,			/* Bits in a word.  */
40012573ebSchristos   32,			/* Bits in an address.  */
41012573ebSchristos   8,			/* Bits in a byte.  */
42012573ebSchristos   bfd_arch_spu,		/* Architecture number.  */
43012573ebSchristos   bfd_mach_spu,		/* Machine number.  */
44012573ebSchristos   "spu",		/* Architecture name.  */
45012573ebSchristos   "spu:256K",		/* Printable name.  */
46012573ebSchristos   3,			/* Section alignment power.  */
47*e992f068Schristos   true,			/* Default machine.  */
48012573ebSchristos   spu_compatible,	/* The spu is only compatible with itself, see above.  */
4975fd0b74Schristos   bfd_default_scan,
5075fd0b74Schristos   bfd_arch_default_fill,
51012573ebSchristos   NULL,			/* Next -- there are none!  */
52012573ebSchristos   0 /* Maximum offset of a reloc from the start of an insn.  */
5375fd0b74Schristos };
54