]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/rl78/rl78.cc
Update copyright years.
[thirdparty/gcc.git] / gcc / config / rl78 / rl78.cc
index b3727c0a81d09163163d744b211453e4e419437d..e5345bfa9dd9b0f5cd9eb04931be7fa5df58e0a2 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines used for code generation on Renesas RL78 processors.
-   Copyright (C) 2011-2022 Free Software Foundation, Inc.
+   Copyright (C) 2011-2024 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
    This file is part of GCC.
@@ -366,7 +366,7 @@ rl78_option_override (void)
       && strcmp (lang_hooks.name, "GNU C")
       && strcmp (lang_hooks.name, "GNU C11")
       && strcmp (lang_hooks.name, "GNU C17")
-      && strcmp (lang_hooks.name, "GNU C2X")
+      && strcmp (lang_hooks.name, "GNU C23")
       && strcmp (lang_hooks.name, "GNU C89")
       && strcmp (lang_hooks.name, "GNU C99")
       /* Compiling with -flto results in a language of GNU GIMPLE being used... */
@@ -898,7 +898,7 @@ rl78_handle_vector_attribute (tree * node,
 #define TARGET_ATTRIBUTE_TABLE         rl78_attribute_table
 
 /* Table of RL78-specific attributes.  */
-const struct attribute_spec rl78_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (rl78_attribute_table,
 {
   /* Name, min_len, max_len, decl_req, type_req, fn_type_req,
      affects_type_identity, handler, exclude.  */
@@ -911,9 +911,8 @@ const struct attribute_spec rl78_attribute_table[] =
   { "saddr",          0, 0, true, false, false, false,
     rl78_handle_saddr_attribute, NULL },
   { "vector",         1, -1, true, false, false, false,
-       rl78_handle_vector_attribute, NULL },
-  { NULL,             0, 0, false, false, false, false, NULL, NULL }
-};
+       rl78_handle_vector_attribute, NULL }
+});
 
 
 \f
@@ -1143,7 +1142,8 @@ rl78_is_legitimate_constant (machine_mode mode ATTRIBUTE_UNUSED, rtx x ATTRIBUTE
 
 bool
 rl78_as_legitimate_address (machine_mode mode ATTRIBUTE_UNUSED, rtx x,
-                           bool strict ATTRIBUTE_UNUSED, addr_space_t as ATTRIBUTE_UNUSED)
+                           bool strict ATTRIBUTE_UNUSED,
+                           addr_space_t as ATTRIBUTE_UNUSED, code_helper)
 {
   rtx base, index, addend;
   bool is_far_addr = false;
@@ -4724,7 +4724,7 @@ static void
 rl78_insert_attributes (tree decl, tree *attributes ATTRIBUTE_UNUSED)
 {
   if (TARGET_ES0
-      && TREE_CODE (decl) == VAR_DECL
+      && VAR_P (decl)
       && TREE_READONLY (decl)
       && TREE_ADDRESSABLE (decl)
       && TYPE_ADDR_SPACE (TREE_TYPE (decl)) == ADDR_SPACE_GENERIC)
@@ -4880,7 +4880,7 @@ rl78_addsi3_internal (rtx * operands, unsigned int alternative)
      this address.  So we can skip adding in the high bytes.  */
   if (TARGET_ES0
       && GET_CODE (operands[2]) == SYMBOL_REF
-      && TREE_CODE (SYMBOL_REF_DECL (operands[2])) == VAR_DECL
+      && VAR_P (SYMBOL_REF_DECL (operands[2]))
       && TREE_READONLY (SYMBOL_REF_DECL (operands[2]))
       && ! TREE_SIDE_EFFECTS (SYMBOL_REF_DECL (operands[2])))
     return "movw ax, %h1\n\taddw ax, %h2\n\tmovw %h0, ax";
@@ -4972,6 +4972,11 @@ rl78_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, reg_class_t rclass)
 }
 
 \f
+/* The strub runtime uses asms, and physical register allocation won't
+   deal with them, so disable it.  */
+#undef TARGET_HAVE_STRUB_SUPPORT_FOR
+#define TARGET_HAVE_STRUB_SUPPORT_FOR hook_bool_tree_false
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-rl78.h"