cpu-spu.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Copyright (C) 2006-2015 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. {
  33. 32, /* 32 bits in a word */
  34. 32, /* 32 bits in an address */
  35. 8, /* 8 bits in a byte */
  36. bfd_arch_spu, /* architecture */
  37. bfd_mach_spu, /* machine */
  38. "spu", /* architecture name */
  39. "spu:256K", /* printable name */
  40. 3, /* aligned power */
  41. TRUE, /* the default machine for the architecture */
  42. spu_compatible, /* the spu is only compatible with itself, see above */
  43. bfd_default_scan,
  44. bfd_arch_default_fill,
  45. 0, /* next -- there are none! */
  46. }
  47. };