[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/25] target/nios2: add DISAS_NORETURN case for nothing more to g
From: |
Peter Maydell |
Subject: |
[PULL 17/25] target/nios2: add DISAS_NORETURN case for nothing more to generate |
Date: |
Mon, 13 Jul 2020 15:10:56 +0100 |
From: Wentong Wu <wentong.wu@intel.com>
Add DISAS_NORETURN case for nothing more to generate because at runtime
execution will never return from some helper call. And at the same time
replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception
with the newly added DISAS_NORETURN.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Message-id: 20200710233433.19729-1-wentong.wu@intel.com
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/nios2/translate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 6c34cd31937..00b591cc298 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -149,7 +149,7 @@ static void t_gen_helper_raise_exception(DisasContext *dc,
tcg_gen_movi_tl(dc->cpu_R[R_PC], dc->pc);
gen_helper_raise_exception(dc->cpu_env, tmp);
tcg_temp_free_i32(tmp);
- dc->is_jmp = DISAS_UPDATE;
+ dc->is_jmp = DISAS_NORETURN;
}
static bool use_goto_tb(DisasContext *dc, uint32_t dest)
@@ -802,7 +802,7 @@ static void gen_exception(DisasContext *dc, uint32_t excp)
tcg_gen_movi_tl(cpu_R[R_PC], dc->pc);
gen_helper_raise_exception(cpu_env, tmp);
tcg_temp_free_i32(tmp);
- dc->is_jmp = DISAS_UPDATE;
+ dc->is_jmp = DISAS_NORETURN;
}
/* generate intermediate code for basic block 'tb'. */
@@ -877,6 +877,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock
*tb, int max_insns)
tcg_gen_exit_tb(NULL, 0);
break;
+ case DISAS_NORETURN:
case DISAS_TB_JUMP:
/* nothing more to generate */
break;
--
2.20.1
- [PULL 08/25] build: Enable BSD symbols for Haiku, (continued)
- [PULL 08/25] build: Enable BSD symbols for Haiku, Peter Maydell, 2020/07/13
- [PULL 09/25] util/qemu-openpty.c: Don't assume pty.h is glibc-only, Peter Maydell, 2020/07/13
- [PULL 10/25] build: Check that mlockall() exists, Peter Maydell, 2020/07/13
- [PULL 11/25] osdep.h: Always include <sys/signal.h> if it exists, Peter Maydell, 2020/07/13
- [PULL 12/25] osdep.h: For Haiku, define SIGIO as equivalent to SIGPOLL, Peter Maydell, 2020/07/13
- [PULL 14/25] util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD, Peter Maydell, 2020/07/13
- [PULL 13/25] bswap.h: Include <endian.h> on Haiku for bswap operations, Peter Maydell, 2020/07/13
- [PULL 15/25] util/oslib-posix.c: Implement qemu_init_exec_dir() for Haiku, Peter Maydell, 2020/07/13
- [PULL 16/25] util/drm: make portable by avoiding struct dirent d_type, Peter Maydell, 2020/07/13
- [PULL 18/25] target/nios2: in line the semantics of DISAS_UPDATE with other targets, Peter Maydell, 2020/07/13
- [PULL 17/25] target/nios2: add DISAS_NORETURN case for nothing more to generate,
Peter Maydell <=
- [PULL 22/25] hw/arm/tosa: Encapsulate misc GPIO handling in a device, Peter Maydell, 2020/07/13
- [PULL 21/25] hw/arm/tosa.c: Detabify, Peter Maydell, 2020/07/13
- [PULL 23/25] hw/arm/palm.c: Detabify, Peter Maydell, 2020/07/13
- [PULL 19/25] target/nios2: Use gen_io_start around wrctl instruction, Peter Maydell, 2020/07/13
- [PULL 20/25] hw/nios2: exit to main CPU loop only when unmasking interrupts, Peter Maydell, 2020/07/13
- [PULL 24/25] hw/arm/palm.c: Encapsulate misc GPIO handling in a device, Peter Maydell, 2020/07/13
- [PULL 25/25] hw/arm/aspeed: Do not create and attach empty SD cards by default, Peter Maydell, 2020/07/13
- Re: [PULL 00/25] target-arm queue, Peter Maydell, 2020/07/13