From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id ADB803865C2D for ; Thu, 20 Oct 2022 09:27:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ADB803865C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 152D3300089; Thu, 20 Oct 2022 09:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1666258060; bh=wSc7GsQVfWfQxciF0C3o8qc3GaZdVuMxvyAiY+Il5HY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=CgAdOi0wR3NmJfuskiUwkStmc2nPBif7r8Yuv1pQNClq19dpAsGPoh3xvoggF40SF ViDgKg0sp3kTXkha4TOc9whTgVWP2SHNHYpc9C63TSj/plQE015BSzb/fKzDO4ICw7 S7dqyidNNwf+BWRhraOsXhGX32SGYSfOrx7jhJyw= From: Tsukasa OI To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Cc: binutils@sourceware.org Subject: [PATCH 06/40] sim/cris: Move declarations of f_specific_init Date: Thu, 20 Oct 2022 09:25:52 +0000 Message-Id: <3904a5c3e80f8548150d8088a92059dd728c7ff8.1666257885.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,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: 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 declarations are manually added by the commit 4e6e8ba7c565 ("sim: cris: clean up missing func prototype warnings") as a hack and not a CGEN-generated part. 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. 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(+) 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) /* Hook function for per-cpu simulator initialization. */ +extern void MY (f_specific_init) (SIM_CPU *); + void MY (f_specific_init) (SIM_CPU *current_cpu) { -- 2.34.1