From patchwork Thu Dec 21 06:21:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82627 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C7713861890 for ; Thu, 21 Dec 2023 06:21:19 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 3E11D3858404 for ; Thu, 21 Dec 2023 06:21:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3E11D3858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3E11D3858404 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703139667; cv=none; b=e+j4jnO/0BqeAntXxJq2k9v0KV6HUmy/r0DWzAiMxith2WGPPJ06ToVQNdS72sXPHo/klWEX+0CeBp2h0NHBF1MxSiJlMqL+9iZxs/Otr3XQD7qTVrzsLGm+gOUhWKXtoJyBilJDoIELTJTrEs04CTSZIOKcQ24h4aS1d8rSZCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703139667; c=relaxed/simple; bh=J+WODHoOuFUY0rls6fWh58J3S8pjpIAKBOoE6ajuS48=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=JV3kInNTM3rtcnL/qusENRA3+eheTNAL0R+6ZGDFwCX7zNNmiPKniEWRmdfOhMUWlX8rgXtaUNGGP2ewayByRHB2G6KpA2toPOz58ibEDp0grKc0oKYcaPfbEHDLepVScaE7A9/l6kG9nZuWCXB6mWFcE1GnfqYe7gsp3YVcjEc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 7C9BF340943; Thu, 21 Dec 2023 06:21:05 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: ppc: mark halt & restart funcs as noreturn Date: Thu, 21 Dec 2023 01:21:03 -0500 Message-ID: <20231221062103.29043-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This helps the compiler with optimization and fixes fallthru warnings. --- sim/ppc/cpu.h | 6 +++--- sim/ppc/psim.c | 2 +- sim/ppc/psim.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sim/ppc/cpu.h b/sim/ppc/cpu.h index c7a087112710..dfd2244766c1 100644 --- a/sim/ppc/cpu.h +++ b/sim/ppc/cpu.h @@ -100,21 +100,21 @@ INLINE_CPU\ INLINE_CPU\ (void) cpu_restart (cpu *processor, - unsigned_word nia); + unsigned_word nia) ATTRIBUTE_NORETURN; INLINE_CPU\ (void) cpu_halt (cpu *processor, unsigned_word nia, stop_reason reason, - int signal); + int signal) ATTRIBUTE_NORETURN; EXTERN_CPU\ (void) cpu_error (cpu *processor, unsigned_word cia, const char *fmt, - ...) ATTRIBUTE_PRINTF_3; + ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_3; /* The processors local concept of time */ diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c index 2a823616faea..a08d38914eaf 100644 --- a/sim/ppc/psim.c +++ b/sim/ppc/psim.c @@ -578,7 +578,7 @@ psim_restart(psim *system, } -static void +static ATTRIBUTE_NORETURN void cntrl_c_simulation(void *data) { psim *system = data; diff --git a/sim/ppc/psim.h b/sim/ppc/psim.h index 2070cbf7b903..6ed91cd98363 100644 --- a/sim/ppc/psim.h +++ b/sim/ppc/psim.h @@ -93,7 +93,7 @@ extern void psim_run extern void psim_restart (psim *system, - int cpu_nr); + int cpu_nr) ATTRIBUTE_NORETURN; extern void psim_set_halt_and_restart (psim *system, @@ -110,7 +110,7 @@ extern void psim_halt (psim *system, int cpu_nr, stop_reason reason, - int signal); + int signal) ATTRIBUTE_NORETURN; extern int psim_last_cpu (psim *system);