public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Carlos O'Donell <carlos@redhat.com>, libc-alpha@sourceware.org
Cc: caiyinyu <caiyinyu@loongson.cn>, Wang Xuerui <i@xen0n.name>,
	Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
	Andreas Schwab <schwab@suse.de>,
	Florian Weimer <fw@deneb.enyo.de>
Subject: Re: [PATCH v2 0/5] linux: Avoid va_list for generic syscall wrappers if possible
Date: Mon, 27 Mar 2023 22:44:48 +0800	[thread overview]
Message-ID: <3213761c98e90d932973f5201efbd84556844042.camel@xry111.site> (raw)
In-Reply-To: <98295b42-c079-c32c-31d6-bb45013342ee@redhat.com>

On Mon, 2023-03-27 at 10:04 -0400, Carlos O'Donell wrote:

> In summary, I think this is a compiler problem

Definitely true.

> and that working around this in glibc
> is going to result in:
> 
> - Odd corner case ABI issues between public declarations of variadic functions and
>   internal non-variadic definitions.
> 
> - Poorer testing of #else code that uses variadic arguments, as the public interface
>   requires.
> 
> I don't support going in this direction.

Valid reasons.  Abandon this series then.

But I hope these could be raised earlier (in the discussion about
LoongArch syscall.S) so I wouldn't write all the code :).

> Is there an alternative that could generate better code that doesn't go this way?

For LoongArch I can improve GCC to save only the GARs containing the
arguments really used in va_arg (i.e. one GAR for things like open() or
fcntl() instead of all 8 GARs), but I guess the patch will be delayed
into GCC 14.

Generally I've not got an idea about how to make GCC avoid saving GARs
unnecessarily with va_arg.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-03-27 14:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 14:08 Xi Ruoyao
2023-03-25 14:08 ` [PATCH v2 1/5] linux: Add __ASSUME_SYSCALL_NAMED_WORKS to allow avoiding va_list for generic syscall Xi Ruoyao
2023-03-25 14:08 ` [PATCH v2 2/5] linux: [__ASSUME_SYSCALL_NAMED_WORKS] Avoid using va_list for various syscall wrappers Xi Ruoyao
2023-03-25 14:08 ` [PATCH v2 3/5] LoongArch: Define __ASSUME_SYSCALL_NAMED_WORKS for Linux Xi Ruoyao
2023-03-25 14:08 ` [PATCH v2 4/5] x86_64: " Xi Ruoyao
2023-03-25 14:08 ` [PATCH v2 5/5] aarch64: " Xi Ruoyao
2023-03-27 13:06   ` Adhemerval Zanella Netto
2023-03-27 13:32     ` Xi Ruoyao
2023-03-27 14:04 ` [PATCH v2 0/5] linux: Avoid va_list for generic syscall wrappers if possible Carlos O'Donell
2023-03-27 14:44   ` Xi Ruoyao [this message]
2023-03-27 14:45   ` Xi Ruoyao
2023-03-27 14:51     ` Xi Ruoyao
2023-04-04  1:25     ` caiyinyu
2023-04-04 12:12       ` Xi Ruoyao
2023-04-04 10:12 Wilco Dijkstra
2023-04-05 13:19 Wilco Dijkstra
2023-04-05 14:04 ` Adhemerval Zanella Netto
2023-04-07  7:31 ` caiyinyu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3213761c98e90d932973f5201efbd84556844042.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=carlos@redhat.com \
    --cc=fw@deneb.enyo.de \
    --cc=i@xen0n.name \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).