cpu-nfp.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* BFD library support routines for the NFP.
  2. Copyright (C) 2017-2022 Free Software Foundation, Inc.
  3. Contributed by Francois H. Theron <francois.theron@netronome.com>
  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. static const bfd_arch_info_type *
  21. bfd_nfp_compatible (const bfd_arch_info_type * a,
  22. const bfd_arch_info_type * b)
  23. {
  24. if (a->arch != b->arch)
  25. return NULL;
  26. if (a->mach != b->mach)
  27. return NULL;
  28. return a;
  29. }
  30. #define N(machine, print, default, next) \
  31. { \
  32. 32, \
  33. 64, \
  34. 8, \
  35. bfd_arch_nfp, \
  36. machine, \
  37. "nfp", \
  38. print, \
  39. 3, \
  40. default, \
  41. bfd_nfp_compatible, \
  42. bfd_default_scan, \
  43. bfd_arch_default_fill, \
  44. next, \
  45. 0 /* Maximum offset of a reloc from the start of an insn. */ \
  46. }
  47. static const bfd_arch_info_type arch_info_struct =
  48. N (bfd_mach_nfp3200, "NFP-32xx", false, NULL);
  49. const bfd_arch_info_type bfd_nfp_arch =
  50. N (bfd_mach_nfp6000, "NFP-6xxx", true, &arch_info_struct);