]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/avr/avr-devices.c
Update copyright years.
[thirdparty/gcc.git] / gcc / config / avr / avr-devices.c
index c391ef9cd8eeef9421cf3e92fa3df6e3b22cd9a3..ac1427faad666b3e31821b1bfe3bab557a2db76f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
    Contributed by Anatoly Sokolov (aesok@post.ru)
 
    This file is part of GCC.
@@ -18,6 +18,8 @@
    <http://www.gnu.org/licenses/>.  */
 
 #ifndef IN_GEN_AVR_MMCU_TEXI
+#define IN_TARGET_CODE 1
+
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
@@ -74,7 +76,7 @@ avr_texinfo[] =
     "the @code{MOVW} instruction." },
   { ARCH_AVR3,
     "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
-    " program memory." },
+    "program memory." },
   { ARCH_AVR31,
     "``Classic'' devices with 128@tie{}KiB of program memory." },
   { ARCH_AVR35,
@@ -115,12 +117,12 @@ avr_texinfo[] =
 const avr_mcu_t
 avr_mcu_types[] =
 {
-#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE)\
-  { NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE },
+#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE, PMOFF) \
+  { NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE, PMOFF },
 #include "avr-mcus.def"
 #undef AVR_MCU
     /* End of list.  */
-  { NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, 0 }
+  { NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, 0, 0 }
 };
 
 
@@ -128,39 +130,6 @@ avr_mcu_types[] =
 
 #ifndef IN_GEN_AVR_MMCU_TEXI
 
-/* Copy-pastes from `gen-avr-mmcu-texi.c' follow...  */
-
-static const char*
-mcu_name[sizeof avr_mcu_types / sizeof avr_mcu_types[0]];
-
-static int
-comparator (const void *va, const void *vb)
-{
-  const char *a = *(const char* const*) va;
-  const char *b = *(const char* const*) vb;
-
-  while (*a && *b)
-    {
-      /* Make letters smaller than digits so that `atmega16a' follows
-         `atmega16' without `atmega161' etc. between them.  */
-      
-      if (ISALPHA (*a) && ISDIGIT (*b))
-        return -1;
-
-      if (ISDIGIT (*a) && ISALPHA (*b))
-        return 1;
-
-      if (*a != *b)
-        return *a - *b;
-      
-      a++;
-      b++;
-    }
-
-  return *a - *b;
-}
-
-
 static char*
 avr_archs_str (void)
 {
@@ -176,39 +145,6 @@ avr_archs_str (void)
 }
 
   
-static char*
-avr_mcus_str (void)
-{
-  size_t n_mcus = 0;
-  char *mcus = concat ("", NULL);
-
-  // Build array of proper devices' names.
-
-  for (const avr_mcu_t *mcu = avr_mcu_types; mcu->name; mcu++)
-    if (mcu->macro)
-      mcu_name[n_mcus++] = mcu->name;
-
-  // Sort MCUs so that they are displayed in the same canonical order as
-  // in doc/avr-mcus.texi.
-
-  qsort (mcu_name, n_mcus, sizeof (char*), comparator);
-
-  for (size_t i = 0; i < n_mcus; i++)
-    mcus = concat (mcus, " ", mcu_name[i], NULL);
-
-  return mcus;
-}
-
-
-void
-avr_inform_devices (void)
-{
-  char *mcus = avr_mcus_str ();
-  inform (input_location, "devices natively supported:%s", mcus);
-  free (mcus);
-}
-
-
 void
 avr_inform_core_architectures (void)
 {