summaryrefslogtreecommitdiff
path: root/target-sparc/int64_helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-04-15 10:49:04 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-04-15 10:49:04 +0100
commit538a467329818ea831f602491ac62d7d7999102a (patch)
treef1e2252843cadd5a8a854ce702d9a8b3ab64e19c /target-sparc/int64_helper.c
parentbc8995cafa0c36b9e4be682e9a60d59484b33500 (diff)
parentde5f1077446ca455342db149737bdc395a7b9882 (diff)
downloadqemu-538a467329818ea831f602491ac62d7d7999102a.tar.gz
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging
qemu-sparc update # gpg: Signature made Fri 15 Apr 2016 09:30:58 BST using RSA key ID AE0F321F # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" * remotes/mcayland/tags/qemu-sparc-signed: target-sparc: fix Trap Based Address Register behavior for sparc64 target-sparc: fix Nucleus quad LDD 128 bit access for windowed registers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-sparc/int64_helper.c')
-rw-r--r--target-sparc/int64_helper.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/target-sparc/int64_helper.c b/target-sparc/int64_helper.c
index aa876cd8ba..29360fa5fe 100644
--- a/target-sparc/int64_helper.c
+++ b/target-sparc/int64_helper.c
@@ -158,9 +158,8 @@ void sparc_cpu_do_interrupt(CPUState *cs)
} else if ((intno & 0x1c0) == TT_FILL) {
cpu_set_cwp(env, cpu_cwp_inc(env, env->cwp + 1));
}
- env->tbr &= ~0x7fffULL;
- env->tbr |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
- env->pc = env->tbr;
+ env->pc = env->tbr & ~0x7fffULL;
+ env->pc |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
env->npc = env->pc + 4;
cs->exception_index = -1;
}