[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/14] target/mips: nanoMIPS: Fix branch handling
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PULL 07/14] target/mips: nanoMIPS: Fix branch handling |
Date: |
Fri, 25 Jan 2019 14:31:31 +0100 |
From: Stefan Markovic <address@hidden>
Fix nanoMIPS branch handling.
Reviewed-by: Aleksandar Rikalo <address@hidden>
Signed-off-by: Stefan Markovic <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
---
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 *ctx,
uint32_t opc,
goto out;
}
+ /* branch completion */
+ clear_branch_hflags(ctx);
+ ctx->base.is_jmp = DISAS_NORETURN;
+
if (bcond_compute == 0) {
/* Uncoditional compact branch */
gen_goto_tb(ctx, 0, ctx->btarget);
@@ -19798,6 +19802,10 @@ static void
gen_compute_nanomips_pbalrsc_branch(DisasContext *ctx, int rs,
tcg_gen_movi_tl(t1, ctx->base.pc_next + 4);
gen_op_addr_add(ctx, btarget, t1, t0);
+ /* branch completion */
+ clear_branch_hflags(ctx);
+ ctx->base.is_jmp = 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(DisasContext
*ctx, uint32_t opc,
goto out;
}
+ /* branch completion */
+ clear_branch_hflags(ctx);
+ ctx->base.is_jmp = DISAS_NORETURN;
+
/* Generating branch here as compact branches don't have delay slot */
gen_goto_tb(ctx, 1, ctx->btarget);
gen_set_label(fs);
--
2.7.4
- [Qemu-devel] [PULL 00/14] MIPS queue for January 25, 2019, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 04/14] target/mips: Correct the second argument type of cpu_supports_isa(), Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 02/14] target/mips: nanoMIPS: Remove an unused macro, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 08/14] target/mips: Add I6500 core configuration, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 01/14] target/mips: nanoMIPS: Remove duplicate macro definitions, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 09/14] MAINTAINERS: Update MIPS sections, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 11/14] tests: tcg: mips: Add two new Makefiles, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 03/14] target/mips: nanoMIPS: Rename macros for extracting 3-bit-coded GPR numbers, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 07/14] target/mips: nanoMIPS: Fix branch handling,
Aleksandar Markovic <=
- [Qemu-devel] [PULL 13/14] qemu-doc: Add nanoMIPS ISA information, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 14/14] docs/qemu-cpu-models: Add MIPS/nanoMIPS QEMU supported CPU models, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 05/14] target/mips: Extend gen_scwp() functionality to support EVA, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 06/14] disas: nanoMIPS: Amend DSP instructions related comments, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 10/14] tests: tcg: mips: Move source files to new locations, Aleksandar Markovic, 2019/01/25
- [Qemu-devel] [PULL 12/14] tests: tcg: mips: Remove old directories, Aleksandar Markovic, 2019/01/25
- Re: [Qemu-devel] [PULL 00/14] MIPS queue for January 25, 2019, Aleksandar Markovic, 2019/01/25
- Re: [Qemu-devel] [PULL 00/14] MIPS queue for January 25, 2019, Peter Maydell, 2019/01/25