[gcc r13-8513] csky: Fix up csky_setup_incoming_varargs [PR114175]
Jakub Jelinek
jakub@gcc.gnu.org
Sat Mar 30 03:54:44 GMT 2024
https://gcc.gnu.org/g:06f9476a60bcf2d206b7b86e68ea433954f91f20
commit r13-8513-g06f9476a60bcf2d206b7b86e68ea433954f91f20
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 20 16:59:08 2024 +0100
csky: Fix up csky_setup_incoming_varargs [PR114175]
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.
(cherry picked from commit 68eca9b6aefeb40bdd4c55e42528cb32d1e2935b)
Diff:
---
gcc/config/csky/csky.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/csky/csky.cc b/gcc/config/csky/csky.cc
index ddc6954dad1..edd364c6654 100644
--- a/gcc/config/csky/csky.cc
+++ b/gcc/config/csky/csky.cc
@@ -2091,7 +2091,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)
More information about the Gcc-cvs
mailing list