diff mbox series

[committed] csky: Fix up csky_setup_incoming_varargs [PR114175]

Message ID ZfsJCFT7lm15yNGO@tucnak
State New
Headers show
Series [committed] csky: Fix up csky_setup_incoming_varargs [PR114175] | expand

Commit Message

Jakub Jelinek March 20, 2024, 4:04 p.m. UTC
Hi!

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.


	Jakub

Comments

Jeff Law March 20, 2024, 5:55 p.m. UTC | #1
On 3/20/24 10:04 AM, Jakub Jelinek wrote:
> Hi!
> 
> 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.
I'm not set up to do execution tests with glibc+qemu.  So for csky & 
nios2 we just have the the build successes.

jeff
diff mbox series

Patch

--- gcc/config/csky/csky.cc.jj	2024-01-03 11:51:47.818505143 +0100
+++ gcc/config/csky/csky.cc	2024-03-20 16:09:23.765822660 +0100
@@ -2090,7 +2090,8 @@  csky_setup_incoming_varargs (cumulative_
 
   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)