mirror of https://github.com/xemu-project/xemu.git
target/arm: Drop DisasContext.tmp_a64
Translators are no longer required to free tcg temporaries, therefore there's no need to record temps for later freeing. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
366786e057
commit
828fce78a8
|
@ -408,27 +408,9 @@ static void gen_goto_tb(DisasContext *s, int n, int64_t diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_tmp_a64_array(DisasContext *s)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_DEBUG_TCG
|
|
||||||
memset(s->tmp_a64, 0, sizeof(s->tmp_a64));
|
|
||||||
#endif
|
|
||||||
s->tmp_a64_count = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free_tmp_a64(DisasContext *s)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < s->tmp_a64_count; i++) {
|
|
||||||
tcg_temp_free_i64(s->tmp_a64[i]);
|
|
||||||
}
|
|
||||||
init_tmp_a64_array(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
TCGv_i64 new_tmp_a64(DisasContext *s)
|
TCGv_i64 new_tmp_a64(DisasContext *s)
|
||||||
{
|
{
|
||||||
assert(s->tmp_a64_count < TMP_A64_MAX);
|
return tcg_temp_new_i64();
|
||||||
return s->tmp_a64[s->tmp_a64_count++] = tcg_temp_new_i64();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TCGv_i64 new_tmp_a64_zero(DisasContext *s)
|
TCGv_i64 new_tmp_a64_zero(DisasContext *s)
|
||||||
|
@ -14781,8 +14763,6 @@ static void aarch64_tr_init_disas_context(DisasContextBase *dcbase,
|
||||||
bound = 1;
|
bound = 1;
|
||||||
}
|
}
|
||||||
dc->base.max_insns = MIN(dc->base.max_insns, bound);
|
dc->base.max_insns = MIN(dc->base.max_insns, bound);
|
||||||
|
|
||||||
init_tmp_a64_array(dc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aarch64_tr_tb_start(DisasContextBase *db, CPUState *cpu)
|
static void aarch64_tr_tb_start(DisasContextBase *db, CPUState *cpu)
|
||||||
|
@ -14938,9 +14918,6 @@ static void aarch64_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we allocated any temporaries, free them here */
|
|
||||||
free_tmp_a64(s);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* After execution of most insns, btype is reset to 0.
|
* After execution of most insns, btype is reset to 0.
|
||||||
* Note that we set btype == -1 when the insn sets btype.
|
* Note that we set btype == -1 when the insn sets btype.
|
||||||
|
|
|
@ -149,9 +149,6 @@ typedef struct DisasContext {
|
||||||
int c15_cpar;
|
int c15_cpar;
|
||||||
/* TCG op of the current insn_start. */
|
/* TCG op of the current insn_start. */
|
||||||
TCGOp *insn_start;
|
TCGOp *insn_start;
|
||||||
#define TMP_A64_MAX 16
|
|
||||||
int tmp_a64_count;
|
|
||||||
TCGv_i64 tmp_a64[TMP_A64_MAX];
|
|
||||||
} DisasContext;
|
} DisasContext;
|
||||||
|
|
||||||
typedef struct DisasCompare {
|
typedef struct DisasCompare {
|
||||||
|
|
Loading…
Reference in New Issue