提交 f3531da5 编写于 作者: R Richard Henderson 提交者: Max Filippov

target/xtensa: Replace DISAS_UPDATE with DISAS_NORETURN

The usage of DISAS_UPDATE is after noreturn helpers.
It is thus indistinguishable from DISAS_NORETURN.
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
上级 f40385c9
...@@ -47,9 +47,6 @@ ...@@ -47,9 +47,6 @@
#include "exec/log.h" #include "exec/log.h"
/* is_jmp field values */
#define DISAS_UPDATE DISAS_TARGET_0 /* cpu state was modified dynamically */
struct DisasContext { struct DisasContext {
const XtensaConfig *config; const XtensaConfig *config;
TranslationBlock *tb; TranslationBlock *tb;
...@@ -317,7 +314,7 @@ static void gen_exception_cause(DisasContext *dc, uint32_t cause) ...@@ -317,7 +314,7 @@ static void gen_exception_cause(DisasContext *dc, uint32_t cause)
tcg_temp_free(tcause); tcg_temp_free(tcause);
if (cause == ILLEGAL_INSTRUCTION_CAUSE || if (cause == ILLEGAL_INSTRUCTION_CAUSE ||
cause == SYSCALL_CAUSE) { cause == SYSCALL_CAUSE) {
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
} }
} }
...@@ -339,7 +336,7 @@ static void gen_debug_exception(DisasContext *dc, uint32_t cause) ...@@ -339,7 +336,7 @@ static void gen_debug_exception(DisasContext *dc, uint32_t cause)
tcg_temp_free(tpc); tcg_temp_free(tpc);
tcg_temp_free(tcause); tcg_temp_free(tcause);
if (cause & (DEBUGCAUSE_IB | DEBUGCAUSE_BI | DEBUGCAUSE_BN)) { if (cause & (DEBUGCAUSE_IB | DEBUGCAUSE_BI | DEBUGCAUSE_BN)) {
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
} }
} }
...@@ -351,7 +348,7 @@ static bool gen_check_privilege(DisasContext *dc) ...@@ -351,7 +348,7 @@ static bool gen_check_privilege(DisasContext *dc)
} }
#endif #endif
gen_exception_cause(dc, PRIVILEGED_CAUSE); gen_exception_cause(dc, PRIVILEGED_CAUSE);
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
return false; return false;
} }
...@@ -360,7 +357,7 @@ static bool gen_check_cpenable(DisasContext *dc, unsigned cp) ...@@ -360,7 +357,7 @@ static bool gen_check_cpenable(DisasContext *dc, unsigned cp)
if (option_enabled(dc, XTENSA_OPTION_COPROCESSOR) && if (option_enabled(dc, XTENSA_OPTION_COPROCESSOR) &&
!(dc->cpenable & (1 << cp))) { !(dc->cpenable & (1 << cp))) {
gen_exception_cause(dc, COPROCESSOR0_DISABLED + cp); gen_exception_cause(dc, COPROCESSOR0_DISABLED + cp);
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
return false; return false;
} }
return true; return true;
...@@ -382,7 +379,7 @@ static void gen_jump_slot(DisasContext *dc, TCGv dest, int slot) ...@@ -382,7 +379,7 @@ static void gen_jump_slot(DisasContext *dc, TCGv dest, int slot)
tcg_gen_exit_tb(NULL, 0); tcg_gen_exit_tb(NULL, 0);
} }
} }
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
} }
static void gen_jump(DisasContext *dc, TCGv dest) static void gen_jump(DisasContext *dc, TCGv dest)
...@@ -918,7 +915,7 @@ static bool gen_window_check1(DisasContext *dc, unsigned r1) ...@@ -918,7 +915,7 @@ static bool gen_window_check1(DisasContext *dc, unsigned r1)
TCGv_i32 w = tcg_const_i32(r1 / 4); TCGv_i32 w = tcg_const_i32(r1 / 4);
gen_helper_window_check(cpu_env, pc, w); gen_helper_window_check(cpu_env, pc, w);
dc->is_jmp = DISAS_UPDATE; dc->is_jmp = DISAS_NORETURN;
return false; return false;
} }
return true; return true;
...@@ -1110,14 +1107,14 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) ...@@ -1110,14 +1107,14 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
tcg_gen_insn_start(dc.pc); tcg_gen_insn_start(dc.pc);
++insn_count; ++insn_count;
gen_exception(&dc, EXCP_YIELD); gen_exception(&dc, EXCP_YIELD);
dc.is_jmp = DISAS_UPDATE; dc.is_jmp = DISAS_NORETURN;
goto done; goto done;
} }
if (tb->flags & XTENSA_TBFLAG_EXCEPTION) { if (tb->flags & XTENSA_TBFLAG_EXCEPTION) {
tcg_gen_insn_start(dc.pc); tcg_gen_insn_start(dc.pc);
++insn_count; ++insn_count;
gen_exception(&dc, EXCP_DEBUG); gen_exception(&dc, EXCP_DEBUG);
dc.is_jmp = DISAS_UPDATE; dc.is_jmp = DISAS_NORETURN;
goto done; goto done;
} }
...@@ -1128,7 +1125,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) ...@@ -1128,7 +1125,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
if (unlikely(cpu_breakpoint_test(cs, dc.pc, BP_ANY))) { if (unlikely(cpu_breakpoint_test(cs, dc.pc, BP_ANY))) {
tcg_gen_movi_i32(cpu_pc, dc.pc); tcg_gen_movi_i32(cpu_pc, dc.pc);
gen_exception(&dc, EXCP_DEBUG); gen_exception(&dc, EXCP_DEBUG);
dc.is_jmp = DISAS_UPDATE; dc.is_jmp = DISAS_NORETURN;
/* The address covered by the breakpoint must be included in /* The address covered by the breakpoint must be included in
[tb->pc, tb->pc + tb->size) in order to for it to be [tb->pc, tb->pc + tb->size) in order to for it to be
properly cleared -- thus we increment the PC here so that properly cleared -- thus we increment the PC here so that
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册