From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 775853858CDA for ; Fri, 24 Mar 2023 10:36:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 775853858CDA Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1679654211; bh=MFo81P6LLIkUGMozcS8JyLw7SnVXxDm+vRkzdP/i+ds=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=GWOJ02wzJZOiHrwEgKgAL1CHm3tpwLFD3Eib0+UHBaLx7yH10pyOd14craQqaNl9t 1Z2YIwFM5565tNvMBd0DsdUcDTzmv3IXHffXhDrR9OAK6jhSHlu4ISPy55LSab/cfl sgpXD139W94FgiRTglvDrD+MHeI6FbzRDgmKPd94= Received: from [IPv6:2408:8471:1010:525f:49d1:966f:19a1:bf95] (unknown [IPv6:2408:8471:1010:525f:49d1:966f:19a1:bf95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 152DE65C45; Fri, 24 Mar 2023 06:36:47 -0400 (EDT) Message-ID: <30790befdca73a5224b5a9a4491821e33cccc771.camel@xry111.site> Subject: Re: [PATCH] linux: Allow avoiding va_list for generic syscall and use it for LoongArch From: Xi Ruoyao To: Florian Weimer , Xi Ruoyao via Libc-alpha Cc: caiyinyu , Wang Xuerui , Adhemerval Zanella Netto , Andreas Schwab Date: Fri, 24 Mar 2023 18:36:32 +0800 In-Reply-To: <87mt424h0y.fsf@mid.deneb.enyo.de> References: <20230324072745.4138-1-xry111@xry111.site> <87mt424h0y.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 2023-03-24 at 10:47 +0100, Florian Weimer wrote: > * Xi Ruoyao via Libc-alpha: >=20 > > Currently GCC generates highly sub-optimal code on architectures > > where > > the calling convention prefers registers for arugment passing.=C2=A0 Th= is > > is >=20 > Typo: ar[gu]ment >=20 > > LoongArch is benefited from this (saving about 430 CPU cycles per > > syscall, though I won't call it a significant improvement because > > syscall is "slow" in nature).=C2=A0 And in the future we may switch mor= e > > ports to use the generic syscall without a performance regression, > > reducing the number of target-specific syscall.{c,S} files we need > > to > > maintain. >=20 > Does this impact the open* and fcntl* wrappers as well? Yes, on LoongArch all GARs are saved :(. I'll see if it's possible to avoid using va_list for them too. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University