mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-17 10:38:52 +00:00
target/cris: Use translator_use_goto_tb
The test for singlestepping is done in translator_use_goto_tb, so we may elide it from cris_tr_tb_stop. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
1810afd56a
commit
ca92d7f89b
@ -481,7 +481,7 @@ static void t_gen_swapr(TCGv d, TCGv s)
|
|||||||
|
|
||||||
static bool use_goto_tb(DisasContext *dc, target_ulong dest)
|
static bool use_goto_tb(DisasContext *dc, target_ulong dest)
|
||||||
{
|
{
|
||||||
return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0;
|
return translator_use_goto_tb(&dc->base, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
|
||||||
@ -3234,8 +3234,7 @@ static void cris_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
|||||||
* Use a conditional branch if either taken or not-taken path
|
* Use a conditional branch if either taken or not-taken path
|
||||||
* can use goto_tb. If neither can, then treat it as indirect.
|
* can use goto_tb. If neither can, then treat it as indirect.
|
||||||
*/
|
*/
|
||||||
if (likely(!dc->base.singlestep_enabled)
|
if (likely(!dc->cpustate_changed)
|
||||||
&& likely(!dc->cpustate_changed)
|
|
||||||
&& (use_goto_tb(dc, dc->jmp_pc) || use_goto_tb(dc, npc))) {
|
&& (use_goto_tb(dc, dc->jmp_pc) || use_goto_tb(dc, npc))) {
|
||||||
TCGLabel *not_taken = gen_new_label();
|
TCGLabel *not_taken = gen_new_label();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user