From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Jbg2F5KkDGIvKAAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 02:15:30 -0500 Received: by simark.ca (Postfix, from userid 112) id 4F7FE1F3C9; Wed, 16 Feb 2022 02:15:30 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DD2741F0BB for ; Wed, 16 Feb 2022 02:15:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65A9C385803D for ; Wed, 16 Feb 2022 07:15:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65A9C385803D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644995729; bh=R+4PwKNVTQKnQumnNo0NPOE150F38t0fjZyfZn/LtuM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wRZt9v0nYv8rZZV1WQ17WaW6v4J/3k9/KiFocEBWt2pFLBplw9mk6CV2BwxXtE4T5 1sAzE+8kGNYbYMiEjd3bUVp+ztW3YFlZc5enWAGYrkcccaECX/p7/zTU6amJ/tIXld OHwhjhTjJNplIUKcFlEQgQhAOZpB5o/mdlqhzMxk= Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id ED88E3858D37 for ; Wed, 16 Feb 2022 07:15:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED88E3858D37 Received: by smtp.gentoo.org (Postfix, from userid 559) id B0D65342DA7; Wed, 16 Feb 2022 07:15:07 +0000 (UTC) Date: Wed, 16 Feb 2022 02:15:05 -0500 To: Hans-Peter Nilsson Subject: Re: [PATCH 08/12] sim cris: Unbreak --disable-sim-hardware builds Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230512.7B80720439@pchp3.se.axis.com> <20220216055419.AC9A020411@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Kva1UF6/Z47KCEiN" Content-Disposition: inline In-Reply-To: <20220216055419.AC9A020411@pchp3.se.axis.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --Kva1UF6/Z47KCEiN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 16 Feb 2022 06:54, Hans-Peter Nilsson wrote: > Date: Tue, 15 Feb 2022 23:51:16 -0500 Mike Frysinger > > On 15 Feb 2022 00:05, Hans-Peter Nilsson via Gdb-patches wrote: > > > +#if WITH_HW > > > if (cris_have_900000xxif) > > > sim_hw_parse (sd, "/core/%s/reg %#x %i", "cris_900000xx", 0x9000= 0000, 0x100); > > > +#else > > > + /* With the option disabled, nothing should be able to set this va= riable. > > > + We should "use" it, though, and why not assert that it isn't se= t. */ > > > + ASSERT (! cris_have_900000xxif); > > > +#endif > >=20 > > WITH_HW is always defined to either 1 or 0. could you write: > > if (WITH_HW) > > ... > > else > > ... > >=20 > > this avoids bit rot in the uncommon configure paths >=20 > I don't think that's a good idea, because then we'd rely on > the sim_hw_parse reference go away at *all* optimization > levels. we prob should rework the sim-hw module a bit to handle this scenario. oth= er modules (like sim-profile) handle this internally. basically we should have a stable API regardless of configure settings. then we wouldn't rely on DCE kicking in all the time. -mike --Kva1UF6/Z47KCEiN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMpHkACgkQQWM7n+g3 9YFFMRAAqAqX3Ge0xGpVtjJhANVSLR3JeivOfD8RSR6bvY7g9c1VZ96KA197DtDs p1BaJE41/Gw9hrVEyi6RP7BNL4byx5SVW8EwJZiUi5BmIE7Ji7B/QvIHegWd8dYz 3I8vmxMagaacR/GpxO8jN+r9OGKRR69W13TvhFQyt7CRjb8xGPmYWZW8hG8rkvBI 2RVEb+GjIeL3oSdOFNlLrYhk4u1z9VmC/C5LGhX0uRbMdKlHpjU4X187ZG11yAYQ CV+vOANOw8XVtIfPMtuEZ7nX/sIyqP5jwIEoHx//ME4rC9FluTmkb1MTJHRuFFNm wNeLKcWB8EOWxvOpWntlkpq+E3PLxyVmip/CPX45Z/pXdmuxwH74MSCmYGYBaogg BJzn5tRTQ+fb8dueGicEhFHxWDiEnlVCKAGJcC5Z6kRVfW6E2Yd8W4xWq0dJACZ9 NW4RTOYc/3Tm7FkIGUbgujwaCYX3yQ4EKCmBjWti47LbnznKaer9HlW5fhCAC2Jk AS8QUfh4DJESmlOdvbfWcphE6ZaYeFrrjCl7MuWYtXQJzzNBI/b+DqJNGZNyAKn8 Hkwnztws+aNLMYHjqi4S9QjrEf3SgjjOtGOTZVAyWVHIhOUB9klWlCisXUWivE1a u91h88QSnOGwJtj7uq/bxP6FfIwg3t/BTEcIpnDZscjd3JVVS0Q= =jK0j -----END PGP SIGNATURE----- --Kva1UF6/Z47KCEiN--