]> git.proxmox.com Git - qemu.git/blobdiff - target-sh4/op_helper.c
softmmu_header: pass CPUState to tlb_fill
[qemu.git] / target-sh4 / op_helper.c
index 163858f5605fe04f0a8f36ff543195cab60aef3d..b2995766510c01caed1a1d52caf1b93cb41539d0 100644 (file)
@@ -55,15 +55,14 @@ static void cpu_restore_state_from_retaddr(void *retaddr)
 #define SHIFT 3
 #include "softmmu_template.h"
 
-void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr)
+void tlb_fill(CPUState *env1, target_ulong addr, int is_write, int mmu_idx,
+              void *retaddr)
 {
     CPUState *saved_env;
     int ret;
 
-    /* XXX: hack to restore env in all cases, even if not called from
-       generated code */
     saved_env = env;
-    env = cpu_single_env;
+    env = env1;
     ret = cpu_sh4_handle_mmu_fault(env, addr, is_write, mmu_idx);
     if (ret) {
         /* now we have a real cpu fault */