public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Xi Ruoyao <xry111@xry111.site>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>,
	"caiyinyu@loongson.cn" <caiyinyu@loongson.cn>
Subject: Re: [PATCH v2 0/5] linux: Avoid va_list for generic syscall wrappers if possible
Date: Wed, 5 Apr 2023 13:19:29 +0000	[thread overview]
Message-ID: <PAWPR08MB89822CB484CCE39EFD7FFD4183909@PAWPR08MB8982.eurprd08.prod.outlook.com> (raw)

Hi,

> Maybe we can use a custom C implementation (like RISC-V) as well.  But
> strictly speaking the RISC-V syscall.c is invoking undefined behavior
> (like my proposal) so I agree with assembly here.

How does assembly code not invoke the exact same undefined behaviour?
In both cases you rely on variable arguments being passed in the same
way as integer args - this is true in many ABIs. The goal is to avoid introducing
unnecessary assembly and use generic implementations where possible.

So if that C version works as well as assembler on LoongArch and assuming
that bare syscall() performance is essential, then why not use it?

Cheers,
Wilco

             reply	other threads:[~2023-04-05 13:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 13:19 Wilco Dijkstra [this message]
2023-04-05 14:04 ` Adhemerval Zanella Netto
2023-04-07  7:31 ` caiyinyu
  -- strict thread matches above, loose matches on Subject: below --
2023-04-04 10:12 Wilco Dijkstra
2023-03-25 14:08 Xi Ruoyao
2023-03-27 14:04 ` 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=PAWPR08MB89822CB484CCE39EFD7FFD4183909@PAWPR08MB8982.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=caiyinyu@loongson.cn \
    --cc=libc-alpha@sourceware.org \
    --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).