Handle EBase properly.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 5 Apr 2007 23:18:13 +0000 (23:18 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 5 Apr 2007 23:18:13 +0000 (23:18 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2613 c046a42c-6fe2-441c-8c8c-71466251a162

target-mips/helper.c

index 2572050..dc51814 100644 (file)
@@ -398,7 +398,7 @@ void do_interrupt (CPUState *env)
         if (env->CP0_Status & (1 << CP0St_BEV)) {
             env->PC = (int32_t)0xBFC00200;
         } else {
-            env->PC = (int32_t)0x80000000;
+            env->PC = (int32_t)(env->CP0_EBase & ~0x3ff);
         }
         env->PC += offset;
         env->CP0_Cause = (env->CP0_Cause & ~0x7C) | (cause << 2);