From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Xi Ruoyao <xry111@xry111.site>, libc-alpha@sourceware.org
Cc: caiyinyu <caiyinyu@loongson.cn>, Wang Xuerui <i@xen0n.name>,
Andreas Schwab <schwab@suse.de>,
Florian Weimer <fw@deneb.enyo.de>
Subject: Re: [PATCH v2 5/5] aarch64: Define __ASSUME_SYSCALL_NAMED_WORKS for Linux
Date: Mon, 27 Mar 2023 10:06:26 -0300 [thread overview]
Message-ID: <479c6860-7c34-4baf-aec9-8eafb310b879@linaro.org> (raw)
In-Reply-To: <20230325140815.4170296-6-xry111@xry111.site>
On 25/03/23 11:08, Xi Ruoyao wrote:
> AAPCS treats the variable arguments same as named ones, and when each
> argument is an integer not wider than 8 bytes, the ith argument is in
> register xi (0 <= i < 8), or the stack slot at (sp + 8 * (i - 8))
> (i >= 8) no matter how many arguments are passed. So we can define
> __ASSUME_SYSCALL_NAMED_WORKS to avoid unnecessary stack stores in the
> syscall wrappers caused by va_start.
This triggered a build failure on i686 patchwork buildbot [1].
[1] https://www.delorie.com/trybots/32bit/18431/
> ---
> sysdeps/unix/sysv/linux/aarch64/kernel-features.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/kernel-features.h b/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
> index 3546f6de96..c39ff39da2 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/kernel-features.h
> @@ -21,3 +21,12 @@
>
> #undef __ASSUME_CLONE_DEFAULT
> #define __ASSUME_CLONE_BACKWARDS 1
> +
> +/* Define this if the calling convention for passing x named arguments and y
> + variable arguments is same as passing (x + y) named arguments, while each
> + argument is either an integer of which the width is less than or equal to
> + "long", or a pointer; and an argument can be fetched from the same register
> + or the same offset from the stack pointer no matter how many (maybe zero)
> + arguments are passed after it. It avoids useless stack stores caused by
> + usage of va_start. */
> +#define __ASSUME_SYSCALL_NAMED_WORKS 1
next prev parent reply other threads:[~2023-03-27 13:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 14:08 [PATCH v2 0/5] linux: Avoid va_list for generic syscall wrappers if possible 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 [this message]
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
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
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=479c6860-7c34-4baf-aec9-8eafb310b879@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=fw@deneb.enyo.de \
--cc=i@xen0n.name \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
--cc=xry111@xry111.site \
/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).