mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
target-sparc: Avoid cpu_tmp32 in Read Priv Register
We don't need another temporary here. Load directly into the register we want to set. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
ba5f5179f2
commit
45778f99f0
1 changed files with 21 additions and 32 deletions
|
@ -2865,14 +2865,12 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||||
break;
|
break;
|
||||||
case 3: // tt
|
case 3: // tt
|
||||||
{
|
{
|
||||||
TCGv_ptr r_tsptr;
|
TCGv_ptr r_tsptr = tcg_temp_new_ptr();
|
||||||
|
|
||||||
r_tsptr = tcg_temp_new_ptr();
|
|
||||||
gen_load_trap_state_at_tl(r_tsptr, cpu_env);
|
gen_load_trap_state_at_tl(r_tsptr, cpu_env);
|
||||||
tcg_gen_ld_i32(cpu_tmp32, r_tsptr,
|
tcg_gen_ld32s_tl(cpu_tmp0, r_tsptr,
|
||||||
offsetof(trap_state, tt));
|
offsetof(trap_state, tt));
|
||||||
tcg_temp_free_ptr(r_tsptr);
|
tcg_temp_free_ptr(r_tsptr);
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // tick
|
case 4: // tick
|
||||||
|
@ -2890,53 +2888,44 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
|
||||||
tcg_gen_mov_tl(cpu_tmp0, cpu_tbr);
|
tcg_gen_mov_tl(cpu_tmp0, cpu_tbr);
|
||||||
break;
|
break;
|
||||||
case 6: // pstate
|
case 6: // pstate
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, pstate));
|
offsetof(CPUSPARCState, pstate));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 7: // tl
|
case 7: // tl
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, tl));
|
offsetof(CPUSPARCState, tl));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 8: // pil
|
case 8: // pil
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, psrpil));
|
offsetof(CPUSPARCState, psrpil));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 9: // cwp
|
case 9: // cwp
|
||||||
gen_helper_rdcwp(cpu_tmp0, cpu_env);
|
gen_helper_rdcwp(cpu_tmp0, cpu_env);
|
||||||
break;
|
break;
|
||||||
case 10: // cansave
|
case 10: // cansave
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, cansave));
|
offsetof(CPUSPARCState, cansave));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 11: // canrestore
|
case 11: // canrestore
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, canrestore));
|
offsetof(CPUSPARCState, canrestore));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 12: // cleanwin
|
case 12: // cleanwin
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, cleanwin));
|
offsetof(CPUSPARCState, cleanwin));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 13: // otherwin
|
case 13: // otherwin
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, otherwin));
|
offsetof(CPUSPARCState, otherwin));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 14: // wstate
|
case 14: // wstate
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, wstate));
|
offsetof(CPUSPARCState, wstate));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 16: // UA2005 gl
|
case 16: // UA2005 gl
|
||||||
CHECK_IU_FEATURE(dc, GL);
|
CHECK_IU_FEATURE(dc, GL);
|
||||||
tcg_gen_ld_i32(cpu_tmp32, cpu_env,
|
tcg_gen_ld32s_tl(cpu_tmp0, cpu_env,
|
||||||
offsetof(CPUSPARCState, gl));
|
offsetof(CPUSPARCState, gl));
|
||||||
tcg_gen_ext_i32_tl(cpu_tmp0, cpu_tmp32);
|
|
||||||
break;
|
break;
|
||||||
case 26: // UA2005 strand status
|
case 26: // UA2005 strand status
|
||||||
CHECK_IU_FEATURE(dc, HYPV);
|
CHECK_IU_FEATURE(dc, HYPV);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue