Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / cpu-xc16x.c
index 11569003629f55597ebdc6bfeb7318459ff2e51e..2603da7ee5800bf0843896da0e0bdbe4ffd28029 100644 (file)
@@ -1,13 +1,13 @@
 /* BFD support for the Infineon XC16X Microcontroller.
 /* BFD support for the Infineon XC16X Microcontroller.
-   Copyright 2006 Free Software Foundation, Inc.
-   Contributed by KPIT Cummins Infosystems 
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
+   Contributed by KPIT Cummins Infosystems
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Anil Paranjpe(anilp1@kpitcummins.com)
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    This file is part of BFD, the Binary File Descriptor library.
    Contributed by Anil Paranjpe(anilp1@kpitcummins.com)
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
    Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "bfd.h"
 #include "sysdep.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libbfd.h"
 
 #include "libbfd.h"
 
+#define N(BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT)     \
+  {                                                    \
+    16,        /* Bits in a word.  */                  \
+    BITS_ADDR, /* Bits in an address.  */              \
+    8,        /* Bits in a byte.  */                   \
+    bfd_arch_xc16x,                                    \
+    NUMBER,                                            \
+    "xc16x",                                           \
+    PRINT,                                             \
+    1,         /* Section alignment power.  */         \
+    DEFAULT,                                           \
+    bfd_default_compatible,                            \
+    bfd_default_scan,                                  \
+    bfd_arch_default_fill,                             \
+    NEXT,                                              \
+    0 /* Maximum offset of a reloc from the start of an insn.  */ \
+  }
+
 const bfd_arch_info_type xc16xs_info_struct =
 const bfd_arch_info_type xc16xs_info_struct =
-{
-  16,                          /* Bits per word.  */
-  16,                          /* Bits per address.  */
-  8,                           /* Bits per byte.  */
-  bfd_arch_xc16x,              /* Architecture.  */
-  bfd_mach_xc16xs,             /* Machine.  */
-  "xc16x",                     /* Architecture name.  */
-  "xc16xs",                    /* Printable name.  */
-  1,                           /* Section alignment - 16 bit.  */
-  TRUE,                                /* The default ?  */
-  bfd_default_compatible,      /* Architecture comparison fn.  */
-  bfd_default_scan,            /* String to architecture convert fn.  */
-  NULL                         /* Next in list.  */
-};
+  N (16, bfd_mach_xc16xs, "xc16xs", FALSE, NULL);
 
 const bfd_arch_info_type xc16xl_info_struct =
 
 const bfd_arch_info_type xc16xl_info_struct =
-{
-  16,                          /* Bits per word.  */
-  32,                          /* Bits per address.  */
-  8,                           /* Bits per byte.  */
-  bfd_arch_xc16x,              /* Architecture.  */
-  bfd_mach_xc16xl,             /* Machine.  */
-  "xc16x",                     /* Architecture name.  */
-  "xc16xl",                    /* Printable name.  */
-  1,                           /* Section alignment - 16 bit.  */
-  TRUE,                                /* The default ?  */
-  bfd_default_compatible,      /* Architecture comparison fn.  */
-  bfd_default_scan,            /* String to architecture convert fn.  */
-  & xc16xs_info_struct         /* Next in list.  */
-};
+  N (32, bfd_mach_xc16xl, "xc16xl", FALSE, & xc16xs_info_struct);
 
 const bfd_arch_info_type bfd_xc16x_arch =
 
 const bfd_arch_info_type bfd_xc16x_arch =
-{
-  16,                          /* Bits per word.  */
-  16,                          /* Bits per address.  */
-  8,                           /* Bits per byte.  */
-  bfd_arch_xc16x,              /* Architecture.  */
-  bfd_mach_xc16x,              /* Machine.  */
-  "xc16x",                     /* Architecture name.  */
-  "xc16x",                     /* Printable name.  */
-  1,                           /* Section alignment - 16 bit.  */
-  TRUE,                                /* The default ?  */
-  bfd_default_compatible,      /* Architecture comparison fn.  */
-  bfd_default_scan,            /* String to architecture convert fn.  */
-  & xc16xl_info_struct         /* Next in list.  */
-};
+  N (16, bfd_mach_xc16x, "xc16x", TRUE, & xc16xl_info_struct);
+
This page took 0.024211 seconds and 4 git commands to generate.