From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 1C98B3858D33 for ; Fri, 22 Dec 2023 19:58:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C98B3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C98B3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703275092; cv=none; b=WCx+Q39dcVHmijlxCfOfcKeLQVzdRKIDSSce28LRP1h6Mxc2dc2KyfZHWWRhN0yrgQojSIs1QTfyRwuWvwAA7pccBxsbx8nCYd6sQJ0UGYPfBKDMkPts8oa6DOU7lriE6nTWUmfy0lWpmAoZpDzbPpS5m2slwki7Q19wA8H0dKU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703275092; c=relaxed/simple; bh=n2YrjdO0e/5K9e24wwxCWRdW9bMDrXWZxQBDl4pLrw4=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=t39zFDVYyjkifFZhiBRVsoGxD3tBVg6kcQ41y5BUIY7Sz4flMHQ+AuFUuLuGrWJwkwgAweyVcX4ZLkO7fJgHjGllMcYqvRsm7PuYD71xfWoZzc9SYo6shqiHWsOclbMW1aimb7WW568TjCP37iRuhlaf5ik48FvUmNbNwcMbNNs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id A5E6F342FFA; Fri, 22 Dec 2023 19:58:10 +0000 (UTC) Date: Fri, 22 Dec 2023 14:58:08 -0500 From: Mike Frysinger To: "Jose E. Marchesi" Cc: Mike Frysinger via Cgen Subject: Re: [PATCH] sim: tighten up generated decode tables Message-ID: References: <20231222010028.17297-1-vapier@gentoo.org> <87sf3upkub.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9tPH/UPymWNR5bVb" Content-Disposition: inline In-Reply-To: <87sf3upkub.fsf@gnu.org> X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: --9tPH/UPymWNR5bVb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 22 Dec 2023 11:55, Jose E. Marchesi wrote: > > The use of /* fall through */ with consective case statements doesn't > > really add any value, and when generating large files, can take up a > > lot of space. In the case of cris, it alone adds ~20k, or ~10%. >=20 > I am a little concern this change may trigger implicit-fallthrough > warnings when compiling the generated code. Not sure this is a problem > in practice though, since nor binutils nor sim uses > -Wimplicit-fallthrough for building as far as I can see. pretty sure compilers don't warn about consecutive case statements that don't have any non-case code inbetween. so we're talking about: case 11: case 12: case 13: case 14: itype =3D CRISV10F_INSN_ADDOQ; goto extract_sfmt_addoq; since this is a very common scenario, compilers accept it without warning. if you did something like: case 13: printf(""); case 14: itype =3D CRISV10F_INSN_ADDOQ; goto extract_sfmt_addoq; then it'd warn. i'm actually enabling -Wimplicit-fallthrough in sim now and none of these trigger warnings. -mike --9tPH/UPymWNR5bVb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWF6lAACgkQQWM7n+g3 9YGAvBAAg5OU5mxBvxKYTo3SbK19AahWfrxncMBVcsSjYiZZeP1xCyzTmQ4KLXCs +wO7ZRCyGZWTTUTogi0bXOhfJSJ1d4jYJgSn+MlHXNBEl4SnWoy7he1eEWjYtr4Z TmICDP6rVnyEyMxpigs03LVkkgD87bdlsU1JcsMM+AIM3zIYVhOFOnXy42gF3zT3 47p4Ls2U8Joow4lSYx0/9e0VVpizG8OsyP5hm5zI+F0cG8PoAA2tlE4hirsHyjk+ mryLbHp44LVBx7F7I58HXpjqDadPTlqkGsXiaYUMA8pmnk2+StWbrzPYf7pZZxa1 /Y145yudBM6ZpwV2AKpcOhBzyI2mbovwG/xtmsnechsViWZnrkCk6FVIhVbeLEdX iHbT6NsHAAmIPXOKoWFypFlwOeC24u2toK2qrLr4SWvscXXsL2OSGaYxunrnOVd9 PmVu9Fp3wfp8sWDFR4yp+v1Egw9cFQOm3U8lOIQvIFZQKAnhKioLTvXbjfY9eltd uYXzlkEUYHMqlMCkO1FnjxguadM4g4AM2svq+mvYBAke5nr8KNKMU0K+cr4nkG27 AvXNAUVK2Tcn7dRhe6ra9FjFnQzv189pAI4tnmPp4DOoKT+XPcpAT7TFCPtSsp1I ksZdkhPEW/6WX0yNjlLvXP2t8eroBRK6SAToasDSezXxazm/nzc= =h2QZ -----END PGP SIGNATURE----- --9tPH/UPymWNR5bVb--