]> gcc.gnu.org Git - gcc.git/commitdiff
csky: Fix up csky_setup_incoming_varargs [PR114175]
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Mar 2024 15:59:08 +0000 (16:59 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 20 Mar 2024 15:59:08 +0000 (16:59 +0100)
Like for x86-64, alpha or rs6000, csky 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/csky/csky.cc (csky_setup_incoming_varargs): Only skip
csky_function_arg_advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
if arg.type is NULL.

gcc/config/csky/csky.cc

index e33ca8cf43463dffd80e363f94632019df2ad8bf..72619ea30312de738f47e48606946fb5ad174abd 100644 (file)
@@ -2090,7 +2090,8 @@ csky_setup_incoming_varargs (cumulative_args_t pcum_v,
 
   cfun->machine->uses_anonymous_args = 1;
   local_cum = *pcum;
-  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)
     csky_function_arg_advance (local_cum_v, arg);
   regs_to_push = CSKY_NPARM_REGS - local_cum.reg;
   if (regs_to_push)
This page took 0.06759 seconds and 5 git commands to generate.