summaryrefslogtreecommitdiffstats
path: root/target/arm/translate.c
diff options
context:
space:
mode:
authorRichard Henderson2021-11-03 05:03:44 +0100
committerPeter Maydell2021-12-15 11:35:26 +0100
commitbf9dd2aa5fd88f0c161ff857342484f0fb42ff3f (patch)
treeb803f5626fe1e20a771b85a12f107a07bf816e0c /target/arm/translate.c
parenttarget/arm: Hoist pc_next to a local variable in aarch64_tr_translate_insn (diff)
downloadqemu-bf9dd2aa5fd88f0c161ff857342484f0fb42ff3f.tar.gz
qemu-bf9dd2aa5fd88f0c161ff857342484f0fb42ff3f.tar.xz
qemu-bf9dd2aa5fd88f0c161ff857342484f0fb42ff3f.zip
target/arm: Hoist pc_next to a local variable in arm_tr_translate_insn
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/translate.c')
-rw-r--r--target/arm/translate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 98f5925928..c721b2ce42 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -9548,17 +9548,18 @@ static void arm_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
CPUARMState *env = cpu->env_ptr;
+ uint32_t pc = dc->base.pc_next;
unsigned int insn;
if (arm_pre_translate_insn(dc)) {
- dc->base.pc_next += 4;
+ dc->base.pc_next = pc + 4;
return;
}
- dc->pc_curr = dc->base.pc_next;
- insn = arm_ldl_code(env, &dc->base, dc->base.pc_next, dc->sctlr_b);
+ dc->pc_curr = pc;
+ insn = arm_ldl_code(env, &dc->base, pc, dc->sctlr_b);
dc->insn = insn;
- dc->base.pc_next += 4;
+ dc->base.pc_next = pc + 4;
disas_arm_insn(dc, insn);
arm_post_translate_insn(dc);