From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QLCKIPR0d2CUXgAAWB0awg (envelope-from ) for ; Wed, 14 Apr 2021 19:04:20 -0400 Received: by simark.ca (Postfix, from userid 112) id 83EBF1F10C; Wed, 14 Apr 2021 19:04:20 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C8AE21F0FE for ; Wed, 14 Apr 2021 19:04:18 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 26F5E384803E; Wed, 14 Apr 2021 23:04:17 +0000 (GMT) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2607:f138:0:13::2]) by sourceware.org (Postfix) with ESMTPS id 0C873385480E for ; Wed, 14 Apr 2021 23:04:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0C873385480E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=jhb@FreeBSD.org Received: from ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0EF951A84C51; Wed, 14 Apr 2021 19:04:09 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 2/5] sim frv: Add a missing return value for frvbf_check_acc_range. Date: Wed, 14 Apr 2021 16:02:56 -0700 Message-Id: <20210414230259.19234-3-jhb@FreeBSD.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210414230259.19234-1-jhb@FreeBSD.org> References: <20210414230259.19234-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Wed, 14 Apr 2021 19:04:10 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Claim that the accumulator indices are out of range without raising an exception if the CPU doesn't support media instructions. sim/frv/ChangeLog: * traps.c (frvbf_check_acc_range): Add missing return value. --- sim/frv/ChangeLog | 4 ++++ sim/frv/traps.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 1ec05977f69..81f5621250a 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2021-04-14 John Baldwin + + * traps.c (frvbf_check_acc_range): Add missing return value. + 2021-04-12 Mike Frysinger * sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all. diff --git a/sim/frv/traps.c b/sim/frv/traps.c index c0ed9b1c49f..5e6a4d06ef4 100644 --- a/sim/frv/traps.c +++ b/sim/frv/traps.c @@ -742,7 +742,7 @@ frvbf_check_acc_range (SIM_CPU *current_cpu, SI regno) /* Only applicable to fr550 */ SIM_DESC sd = CPU_STATE (current_cpu); if (STATE_ARCHITECTURE (sd)->mach != bfd_mach_fr550) - return; + return 0; /* On the fr550, media insns in slots 0 and 2 can only access accumulators acc0-acc3. Insns in slots 1 and 3 can only access -- 2.30.1