1*cb63e24eSchristos /* Copyright (C) 2006-2024 Free Software Foundation, Inc.
22a6b7db3Sskrll
32a6b7db3Sskrll This file is part of BFD, the Binary File Descriptor library.
42a6b7db3Sskrll
52a6b7db3Sskrll This program is free software; you can redistribute it and/or modify
62a6b7db3Sskrll it under the terms of the GNU General Public License as published by
72a6b7db3Sskrll the Free Software Foundation; either version 3 of the License, or
82a6b7db3Sskrll (at your option) any later version.
92a6b7db3Sskrll
102a6b7db3Sskrll This program is distributed in the hope that it will be useful,
112a6b7db3Sskrll but WITHOUT ANY WARRANTY; without even the implied warranty of
122a6b7db3Sskrll MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
132a6b7db3Sskrll GNU General Public License for more details.
142a6b7db3Sskrll
152a6b7db3Sskrll You should have received a copy of the GNU General Public License along
162a6b7db3Sskrll with this program; if not, write to the Free Software Foundation, Inc.,
172a6b7db3Sskrll 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
182a6b7db3Sskrll
192a6b7db3Sskrll #include "sysdep.h"
202a6b7db3Sskrll #include "bfd.h"
212a6b7db3Sskrll #include "libbfd.h"
222a6b7db3Sskrll
232a6b7db3Sskrll static const bfd_arch_info_type *
spu_compatible(const bfd_arch_info_type * a,const bfd_arch_info_type * b)242a6b7db3Sskrll spu_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
252a6b7db3Sskrll {
262a6b7db3Sskrll BFD_ASSERT (a->arch == bfd_arch_spu);
272a6b7db3Sskrll switch (b->arch)
282a6b7db3Sskrll {
292a6b7db3Sskrll default:
302a6b7db3Sskrll return NULL;
312a6b7db3Sskrll case bfd_arch_spu:
322a6b7db3Sskrll return bfd_default_compatible (a, b);
332a6b7db3Sskrll }
342a6b7db3Sskrll /*NOTREACHED*/
352a6b7db3Sskrll }
362a6b7db3Sskrll
376f4ced0bSchristos const bfd_arch_info_type bfd_spu_arch =
382a6b7db3Sskrll {
396f4ced0bSchristos 32, /* Bits in a word. */
406f4ced0bSchristos 32, /* Bits in an address. */
416f4ced0bSchristos 8, /* Bits in a byte. */
426f4ced0bSchristos bfd_arch_spu, /* Architecture number. */
436f4ced0bSchristos bfd_mach_spu, /* Machine number. */
446f4ced0bSchristos "spu", /* Architecture name. */
456f4ced0bSchristos "spu:256K", /* Printable name. */
466f4ced0bSchristos 3, /* Section alignment power. */
474f645668Schristos true, /* Default machine. */
486f4ced0bSchristos spu_compatible, /* The spu is only compatible with itself, see above. */
492a6b7db3Sskrll bfd_default_scan,
50883529b6Schristos bfd_arch_default_fill,
516f4ced0bSchristos NULL, /* Next -- there are none! */
526f4ced0bSchristos 0 /* Maximum offset of a reloc from the start of an insn. */
532a6b7db3Sskrll };
54