tcg: Make cpu_wim a TCGv

This commit is contained in:
Lioncash 2018-02-21 01:41:53 -05:00
parent 58c5a28893
commit c0210ac8a6
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
3 changed files with 5 additions and 7 deletions

View file

@ -3076,7 +3076,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
goto illegal_insn; goto illegal_insn;
} }
#else #else
tcg_gen_ext_i32_tl(tcg_ctx, cpu_tmp0, *(TCGv *)tcg_ctx->cpu_wim); tcg_gen_ext_i32_tl(tcg_ctx, cpu_tmp0, tcg_ctx->cpu_wim);
#endif #endif
gen_store_gpr(dc, rd, cpu_tmp0); gen_store_gpr(dc, rd, cpu_tmp0);
break; break;
@ -4027,9 +4027,9 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
goto illegal_insn; goto illegal_insn;
} }
#else #else
tcg_gen_trunc_tl_i32(tcg_ctx, *(TCGv *)tcg_ctx->cpu_wim, cpu_tmp0); tcg_gen_trunc_tl_i32(tcg_ctx, tcg_ctx->cpu_wim, cpu_tmp0);
if (dc->def->nwindows != 32) { if (dc->def->nwindows != 32) {
tcg_gen_andi_tl(tcg_ctx, *(TCGv *)tcg_ctx->cpu_wim, *(TCGv *)tcg_ctx->cpu_wim, tcg_gen_andi_tl(tcg_ctx, tcg_ctx->cpu_wim, tcg_ctx->cpu_wim,
(1 << dc->def->nwindows) - 1); (1 << dc->def->nwindows) - 1);
} }
#endif #endif
@ -5567,8 +5567,7 @@ void gen_intermediate_code_init(CPUSPARCState *env)
offsetof(CPUSPARCState, softint), offsetof(CPUSPARCState, softint),
"softint"); "softint");
#else #else
tcg_ctx->cpu_wim = g_malloc0(sizeof(TCGv)); tcg_ctx->cpu_wim = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, offsetof(CPUSPARCState, wim),
*(TCGv *)tcg_ctx->cpu_wim = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, offsetof(CPUSPARCState, wim),
"wim"); "wim");
#endif #endif
tcg_ctx->cpu_cond = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, offsetof(CPUSPARCState, cond), tcg_ctx->cpu_cond = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, offsetof(CPUSPARCState, cond),

View file

@ -34,7 +34,6 @@ void sparc_release(void *ctx)
int i; int i;
TCGContext *tcg_ctx = (TCGContext *) ctx; TCGContext *tcg_ctx = (TCGContext *) ctx;
release_common(ctx); release_common(ctx);
g_free(tcg_ctx->cpu_wim);
g_free(tcg_ctx->cpu_cc_src); g_free(tcg_ctx->cpu_cc_src);
g_free(tcg_ctx->cpu_cc_src2); g_free(tcg_ctx->cpu_cc_src2);
g_free(tcg_ctx->cpu_cc_dst); g_free(tcg_ctx->cpu_cc_dst);

View file

@ -848,7 +848,7 @@ struct TCGContext {
TCGv cpu_hver; TCGv cpu_hver;
TCGv cpu_ssr; TCGv cpu_ssr;
TCGv cpu_ver; TCGv cpu_ver;
void *cpu_wim; TCGv cpu_wim;
TCGLabel *exitreq_label; // gen_tb_start() TCGLabel *exitreq_label; // gen_tb_start()
}; };