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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21816 invoked from network); 2 Jun 2023 14:56:03 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 2 Jun 2023 14:56:03 -0000 Received: (qmail 27805 invoked by uid 550); 2 Jun 2023 14:56:00 -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 27773 invoked from network); 2 Jun 2023 14:56:00 -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=iOVO0LfUttEj4DcRJLhWveUtROSzCzDcW6X2lhLCfiU=; b=BZH2zu0xHDH7bzlcxL2nYriHCUYonFtnfMn4Pi6jVmqTboNORQ7+0D55 qQqEvc5gpA8isRi2h9sXdGMsh5fWqzJbXX3m9u4pUU7aNwePCN+ea6mh/ eCqRJvMC7gfvGEAjdA8yoP4NCVEVV1iLhTglv3eIJlfgIcPHdm+cQlXZY s=; 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="6.00,213,1681164000"; d="scan'208";a="57711577" Date: Fri, 2 Jun 2023 16:55:47 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com Message-ID: <20230602165547.4174f1cf@inria.fr> In-Reply-To: <20230602142936.GP4163@brightrain.aerifal.cx> References: <20230526203107.GN4163@brightrain.aerifal.cx> <20230526225119.4daa2815@inria.fr> <20230526210358.GQ4163@brightrain.aerifal.cx> <20230529091413.04bc8d85@inria.fr> <20230529154640.GT4163@brightrain.aerifal.cx> <20230529212155.583e2ab7@inria.fr> <20230530014822.GW4163@brightrain.aerifal.cx> <20230602142936.GP4163@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_/FcfiKUbupWfOeWgzwkVc5Z1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] [C23 printf 2/3] C23: implement the wN length specifiers for printf --Sig_/FcfiKUbupWfOeWgzwkVc5Z1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rich, on Fri, 2 Jun 2023 10:29:37 -0400 you (Rich Felker ) wrote: > ... > OK, some numbers. This alt version (with a couple bug fixes and > support for wf added), vs the full state machine version. On i386, > using this instead of the full state machine (which is still missing > 'wf') adds 246 bytes of .text but saves 440 bytes of .rodata. With wf > added, it will be even more of a win. So I think it makes more sense > to go with this version. Ok, sounds promissing. Some remarks - I'd still prefer to name the constant `WPRE` instead of `PLAIN` for documentation reasons. - It seems that your version doesn't capture the leading 0 case. That would still need an `if` condition that leads to `invalid`, I guess. > As an aside, since think the state table is the same for wide printf > as for normal, and since wide printf already depends on normal printf, > we could make the states table external (but hidden, of course) and > let wide printf reuse it, for some decent size savings and elimination > of source-level redundancy (DRY). Same holds for the `pop_arg` function, which is also repeated. 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_/FcfiKUbupWfOeWgzwkVc5Z1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCZHoC8wAKCRAP0+hp2tU3 4qlOAKCWasi4+Nt9aRbobxiGJhXspOQBPQCgle4dQzjJ9LjpUqqLLrxD1oh79Rs= =M8N4 -----END PGP SIGNATURE----- --Sig_/FcfiKUbupWfOeWgzwkVc5Z1--