]> gcc.gnu.org Git - gcc.git/commitdiff
visium: Fix up visium_setup_incoming_varargs [PR114175]
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Mar 2024 16:00:51 +0000 (17:00 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 20 Mar 2024 16:00:51 +0000 (17:00 +0100)
Like for x86-64, alpha or rs6000, visium seems to be affected too.

Just visually checked differences in c23-stdarg-9.c assembly in a cross
without/with the patch, committed to trunk.

2024-03-20  Jakub Jelinek  <jakub@redhat.com>

PR target/114175
* config/visium/visium.cc (visium_setup_incoming_varargs): Only skip
TARGET_FUNCTION_ARG_ADVANCE for TYPE_NO_NAMED_ARGS_STDARG_P functions
if arg.type is NULL.

gcc/config/visium/visium.cc

index fd63f08c14e20682d056c9f04d9886f4ad284f8b..0368a0f40de2f96cf95c008dcfc1c5649c305e29 100644 (file)
@@ -1482,7 +1482,8 @@ visium_setup_incoming_varargs (cumulative_args_t pcum_v,
   /* The caller has advanced ARGS_SO_FAR up to, but not beyond, the last named
      argument.  Advance a local copy of ARGS_SO_FAR past the last "real" named
      argument, to find out how many registers are left over.  */
-  if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl)))
+  if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl))
+      || arg.type != NULL_TREE)
     TARGET_FUNCTION_ARG_ADVANCE (local_args_so_far, arg);
 
   /* Find how many registers we need to save.  */
This page took 0.073558 seconds and 5 git commands to generate.