summaryrefslogtreecommitdiffstats
path: root/target-alpha/helper.c
diff options
context:
space:
mode:
authorRichard Henderson2014-06-28 22:06:19 +0200
committerRichard Henderson2015-05-18 22:03:46 +0200
commitba9c5de5f2d33d468a07a8794121472ea031a0b5 (patch)
treef0efcd2cad8edba21b68e0b0feb41959b5454f66 /target-alpha/helper.c
parenttarget-alpha: Forget installed round mode after MT_FPCR (diff)
downloadqemu-ba9c5de5f2d33d468a07a8794121472ea031a0b5.tar.gz
qemu-ba9c5de5f2d33d468a07a8794121472ea031a0b5.tar.xz
qemu-ba9c5de5f2d33d468a07a8794121472ea031a0b5.zip
target-alpha: Set PC correctly for floating-point exceptions
PC should be one past the faulting insn. Add better commentary for the machine-check exception path. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/helper.c')
-rw-r--r--target-alpha/helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-alpha/helper.c b/target-alpha/helper.c
index a8aa782a2a..e202fee659 100644
--- a/target-alpha/helper.c
+++ b/target-alpha/helper.c
@@ -571,6 +571,8 @@ void QEMU_NORETURN dynamic_excp(CPUAlphaState *env, uintptr_t retaddr,
env->error_code = error;
if (retaddr) {
cpu_restore_state(cs, retaddr);
+ /* Floating-point exceptions (our only users) point to the next PC. */
+ env->pc += 4;
}
cpu_loop_exit(cs);
}