Skip to content

Commit

Permalink
target-i386: Change gen_intermediate_code_internal() argument to X86CPU
Browse files Browse the repository at this point in the history
Also use bool type while at it.

Prepares for moving singlestep_enabled field to CPUState.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
  • Loading branch information
afaerber committed Jul 9, 2013
1 parent 7fd2592 commit 467215c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions target-i386/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -8251,10 +8251,11 @@ void optimize_flags_init(void)
/* generate intermediate code in gen_opc_buf and gen_opparam_buf for
basic block 'tb'. If search_pc is TRUE, also generate PC
information for each intermediate instruction. */
static inline void gen_intermediate_code_internal(CPUX86State *env,
static inline void gen_intermediate_code_internal(X86CPU *cpu,
TranslationBlock *tb,
int search_pc)
bool search_pc)
{
CPUX86State *env = &cpu->env;
DisasContext dc1, *dc = &dc1;
target_ulong pc_ptr;
uint16_t *gen_opc_end;
Expand Down Expand Up @@ -8428,12 +8429,12 @@ static inline void gen_intermediate_code_internal(CPUX86State *env,

void gen_intermediate_code(CPUX86State *env, TranslationBlock *tb)
{
gen_intermediate_code_internal(env, tb, 0);
gen_intermediate_code_internal(x86_env_get_cpu(env), tb, false);
}

void gen_intermediate_code_pc(CPUX86State *env, TranslationBlock *tb)
{
gen_intermediate_code_internal(env, tb, 1);
gen_intermediate_code_internal(x86_env_get_cpu(env), tb, true);
}

void restore_state_to_opc(CPUX86State *env, TranslationBlock *tb, int pc_pos)
Expand Down

0 comments on commit 467215c

Please sign in to comment.