From nobody Fri Nov 7 18:50:30 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 154842326547443.13989085164212; Fri, 25 Jan 2019 05:34:25 -0800 (PST) Received: from localhost ([127.0.0.1]:44676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn1cc-00045g-TK for importer@patchew.org; Fri, 25 Jan 2019 08:34:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn1aJ-0002lP-Ru for qemu-devel@nongnu.org; Fri, 25 Jan 2019 08:31:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn1aI-0002XS-MI for qemu-devel@nongnu.org; Fri, 25 Jan 2019 08:31:51 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:36394 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gn1aI-0002WB-Bo for qemu-devel@nongnu.org; Fri, 25 Jan 2019 08:31:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 70A741A22D0; Fri, 25 Jan 2019 14:31:47 +0100 (CET) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id F3E4B1A23E2; Fri, 25 Jan 2019 14:31:46 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:31:31 +0100 Message-Id: <1548423098-31864-8-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548423098-31864-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1548423098-31864-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PULL 07/14] target/mips: nanoMIPS: Fix branch handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Stefan Markovic Fix nanoMIPS branch handling. Reviewed-by: Aleksandar Rikalo Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index aaf7dff..e9b5d1d 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -19758,6 +19758,10 @@ static void gen_compute_imm_branch(DisasContext *c= tx, uint32_t opc, goto out; } =20 + /* branch completion */ + clear_branch_hflags(ctx); + ctx->base.is_jmp =3D DISAS_NORETURN; + if (bcond_compute =3D=3D 0) { /* Uncoditional compact branch */ gen_goto_tb(ctx, 0, ctx->btarget); @@ -19798,6 +19802,10 @@ static void gen_compute_nanomips_pbalrsc_branch(Di= sasContext *ctx, int rs, tcg_gen_movi_tl(t1, ctx->base.pc_next + 4); gen_op_addr_add(ctx, btarget, t1, t0); =20 + /* branch completion */ + clear_branch_hflags(ctx); + ctx->base.is_jmp =3D DISAS_NORETURN; + /* unconditional branch to register */ tcg_gen_mov_tl(cpu_PC, btarget); tcg_gen_lookup_and_goto_ptr(); @@ -19936,6 +19944,10 @@ static void gen_compute_compact_branch_nm(DisasCon= text *ctx, uint32_t opc, goto out; } =20 + /* branch completion */ + clear_branch_hflags(ctx); + ctx->base.is_jmp =3D DISAS_NORETURN; + /* Generating branch here as compact branches don't have delay slo= t */ gen_goto_tb(ctx, 1, ctx->btarget); gen_set_label(fs); --=20 2.7.4