microblaze: Restore env when raising unmapped bus access.
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Thu, 12 Nov 2009 01:14:45 +0000 (02:14 +0100)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Thu, 12 Nov 2009 01:14:45 +0000 (02:14 +0100)
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
target-microblaze/op_helper.c

index ee4f6231319ddff096be4ddab83b4f704a9f7637..a342467d58e878fdbfee59cdce985b1ed9c6de93 100644 (file)
@@ -249,6 +249,7 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
     qemu_log_mask(CPU_LOG_INT, "Unassigned " TARGET_FMT_plx " wr=%d exe=%d\n",
              addr, is_write, is_exec);
     if (!(env->sregs[SR_MSR] & MSR_EE)) {
+        env = saved_env;
         return;
     }
 
@@ -264,4 +265,5 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
             helper_raise_exception(EXCP_HW_EXCP);
         }
     }
+    env = saved_env;
 }