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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 29982 invoked from network); 10 May 2023 14:28:21 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 10 May 2023 14:28:21 -0000 Received: (qmail 24086 invoked by uid 550); 10 May 2023 14:28:19 -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 24048 invoked from network); 10 May 2023 14:28:18 -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=aYFyuVDkwZokICItdV0RxImFp+hq9Chkwf/3K7S/JIc=; b=vfSPOJJz6lwssvUlrzhrsoQOLb4NmpkxUtnort0x9pSv2KLE04v4dAEb HSocp5kVc0vp/Pi7vkti4w7yRob3J8lVe7xAkg87+NQxds0u2htsX4SqM M6bPGXk3h8z8oSPk3v/hlS0kpwSAOPWj0lt/CbZTr06KQWNNJxdy+Uldg M=; Authentication-Results: mail3-relais-sop.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="55657404" Date: Wed, 10 May 2023 16:28:05 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com Message-ID: <20230510162805.60b48250@inria.fr> In-Reply-To: <20230504175357.43346100@inria.fr> References: <20230502155903.30bee099@inria.fr> <20230502232009.GT4163@brightrain.aerifal.cx> <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> 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_/kfFVu9fRv.DL7mu0a7BpdSt"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: [musl] stdbit.h --Sig_/kfFVu9fRv.DL7mu0a7BpdSt Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable now to the bit interfaces in the new header stdbit.h on Thu, 4 May 2023 17:53:57 +0200 you (J=E2=82=91=E2=82=99=E2=82=9B Gustedt ) wrote: > They are required for the three usual wide unsigned integer types. The > type-generic interface is supposed to work for all wide standard and > extended integer types (not including `_BitInt(N)` for weird `N`). So > the most natural here would be to add functions for the 128 bit > types. Also the generic code that just dispatches inline function > pointers is much easier and clearer. `_Generic` for function or macro > calls (in contrast to just function pointers) is much nastier, because > all branches must be valid C and should not drown us in > false-positives. So for the moment I kept it like that with inline function interfaces. To support the 128 bit types I did the following: - added internal interfaces that work with two 64 bit integers - added application side interfaces for `__int128` types - added application side interfaces for `_BitInt(128)` types The latter two are never part of musl itself, but only produced in the application as `static inline` interfaces that refer to the ones that work with two 64 bit numbers (and may tail call into these). So if the application compiler knows how to deal with `__int128` (very likely on 64 bit archs) or `_BitInt(128)` (very likely with C23 compilers) they can rely on the necessary infrastructor within musl, regardles with which compiler musl was compiled. 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_/kfFVu9fRv.DL7mu0a7BpdSt Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCZFup9gAKCRAP0+hp2tU3 4gVmAJ9Krh0000LHbU5oiRaAOEwsY8/K3wCfcsiQ9tZKnO5rId6HPbubIPrfEYY= =6qST -----END PGP SIGNATURE----- --Sig_/kfFVu9fRv.DL7mu0a7BpdSt--