cpu-frv.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* BFD support for the FRV processor.
  2. Copyright (C) 2002-2022 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. #include "sysdep.h"
  17. #include "bfd.h"
  18. #include "libbfd.h"
  19. #define FRV_ARCH(MACHINE, NAME, DEFAULT, NEXT) \
  20. { \
  21. 32, /* Bits in a word. */ \
  22. 32, /* Bits in an address. */ \
  23. 8, /* Bits in a byte. */ \
  24. bfd_arch_frv, /* Architecture number. */ \
  25. MACHINE, /* Machine number. */ \
  26. "frv", /* Architecture name. */ \
  27. NAME, /* Machine name. */ \
  28. 4, /* Section alignment. */ \
  29. DEFAULT, /* Is this the default? */ \
  30. bfd_default_compatible, /* Architecture comparison fn. */ \
  31. bfd_default_scan, /* String to architecture convert fn. */\
  32. bfd_arch_default_fill, /* Default fill. */ \
  33. NEXT, /* Next in list. */ \
  34. 0 /* Maximum offset of a reloc from the start of an insn. */ \
  35. }
  36. static const bfd_arch_info_type arch_info_300
  37. = FRV_ARCH (bfd_mach_fr300, "fr300", false, (bfd_arch_info_type *)0);
  38. static const bfd_arch_info_type arch_info_400
  39. = FRV_ARCH (bfd_mach_fr400, "fr400", false, &arch_info_300);
  40. static const bfd_arch_info_type arch_info_450
  41. = FRV_ARCH (bfd_mach_fr450, "fr450", false, &arch_info_400);
  42. static const bfd_arch_info_type arch_info_500
  43. = FRV_ARCH (bfd_mach_fr500, "fr500", false, &arch_info_450);
  44. static const bfd_arch_info_type arch_info_550
  45. = FRV_ARCH (bfd_mach_fr550, "fr550", false, &arch_info_500);
  46. static const bfd_arch_info_type arch_info_simple
  47. = FRV_ARCH (bfd_mach_frvsimple, "simple", false, &arch_info_550);
  48. static const bfd_arch_info_type arch_info_tomcat
  49. = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", false, &arch_info_simple);
  50. const bfd_arch_info_type bfd_frv_arch
  51. = FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat);