mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 20:15:31 +00:00
tcg: Make cpu_stick_cmpr and cpu_hstick_cmpr TCGv
This commit is contained in:
parent
2d9d8c5e01
commit
2df9744bdb
|
@ -2908,7 +2908,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x19: /* System tick compare */
|
case 0x19: /* System tick compare */
|
||||||
gen_store_gpr(dc, rd, *(TCGv *)tcg_ctx->cpu_stick_cmpr);
|
gen_store_gpr(dc, rd, tcg_ctx->cpu_stick_cmpr);
|
||||||
break;
|
break;
|
||||||
case 0x10: /* Performance Control */
|
case 0x10: /* Performance Control */
|
||||||
case 0x11: /* Performance Instrumentation Counter */
|
case 0x11: /* Performance Instrumentation Counter */
|
||||||
|
@ -2949,7 +2949,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
||||||
tcg_gen_mov_tl(tcg_ctx, cpu_dst, *(TCGv *)tcg_ctx->cpu_hver);
|
tcg_gen_mov_tl(tcg_ctx, cpu_dst, *(TCGv *)tcg_ctx->cpu_hver);
|
||||||
break;
|
break;
|
||||||
case 31: // hstick_cmpr
|
case 31: // hstick_cmpr
|
||||||
tcg_gen_mov_tl(tcg_ctx, cpu_dst, *(TCGv *)tcg_ctx->cpu_hstick_cmpr);
|
tcg_gen_mov_tl(tcg_ctx, cpu_dst, tcg_ctx->cpu_hstick_cmpr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto illegal_insn;
|
goto illegal_insn;
|
||||||
|
@ -3847,13 +3847,13 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
||||||
{
|
{
|
||||||
TCGv_ptr r_tickptr;
|
TCGv_ptr r_tickptr;
|
||||||
|
|
||||||
tcg_gen_xor_tl(tcg_ctx, *(TCGv *)tcg_ctx->cpu_stick_cmpr, cpu_src1,
|
tcg_gen_xor_tl(tcg_ctx, tcg_ctx->cpu_stick_cmpr, cpu_src1,
|
||||||
cpu_src2);
|
cpu_src2);
|
||||||
r_tickptr = tcg_temp_new_ptr(tcg_ctx);
|
r_tickptr = tcg_temp_new_ptr(tcg_ctx);
|
||||||
tcg_gen_ld_ptr(tcg_ctx, r_tickptr, tcg_ctx->cpu_env,
|
tcg_gen_ld_ptr(tcg_ctx, r_tickptr, tcg_ctx->cpu_env,
|
||||||
offsetof(CPUSPARCState, stick));
|
offsetof(CPUSPARCState, stick));
|
||||||
gen_helper_tick_set_limit(tcg_ctx, r_tickptr,
|
gen_helper_tick_set_limit(tcg_ctx, r_tickptr,
|
||||||
*(TCGv *)tcg_ctx->cpu_stick_cmpr);
|
tcg_ctx->cpu_stick_cmpr);
|
||||||
tcg_temp_free_ptr(tcg_ctx, r_tickptr);
|
tcg_temp_free_ptr(tcg_ctx, r_tickptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4068,12 +4068,12 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
||||||
{
|
{
|
||||||
TCGv_ptr r_tickptr;
|
TCGv_ptr r_tickptr;
|
||||||
|
|
||||||
tcg_gen_mov_tl(tcg_ctx, *(TCGv *)tcg_ctx->cpu_hstick_cmpr, cpu_tmp0);
|
tcg_gen_mov_tl(tcg_ctx, tcg_ctx->cpu_hstick_cmpr, cpu_tmp0);
|
||||||
r_tickptr = tcg_temp_new_ptr(tcg_ctx);
|
r_tickptr = tcg_temp_new_ptr(tcg_ctx);
|
||||||
tcg_gen_ld_ptr(tcg_ctx, r_tickptr, tcg_ctx->cpu_env,
|
tcg_gen_ld_ptr(tcg_ctx, r_tickptr, tcg_ctx->cpu_env,
|
||||||
offsetof(CPUSPARCState, hstick));
|
offsetof(CPUSPARCState, hstick));
|
||||||
gen_helper_tick_set_limit(tcg_ctx, r_tickptr,
|
gen_helper_tick_set_limit(tcg_ctx, r_tickptr,
|
||||||
*(TCGv *)tcg_ctx->cpu_hstick_cmpr);
|
tcg_ctx->cpu_hstick_cmpr);
|
||||||
tcg_temp_free_ptr(tcg_ctx, r_tickptr);
|
tcg_temp_free_ptr(tcg_ctx, r_tickptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -5540,13 +5540,11 @@ void gen_intermediate_code_init(CPUSPARCState *env)
|
||||||
offsetof(CPUSPARCState, tick_cmpr),
|
offsetof(CPUSPARCState, tick_cmpr),
|
||||||
"tick_cmpr");
|
"tick_cmpr");
|
||||||
|
|
||||||
tcg_ctx->cpu_stick_cmpr = g_malloc0(sizeof(TCGv));
|
tcg_ctx->cpu_stick_cmpr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
||||||
*(TCGv *)tcg_ctx->cpu_stick_cmpr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
|
||||||
offsetof(CPUSPARCState, stick_cmpr),
|
offsetof(CPUSPARCState, stick_cmpr),
|
||||||
"stick_cmpr");
|
"stick_cmpr");
|
||||||
|
|
||||||
tcg_ctx->cpu_hstick_cmpr = g_malloc0(sizeof(TCGv));
|
tcg_ctx->cpu_hstick_cmpr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
||||||
*(TCGv *)tcg_ctx->cpu_hstick_cmpr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
|
||||||
offsetof(CPUSPARCState, hstick_cmpr),
|
offsetof(CPUSPARCState, hstick_cmpr),
|
||||||
"hstick_cmpr");
|
"hstick_cmpr");
|
||||||
|
|
||||||
|
|
|
@ -841,8 +841,8 @@ struct TCGContext {
|
||||||
TCGv cpu_cond;
|
TCGv cpu_cond;
|
||||||
TCGv cpu_gsr;
|
TCGv cpu_gsr;
|
||||||
TCGv cpu_tick_cmpr;
|
TCGv cpu_tick_cmpr;
|
||||||
void *cpu_stick_cmpr;
|
TCGv cpu_stick_cmpr;
|
||||||
void *cpu_hstick_cmpr;
|
TCGv cpu_hstick_cmpr;
|
||||||
void *cpu_hintp;
|
void *cpu_hintp;
|
||||||
void *cpu_htba;
|
void *cpu_htba;
|
||||||
void *cpu_hver;
|
void *cpu_hver;
|
||||||
|
|
Loading…
Reference in a new issue