From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org 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 From: Mike Frysinger To: Tsukasa OI Cc: Andrew Burgess , Nick Clifton , gdb-patches@sourceware.org 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-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --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--