target-arm: Remove unnecessary code now read/write fns can't fail
Now that cpreg read and write functions can't fail and throw an exception, we can remove the code from the translator that synchronises the guest PC in case an exception is thrown. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
c4241c7d38
commit
ea4571eb87
|
@ -1231,7 +1231,6 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
|
||||||
tcg_gen_movi_i64(tcg_rt, ri->resetvalue);
|
tcg_gen_movi_i64(tcg_rt, ri->resetvalue);
|
||||||
} else if (ri->readfn) {
|
} else if (ri->readfn) {
|
||||||
TCGv_ptr tmpptr;
|
TCGv_ptr tmpptr;
|
||||||
gen_a64_set_pc_im(s->pc - 4);
|
|
||||||
tmpptr = tcg_const_ptr(ri);
|
tmpptr = tcg_const_ptr(ri);
|
||||||
gen_helper_get_cp_reg64(tcg_rt, cpu_env, tmpptr);
|
gen_helper_get_cp_reg64(tcg_rt, cpu_env, tmpptr);
|
||||||
tcg_temp_free_ptr(tmpptr);
|
tcg_temp_free_ptr(tmpptr);
|
||||||
|
@ -1244,7 +1243,6 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
|
||||||
return;
|
return;
|
||||||
} else if (ri->writefn) {
|
} else if (ri->writefn) {
|
||||||
TCGv_ptr tmpptr;
|
TCGv_ptr tmpptr;
|
||||||
gen_a64_set_pc_im(s->pc - 4);
|
|
||||||
tmpptr = tcg_const_ptr(ri);
|
tmpptr = tcg_const_ptr(ri);
|
||||||
gen_helper_set_cp_reg64(cpu_env, tmpptr, tcg_rt);
|
gen_helper_set_cp_reg64(cpu_env, tmpptr, tcg_rt);
|
||||||
tcg_temp_free_ptr(tmpptr);
|
tcg_temp_free_ptr(tmpptr);
|
||||||
|
|
|
@ -6876,7 +6876,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
||||||
tmp64 = tcg_const_i64(ri->resetvalue);
|
tmp64 = tcg_const_i64(ri->resetvalue);
|
||||||
} else if (ri->readfn) {
|
} else if (ri->readfn) {
|
||||||
TCGv_ptr tmpptr;
|
TCGv_ptr tmpptr;
|
||||||
gen_set_pc_im(s, s->pc);
|
|
||||||
tmp64 = tcg_temp_new_i64();
|
tmp64 = tcg_temp_new_i64();
|
||||||
tmpptr = tcg_const_ptr(ri);
|
tmpptr = tcg_const_ptr(ri);
|
||||||
gen_helper_get_cp_reg64(tmp64, cpu_env, tmpptr);
|
gen_helper_get_cp_reg64(tmp64, cpu_env, tmpptr);
|
||||||
|
@ -6899,7 +6898,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
||||||
tmp = tcg_const_i32(ri->resetvalue);
|
tmp = tcg_const_i32(ri->resetvalue);
|
||||||
} else if (ri->readfn) {
|
} else if (ri->readfn) {
|
||||||
TCGv_ptr tmpptr;
|
TCGv_ptr tmpptr;
|
||||||
gen_set_pc_im(s, s->pc);
|
|
||||||
tmp = tcg_temp_new_i32();
|
tmp = tcg_temp_new_i32();
|
||||||
tmpptr = tcg_const_ptr(ri);
|
tmpptr = tcg_const_ptr(ri);
|
||||||
gen_helper_get_cp_reg(tmp, cpu_env, tmpptr);
|
gen_helper_get_cp_reg(tmp, cpu_env, tmpptr);
|
||||||
|
@ -6934,7 +6932,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
||||||
tcg_temp_free_i32(tmphi);
|
tcg_temp_free_i32(tmphi);
|
||||||
if (ri->writefn) {
|
if (ri->writefn) {
|
||||||
TCGv_ptr tmpptr = tcg_const_ptr(ri);
|
TCGv_ptr tmpptr = tcg_const_ptr(ri);
|
||||||
gen_set_pc_im(s, s->pc);
|
|
||||||
gen_helper_set_cp_reg64(cpu_env, tmpptr, tmp64);
|
gen_helper_set_cp_reg64(cpu_env, tmpptr, tmp64);
|
||||||
tcg_temp_free_ptr(tmpptr);
|
tcg_temp_free_ptr(tmpptr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -6945,7 +6942,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
||||||
if (ri->writefn) {
|
if (ri->writefn) {
|
||||||
TCGv_i32 tmp;
|
TCGv_i32 tmp;
|
||||||
TCGv_ptr tmpptr;
|
TCGv_ptr tmpptr;
|
||||||
gen_set_pc_im(s, s->pc);
|
|
||||||
tmp = load_reg(s, rt);
|
tmp = load_reg(s, rt);
|
||||||
tmpptr = tcg_const_ptr(ri);
|
tmpptr = tcg_const_ptr(ri);
|
||||||
gen_helper_set_cp_reg(cpu_env, tmpptr, tmp);
|
gen_helper_set_cp_reg(cpu_env, tmpptr, tmp);
|
||||||
|
|
Loading…
Reference in a new issue