tcg: Make cpu_ssr a TCGv

This commit is contained in:
Lioncash 2018-02-21 01:39:15 -05:00
parent b09a8626f0
commit 2beea0db0d
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 4 additions and 5 deletions

View file

@ -3066,7 +3066,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
CHECK_IU_FEATURE(dc, HYPV);
if (!hypervisor(dc))
goto priv_insn;
tcg_gen_mov_tl(tcg_ctx, cpu_tmp0, *(TCGv *)tcg_ctx->cpu_ssr);
tcg_gen_mov_tl(tcg_ctx, cpu_tmp0, tcg_ctx->cpu_ssr);
break;
case 31: // ver
tcg_gen_mov_tl(tcg_ctx, cpu_tmp0, *(TCGv *)tcg_ctx->cpu_ver);
@ -4021,7 +4021,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
CHECK_IU_FEATURE(dc, HYPV);
if (!hypervisor(dc))
goto priv_insn;
tcg_gen_mov_tl(tcg_ctx, *(TCGv *)tcg_ctx->cpu_ssr, cpu_tmp0);
tcg_gen_mov_tl(tcg_ctx, tcg_ctx->cpu_ssr, cpu_tmp0);
break;
default:
goto illegal_insn;
@ -5557,8 +5557,7 @@ void gen_intermediate_code_init(CPUSPARCState *env)
tcg_ctx->cpu_hver = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, offsetof(CPUSPARCState, hver),
"hver");
tcg_ctx->cpu_ssr = g_malloc0(sizeof(TCGv));
*(TCGv *)tcg_ctx->cpu_ssr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
tcg_ctx->cpu_ssr = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
offsetof(CPUSPARCState, ssr), "ssr");
tcg_ctx->cpu_ver = g_malloc0(sizeof(TCGv));

View file

@ -846,7 +846,7 @@ struct TCGContext {
TCGv cpu_hintp;
TCGv cpu_htba;
TCGv cpu_hver;
void *cpu_ssr;
TCGv cpu_ssr;
void *cpu_ver;
void *cpu_wim;