From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B8C373858C52 for ; Sun, 25 Dec 2022 19:29:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8C373858C52 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 621313410C4; Sun, 25 Dec 2022 19:29:40 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 3/8] sim: mips: hoist itable igen rules up to common builds Date: Sun, 25 Dec 2022 14:28:47 -0500 Message-Id: <20221225192852.1940-3-vapier@gentoo.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225192852.1940-1-vapier@gentoo.org> References: <20221225072831.18760-1-vapier@gentoo.org> <20221225192852.1940-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 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: Since this rule is pretty simple, hoist it up to the common build. --- sim/Makefile.in | 98 ++++++++++++++++++++++++++++++++------------ sim/mips/Makefile.in | 33 +-------------- sim/mips/local.mk | 52 +++++++++++++++++++++-- 3 files changed, 121 insertions(+), 62 deletions(-) diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in index 4cd596421190..187f574f2496 100644 --- a/sim/mips/Makefile.in +++ b/sim/mips/Makefile.in @@ -6,7 +6,6 @@ SIM_MIPS_IGEN_FLAGS = @SIM_MIPS_IGEN_FLAGS@ SIM_MIPS_M16_FLAGS = @SIM_MIPS_M16_FLAGS@ SIM_MIPS_GEN = @SIM_MIPS_GEN@ -SIM_MIPS_IGEN_ITABLE_FLAGS = @SIM_MIPS_IGEN_ITABLE_FLAGS@ SIM_MIPS_MULTI_IGEN_CONFIGS = @SIM_MIPS_MULTI_IGEN_CONFIGS@ SIM_MIPS_MULTI_SRC = @SIM_MIPS_MULTI_SRC@ SIM_MIPS_MULTI_OBJ = @SIM_MIPS_MULTI_OBJ@ @@ -64,8 +63,6 @@ SIM_EXTRA_CLEAN = clean-extra all: $(SIM_$(SIM_MIPS_GEN)_ALL) -SIM_EXTRA_DEPS = itable.h - ## COMMON_POST_CONFIG_FRAG IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all @@ -89,37 +86,10 @@ IGEN_INCLUDE=\ $(srcdir)/mips3264r2.igen \ $(srcdir)/mips3264r6.igen \ -# NB: Since these can be built by a number of generators, care -# must be taken to ensure that they are only dependant on -# one of those generators. -BUILT_SRC_FROM_IGEN_ITABLE = \ - itable.h \ - itable.c \ - SIM_IGEN_ALL = tmp-igen SIM_M16_ALL = tmp-m16 SIM_MULTI_ALL = tmp-multi -$(BUILT_SRC_FROM_IGEN_ITABLE): tmp-itable - -tmp-itable: $(IGEN_INSN) $(IGEN_DC) $(IGEN) $(IGEN_INCLUDE) - $(ECHO_IGEN) $(IGEN_RUN) \ - $(IGEN_TRACE) \ - -I $(srcdir) \ - -Werror \ - -Wnodiscard \ - -Wnowidth \ - -Wnounimplemented \ - $(SIM_MIPS_IGEN_ITABLE_FLAGS) \ - -G gen-direct-access \ - -G gen-zero-r0 \ - -i $(IGEN_INSN) \ - -n itable.h -ht itable.h \ - -n itable.c -t itable.c \ - # - $(SILENCE) touch $@ - - BUILT_SRC_FROM_IGEN = \ icache.h \ icache.c \ @@ -333,9 +303,8 @@ tmp-run-multi: $(srcdir)/m16run.c $(srcdir)/micromipsrun.c $(SILENCE) touch $@ clean-extra: - rm -f $(BUILT_SRC_FROM_IGEN_ITABLE) rm -f $(BUILT_SRC_FROM_IGEN) rm -f $(BUILT_SRC_FROM_M16) rm -f $(BUILT_SRC_FROM_MULTI) rm -f tmp-* - rm -f micromips16*.o micromips32*.o m16*.o m32*.o itable*.o + rm -f micromips16*.o micromips32*.o m16*.o m32*.o diff --git a/sim/mips/local.mk b/sim/mips/local.mk index 21a6f5cb56b1..beed8f28a169 100644 --- a/sim/mips/local.mk +++ b/sim/mips/local.mk @@ -24,11 +24,57 @@ noinst_PROGRAMS += %D%/run -## TODO: Delete this once mips igen rules move here from Makefile.in. -SIM_ALL_RECURSIVE_DEPS += $(IGEN) - %C%_SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)" +%C%_BUILT_SRC_FROM_IGEN_ITABLE = \ + %D%/itable.h \ + %D%/itable.c +%C%_BUILD_OUTPUTS = \ + $(%C%_BUILT_SRC_FROM_IGEN_ITABLE) \ + %D%/stamp-igen-itable + +## This makes sure build tools are available before building the arch-subdirs. +SIM_ALL_RECURSIVE_DEPS += $(%C%_BUILD_OUTPUTS) + +$(%C%_BUILT_SRC_FROM_IGEN_ITABLE): %D%/stamp-igen-itable + +%C%_IGEN_TRACE = # -G omit-line-numbers # -G trace-rule-selection -G trace-rule-rejection -G trace-entries # -G trace-all +%C%_IGEN_INSN = $(srcdir)/%D%/mips.igen +%C%_IGEN_INSN_INC = \ + %D%/dsp.igen \ + %D%/dsp2.igen \ + %D%/m16.igen \ + %D%/m16e.igen \ + %D%/mdmx.igen \ + %D%/micromipsdsp.igen \ + %D%/micromips.igen \ + %D%/mips3264r2.igen \ + %D%/mips3264r6.igen \ + %D%/mips3d.igen \ + %D%/sb1.igen \ + %D%/tx.igen \ + %D%/vr.igen + +## NB: Since these can be built by a number of generators, care +## must be taken to ensure that they are only dependant on +## one of those generators. +%D%/stamp-igen-itable: $(%C%_IGEN_INSN) $(%C%_IGEN_INSN_INC) $(IGEN) + $(AM_V_GEN)$(IGEN_RUN) \ + $(%C%_IGEN_TRACE) \ + -I $(srcdir)/%D% \ + -Werror \ + -Wnodiscard \ + -Wnowidth \ + -Wnounimplemented \ + $(SIM_MIPS_IGEN_ITABLE_FLAGS) \ + -G gen-direct-access \ + -G gen-zero-r0 \ + -i $(%C%_IGEN_INSN) \ + -n itable.h -ht %D%/itable.h \ + -n itable.c -t %D%/itable.c + $(AM_V_at)touch $@ + +MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS) ## These are created by mips/acinclude.m4 during configure time. DISTCLEANFILES += %D%/multi-include.h %D%/multi-run.c -- 2.39.0