cpu-z8k.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* BFD library support routines for the Z800n architecture.
  2. Copyright (C) 1992-2022 Free Software Foundation, Inc.
  3. Hacked by Steve Chamberlain of Cygnus Support.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #include "sysdep.h"
  18. #include "bfd.h"
  19. #include "libbfd.h"
  20. /* This routine is provided two arch_infos and returns whether
  21. they'd be compatible */
  22. static const bfd_arch_info_type *
  23. compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
  24. {
  25. if (a->arch != b->arch || a->mach != b->mach)
  26. return NULL;
  27. return a;
  28. }
  29. static const bfd_arch_info_type arch_info_struct[] =
  30. {
  31. { 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, false,
  32. compatible, bfd_default_scan, bfd_arch_default_fill, NULL, 0 }
  33. };
  34. const bfd_arch_info_type bfd_z8k_arch =
  35. {
  36. 32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, true,
  37. compatible, bfd_default_scan, bfd_arch_default_fill,
  38. &arch_info_struct[0], 0
  39. };