cpu-spu.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (C) 2006-2022 Free Software Foundation, Inc.
  2. This file is part of BFD, the Binary File Descriptor library.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License along
  12. with this program; if not, write to the Free Software Foundation, Inc.,
  13. 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
  14. #include "sysdep.h"
  15. #include "bfd.h"
  16. #include "libbfd.h"
  17. static const bfd_arch_info_type *
  18. spu_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
  19. {
  20. BFD_ASSERT (a->arch == bfd_arch_spu);
  21. switch (b->arch)
  22. {
  23. default:
  24. return NULL;
  25. case bfd_arch_spu:
  26. return bfd_default_compatible (a, b);
  27. }
  28. /*NOTREACHED*/
  29. }
  30. const bfd_arch_info_type bfd_spu_arch =
  31. {
  32. 32, /* Bits in a word. */
  33. 32, /* Bits in an address. */
  34. 8, /* Bits in a byte. */
  35. bfd_arch_spu, /* Architecture number. */
  36. bfd_mach_spu, /* Machine number. */
  37. "spu", /* Architecture name. */
  38. "spu:256K", /* Printable name. */
  39. 3, /* Section alignment power. */
  40. true, /* Default machine. */
  41. spu_compatible, /* The spu is only compatible with itself, see above. */
  42. bfd_default_scan,
  43. bfd_arch_default_fill,
  44. NULL, /* Next -- there are none! */
  45. 0 /* Maximum offset of a reloc from the start of an insn. */
  46. };