From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 9628F3858007; Wed, 3 Nov 2021 05:20:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9628F3858007 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: mloop: mark a few conditionally used funcs as unused X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 359c74415c2b78bf2b2be3bd3e013d78f298350d X-Git-Newrev: 3a275541049f295719782642fb8aa912b0a4a0d3 Message-Id: <20211103052018.9628F3858007@sourceware.org> Date: Wed, 3 Nov 2021 05:20:18 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2021 05:20:18 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3a275541049f295719782642fb8aa912b0a4a0d3 commit 3a275541049f295719782642fb8aa912b0a4a0d3 Author: Mike Frysinger Date: Wed Nov 3 01:17:17 2021 -0400 sim: mloop: mark a few conditionally used funcs as unused These are marked inline, so building w/gcc at higher optimization levels will automatically discard them. But building with -O0 will trigger unused function warnings, so fix that. The common before/after cover functions in the common mloop generator are not used by all architecture ports. Doesn't seem to be a hard requirement, so marking them optional (i.e. unused) is fine. The cris execute function is conditionally used depending on the fast-build mode settings, so mark it unused too. Diff: --- sim/common/genmloop.sh | 4 ++-- sim/cris/mloop.in | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh index 572dc8a9ed4..b8a0f435a09 100755 --- a/sim/common/genmloop.sh +++ b/sim/common/genmloop.sh @@ -349,7 +349,7 @@ static INLINE void This is as opposed to x-after which is only emitted at the end of a group of parallel insns. */ -static INLINE void +ATTRIBUTE_UNUSED static INLINE void @prefix@_emit_before (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc, int first_p) { ARGBUF *abuf = &sc[0].argbuf; @@ -364,7 +364,7 @@ static INLINE void x-after is emitted after a serial insn or at the end of a group of parallel insns. */ -static INLINE void +ATTRIBUTE_UNUSED static INLINE void @prefix@_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc) { ARGBUF *abuf = &sc[0].argbuf; diff --git a/sim/cris/mloop.in b/sim/cris/mloop.in index 645d8211606..da800e745af 100644 --- a/sim/cris/mloop.in +++ b/sim/cris/mloop.in @@ -67,7 +67,8 @@ extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf, return id; } -static INLINE SEM_PC +/* This might not be used directly depending on the fast compile mode. */ +ATTRIBUTE_UNUSED static INLINE SEM_PC execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p) { SEM_PC vpc;