qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate
@ 2020-07-10 23:34 Wentong Wu
  2020-07-10 23:34 ` [PATCH v2 2/4] target/nios2: in line the semantics of DISAS_UPDATE with other targets Wentong Wu
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Wentong Wu @ 2020-07-10 23:34 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: qemu-trivial, marex, crwulff, Wentong Wu

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>
---
 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 e17656e6..b052be85 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.21.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-12 15:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-10 23:34 [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate Wentong Wu
2020-07-10 23:34 ` [PATCH v2 2/4] target/nios2: in line the semantics of DISAS_UPDATE with other targets Wentong Wu
2020-07-10 23:34 ` [PATCH v2 3/4] target/nios2: Use gen_io_start around wrctl instruction Wentong Wu
2020-07-10 23:34 ` [PATCH v2 4/4] hw/nios2: exit to main CPU loop only when unmasking interrupts Wentong Wu
2020-07-11 18:49 ` [PATCH v2 1/4] target/nios2: add DISAS_NORETURN case for nothing more to generate Peter Maydell
2020-07-12 15:18   ` Wu, Wentong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).