From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +H2sB4RgVWN2ww8AWB0awg (envelope-from ) for ; Sun, 23 Oct 2022 11:40:52 -0400 Received: by simark.ca (Postfix, from userid 112) id 0C2C61E112; Sun, 23 Oct 2022 11:40:52 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Y2cXjEgi; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 9588A1E0D3 for ; Sun, 23 Oct 2022 11:40:51 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9E103858C2C for ; Sun, 23 Oct 2022 15:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9E103858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666539651; bh=5jhuficBCgj4gHavAxZBiSxt8caVMOrSgTRKoxOyouI=; 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=Y2cXjEgibtRU9U5hZ4aLB/iKKRgqIzGsFfLnRuEdVkFGtKe//une9KwAroBR2K4AG 0Q0kkO4V5HBkSx1PfLAFNfspXKOD9/363drS5jgNy0dyaWYVBPDNVzWuA7sAyFE9uq dkaJs/+80JIR7du43ICf02f3OUbiFF7cbT3+PGz0= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 279963858D1E for ; Sun, 23 Oct 2022 15:40:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 279963858D1E Received: by smtp.gentoo.org (Postfix, from userid 559) id 63AB23410BF; Sun, 23 Oct 2022 15:40:29 +0000 (UTC) Date: Sun, 23 Oct 2022 20:11:03 +0545 To: Tsukasa OI Subject: Re: [PATCH 06/40] sim/cris: Move declarations of f_specific_init Message-ID: Mail-Followup-To: Tsukasa OI , Andrew Burgess , Nick Clifton , gdb-patches@sourceware.org References: <3904a5c3e80f8548150d8088a92059dd728c7ff8.1666258361.git.research_trasio@irq.a4lg.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0M732lzmnwnxItKi" Content-Disposition: inline In-Reply-To: <3904a5c3e80f8548150d8088a92059dd728c7ff8.1666258361.git.research_trasio@irq.a4lg.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: Nick Clifton , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --0M732lzmnwnxItKi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 20 Oct 2022 09:32, Tsukasa OI wrote: > Declarations for MY (f_specific_init) functions are defined in CGEN- > generated header files: sim/cris/decodev10.h (crisv10f_specific_init) and > sim/cris/decodev32.h (crisv32f_specific_init). However, those declaratio= ns > are manually added by the commit 4e6e8ba7c565 ("sim: cris: clean up missi= ng > func prototype warnings") as a hack and not a CGEN-generated part. >=20 > Those definitions are required by $(builddir)/sim/cris/mloopv{10,32}f.c, > generated from $(srcdir)/sim/cris/mloop.in. If we define a declaration in > mloop.in, we no longer need manually added one. >=20 > This commit adds a template for function declaration so that we no longer > have to touch CGEN-generated code. With this and the previous commit > "cpu/cris: Add stall unit to CRIS v32", we can now safely regenerate > CRIS CPU declarations with CGEN. > --- > sim/cris/cris-tmpl.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sim/cris/cris-tmpl.c b/sim/cris/cris-tmpl.c > index 9f0c06e755e..8694d38b2af 100644 > --- a/sim/cris/cris-tmpl.c > +++ b/sim/cris/cris-tmpl.c > @@ -264,6 +264,8 @@ MY (make_thread_cpu_data) (SIM_CPU *current_cpu, void= *context) > =20 > /* Hook function for per-cpu simulator initialization. */ > =20 > +extern void MY (f_specific_init) (SIM_CPU *); > + > void > MY (f_specific_init) (SIM_CPU *current_cpu) > { putting the prototype here means function definition & function usage can f= all out of sync and not get any compile error. that's why it has to be in a he= ader that both places include. cris uses cris-sim.h for non-standard funcs like this (e.g. break_handler),= so the specific_init prototypes should be moved there too. -mike --0M732lzmnwnxItKi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmNVTvsACgkQQWM7n+g3 9YFgHRAAszbppJ5ev9r/gdB+iYq2DZYNTQWs0WM+yguR65HxTZQikUVKHBAgcN4U ySpdGOoDa0zrKHy3WsqsmIk6RzHbBFKe5ZVN5l6SXYsS5De1yLo88kNc901Y3+Fx T6pRDxrccelwMlXXG4W7hWLBwdOxVFQ3sChOtP3kAmKPOoIBvvi+jKiZ3iOOM2Uo qDZtKaDLp9Tnx7Lac8qYISFH1aHShtrdOwiPa/hGcHsV7kPx+zx9zAu7Dc/+Ic7Y DaEqLbHreHWbLiwV0ElbZ5PCa0xUabAFPKIA3DODd4Vk+PTsX+v3vj08GAyEsxy4 BCJmMdjTkxETYXr9L0glRKeo0ead4hFpf5GLX48zChRw72Ja/7JfmLutmIskns31 tGBHZoi/07j8jK4X9AELFFFMG7Wc1OmuFq2UPfStLx5KMotYAW88aTsSpLx2Xj+g YevNWdmRrQ8mrPVtAx3fa9vzt/VdeI/0vcF5Rv2XvhERSERcT+B3btr7IWhN6Fmw aK5HnzAubaIbSo7tyjntG1OMkn8/XTXaRNjbAuetKfhsfqEKeQbPVEo8IRxYkOyc yZ/59ilzV3gFpahnAwahWb6p7kBKeCR5gSVKtjYWI+joXnZ2VMF4nua3cAzHXdAV I6oPyUChxyOQJGRiuB9NCOBYahiR7SWz/yt45334ipd2LSpaFC8= =lie5 -----END PGP SIGNATURE----- --0M732lzmnwnxItKi--