aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target-alpha/helper.c2
-rw-r--r--target-s390x/kvm.c4
-rw-r--r--target-sh4/helper.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/target-alpha/helper.c b/target-alpha/helper.c
index be7d37b0d..1e0bc4a15 100644
--- a/target-alpha/helper.c
+++ b/target-alpha/helper.c
@@ -467,7 +467,7 @@ void do_interrupt (CPUState *env)
env->ipr[IPR_EXC_ADDR] = env->pc | 1;
excp = env->exception_index;
- env->exception_index = 0;
+ env->exception_index = -1;
env->error_code = 0;
/* XXX: disable interrupts and memory mapping */
if (env->ipr[IPR_PAL_BASE] != -1ULL) {
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 099256392..0199a650f 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -186,7 +186,7 @@ static void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
}
env->halted = 0;
- env->exception_index = 0;
+ env->exception_index = -1;
kvmint.type = type;
kvmint.parm = parm;
@@ -325,7 +325,7 @@ static int s390_cpu_restart(CPUState *env)
{
kvm_s390_interrupt(env, KVM_S390_RESTART, 0);
env->halted = 0;
- env->exception_index = 0;
+ env->exception_index = -1;
qemu_cpu_kick(env);
dprintf("DONE: SIGP cpu restart: %p\n", env);
return 0;
diff --git a/target-sh4/helper.c b/target-sh4/helper.c
index f38e6abda..d2ff6691e 100644
--- a/target-sh4/helper.c
+++ b/target-sh4/helper.c
@@ -38,7 +38,7 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
int mmu_idx, int is_softmmu)
{
env->tea = address;
- env->exception_index = 0;
+ env->exception_index = -1;
switch (rw) {
case 0:
env->exception_index = 0x0a0;