cpu-xc16x.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* BFD support for the Infineon XC16X Microcontroller.
  2. Copyright (C) 2006-2022 Free Software Foundation, Inc.
  3. Contributed by KPIT Cummins Infosystems
  4. This file is part of BFD, the Binary File Descriptor library.
  5. Contributed by Anil Paranjpe(anilp1@kpitcummins.com)
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  17. 02110-1301, USA. */
  18. #include "sysdep.h"
  19. #include "bfd.h"
  20. #include "libbfd.h"
  21. #define N(BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
  22. { \
  23. 16, /* Bits in a word. */ \
  24. BITS_ADDR, /* Bits in an address. */ \
  25. 8, /* Bits in a byte. */ \
  26. bfd_arch_xc16x, \
  27. NUMBER, \
  28. "xc16x", \
  29. PRINT, \
  30. 1, /* Section alignment power. */ \
  31. DEFAULT, \
  32. bfd_default_compatible, \
  33. bfd_default_scan, \
  34. bfd_arch_default_fill, \
  35. NEXT, \
  36. 0 /* Maximum offset of a reloc from the start of an insn. */ \
  37. }
  38. const bfd_arch_info_type xc16xs_info_struct =
  39. N (16, bfd_mach_xc16xs, "xc16xs", false, NULL);
  40. const bfd_arch_info_type xc16xl_info_struct =
  41. N (32, bfd_mach_xc16xl, "xc16xl", false, & xc16xs_info_struct);
  42. const bfd_arch_info_type bfd_xc16x_arch =
  43. N (16, bfd_mach_xc16x, "xc16x", true, & xc16xl_info_struct);