mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
tcg: remove singlestep_enabled from DisasContextBase
It is used in a couple of places only, both within the same target. Those can use the cflags just as well, so remove the separate field. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20241010083641.1785069-1-pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7e3b6d8063
commit
fe678c45d2
3 changed files with 3 additions and 5 deletions
|
@ -129,7 +129,6 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
|
||||||
db->is_jmp = DISAS_NEXT;
|
db->is_jmp = DISAS_NEXT;
|
||||||
db->num_insns = 0;
|
db->num_insns = 0;
|
||||||
db->max_insns = *max_insns;
|
db->max_insns = *max_insns;
|
||||||
db->singlestep_enabled = cflags & CF_SINGLE_STEP;
|
|
||||||
db->insn_start = NULL;
|
db->insn_start = NULL;
|
||||||
db->fake_insn = false;
|
db->fake_insn = false;
|
||||||
db->host_addr[0] = host_pc;
|
db->host_addr[0] = host_pc;
|
||||||
|
|
|
@ -71,7 +71,6 @@ typedef enum DisasJumpType {
|
||||||
* @is_jmp: What instruction to disassemble next.
|
* @is_jmp: What instruction to disassemble next.
|
||||||
* @num_insns: Number of translated instructions (including current).
|
* @num_insns: Number of translated instructions (including current).
|
||||||
* @max_insns: Maximum number of instructions to be translated in this TB.
|
* @max_insns: Maximum number of instructions to be translated in this TB.
|
||||||
* @singlestep_enabled: "Hardware" single stepping enabled.
|
|
||||||
* @plugin_enabled: TCG plugin enabled in this TB.
|
* @plugin_enabled: TCG plugin enabled in this TB.
|
||||||
* @fake_insn: True if translator_fake_ldb used.
|
* @fake_insn: True if translator_fake_ldb used.
|
||||||
* @insn_start: The last op emitted by the insn_start hook,
|
* @insn_start: The last op emitted by the insn_start hook,
|
||||||
|
@ -86,7 +85,6 @@ struct DisasContextBase {
|
||||||
DisasJumpType is_jmp;
|
DisasJumpType is_jmp;
|
||||||
int num_insns;
|
int num_insns;
|
||||||
int max_insns;
|
int max_insns;
|
||||||
bool singlestep_enabled;
|
|
||||||
bool plugin_enabled;
|
bool plugin_enabled;
|
||||||
bool fake_insn;
|
bool fake_insn;
|
||||||
struct TCGOp *insn_start;
|
struct TCGOp *insn_start;
|
||||||
|
|
|
@ -15362,7 +15362,8 @@ static void mips_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
|
||||||
* hardware does (e.g. if a delay slot instruction faults, the
|
* hardware does (e.g. if a delay slot instruction faults, the
|
||||||
* reported PC is the PC of the branch).
|
* reported PC is the PC of the branch).
|
||||||
*/
|
*/
|
||||||
if (ctx->base.singlestep_enabled && (ctx->hflags & MIPS_HFLAG_BMASK)) {
|
if ((tb_cflags(ctx->base.tb) & CF_SINGLE_STEP) &&
|
||||||
|
(ctx->hflags & MIPS_HFLAG_BMASK)) {
|
||||||
ctx->base.max_insns = 2;
|
ctx->base.max_insns = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15445,7 +15446,7 @@ static void mips_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
|
||||||
* together with its delay slot.
|
* together with its delay slot.
|
||||||
*/
|
*/
|
||||||
if (ctx->base.pc_next - ctx->page_start >= TARGET_PAGE_SIZE
|
if (ctx->base.pc_next - ctx->page_start >= TARGET_PAGE_SIZE
|
||||||
&& !ctx->base.singlestep_enabled) {
|
&& !(tb_cflags(ctx->base.tb) & CF_SINGLE_STEP)) {
|
||||||
ctx->base.is_jmp = DISAS_TOO_MANY;
|
ctx->base.is_jmp = DISAS_TOO_MANY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue