From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29464 invoked from network); 10 May 2023 14:18:11 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 10 May 2023 14:18:11 -0000 Received: (qmail 9352 invoked by uid 550); 10 May 2023 14:18:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 9311 invoked from network); 10 May 2023 14:18:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version; bh=hsCHmhnBbmwe6bk9gk6uZqkMMX+0erSF1T27N1YrUzQ=; b=dgwe8K1o1CXG0WgOvGNqrfQedQ4SVWh6R3ISsckvAIXvqZWCNE7kYLjR vgGrn1qgBmTrIpWbECZRNzFEw7P36U0k93ImE5hnsa0NTw2EjsUctxZKs /g/KhDCxcdk12maqXuenO9uzAnkgrL1f9J5i3jngPIEzPR514Egc9yZuq 4=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.99,264,1677538800"; d="scan'208";a="107279703" Date: Wed, 10 May 2023 16:17:52 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com Message-ID: <20230510161752.52270e0e@inria.fr> In-Reply-To: <20230504161451.GE4163@brightrain.aerifal.cx> References: <20230503000045.GU4163@brightrain.aerifal.cx> <20230503111246.00ba409e@inria.fr> <20230503141619.GW4163@brightrain.aerifal.cx> <20230503171111.15092dbb@inria.fr> <20230503172802.GY4163@brightrain.aerifal.cx> <20230503204656.152f59b8@inria.fr> <20230503193325.GZ4163@brightrain.aerifal.cx> <20230504084846.3f8152d7@inria.fr> <20230504143052.GB4163@brightrain.aerifal.cx> <20230504175357.43346100@inria.fr> <20230504161451.GE4163@brightrain.aerifal.cx> Organization: inria.fr X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Ma=AN.iOfO8.Oxo..RXDQtu"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] patches for C23 --Sig_/Ma=AN.iOfO8.Oxo..RXDQtu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, there is a new version for these patches at https://icube-forge.unistra.fr/icps/musl/-/network/master?extended_= sha1=3Dc23-v4 I tried to integrate the feedback that I had so far (Thanks!) in particular concerning the support for 128 bit integer types. It should now be that this support, as far as needed and interfaced by musl, is unconditional. on Thu, 4 May 2023 12:14:52 -0400 you (Rich Felker ) wrote: > I don't expect you do to this work for us. It's something myself or > anyone else working on musl stuff can do and that your patches can > just assume is already present in musl by a name like __pop_arg_int128 > or something. Ok, this should work now. The emulation code is found in uwide128.h and uwide128.c and this function, that has to be provided in asm is called `__uwide128_pop`. If the compiler used to compile musl implements the `__int128` types, these types are used, there is no reason to waste the knowledge that was put over the years into this compiler support. Under this condition, `__uwide128_pop` is also produced and just has to be generated with -S and extracted from the asm file. It is then easy to clean that up a bit, make the symbol weak and to provide the .s file for the architecture, much as you indicated, Rich. > __intscan only needs mul, not div, and mul is the easy side. It's > printf that needs div, and 10 is the only non-power-of-two base there. Well actually both only need mul and div with small numbers, so the code complexity is about the same for both operations, here. But for the whole we need also comparison, addition, subtraction, negation, zero-test and conversion back and forth. So in all it was a bit more complex than I thought. > In the case of __intscan, I'd just change the signature to return an > int128 tuple struct, and switch to using it when the value no longer > fits in smaller type. The "lim" argument mechanism needs some change > too I think. Actually not much, only that one has to watch that the min values for signed types get sign extended when converted to the structure. I'll comment on the bit operations in stdbit.h as a reply to a separate mail. Thanks J=E2=82=91=E2=82=99=E2=82=9B --=20 :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Universit=C3=A9 de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: =E2=98=8E +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/Ma=AN.iOfO8.Oxo..RXDQtu Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCZFunkAAKCRAP0+hp2tU3 4q+5AJ9btWINfzzHWGDLJ9mwBPBOtj+IYgCgiezbV/SwX0EUvsY5ffrNngUPfpc= =pMqb -----END PGP SIGNATURE----- --Sig_/Ma=AN.iOfO8.Oxo..RXDQtu--