* [committed] nds32: Fix up nds32_setup_incoming_varargs [PR114175]
@ 2024-03-20 16:06 Jakub Jelinek
2024-03-20 17:01 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2024-03-20 16:06 UTC (permalink / raw)
To: gcc-patches
Hi!
Like for x86-64, alpha or rs6000, nds32 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/nds32/nds32.cc (nds32_setup_incoming_varargs): Only skip
function arg advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
if arg.type is NULL.
--- gcc/config/nds32/nds32.cc.jj 2024-01-03 12:01:22.862487765 +0100
+++ gcc/config/nds32/nds32.cc 2024-03-20 16:13:47.460283181 +0100
@@ -2374,7 +2374,8 @@ nds32_setup_incoming_varargs (cumulative
for varargs. */
total_args_regs
= NDS32_MAX_GPR_REGS_FOR_ARGS + NDS32_GPR_ARG_FIRST_REGNUM;
- 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)
num_of_used_regs
= NDS32_AVAILABLE_REGNUM_FOR_GPR_ARG (cum->gpr_offset, arg.mode, arg.type)
+ NDS32_NEED_N_REGS_FOR_ARG (arg.mode, arg.type);
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [committed] nds32: Fix up nds32_setup_incoming_varargs [PR114175]
2024-03-20 16:06 [committed] nds32: Fix up nds32_setup_incoming_varargs [PR114175] Jakub Jelinek
@ 2024-03-20 17:01 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2024-03-20 17:01 UTC (permalink / raw)
To: Jakub Jelinek, gcc-patches
On 3/20/24 10:06 AM, Jakub Jelinek wrote:
> Hi!
>
> Like for x86-64, alpha or rs6000, nds32 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/nds32/nds32.cc (nds32_setup_incoming_varargs): Only skip
> function arg advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
> if arg.type is NULL.
No gdbsim for the nds32 processor. So no execution tests. Built fine
though.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-20 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 16:06 [committed] nds32: Fix up nds32_setup_incoming_varargs [PR114175] Jakub Jelinek
2024-03-20 17:01 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).