]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target-microblaze/op_helper.c
block/parallels: create bat_entry_off helper
[mirror_qemu.git] / target-microblaze / op_helper.c
index 9e394114c8a9c084a2955e2b02c8b302be741fa0..a4c8f047057bc99387938f0e0062028feddce663 100644 (file)
 
 #include <assert.h>
 #include "cpu.h"
-#include "helper.h"
+#include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
+#include "exec/cpu_ldst.h"
 
 #define D(x)
 
 #if !defined(CONFIG_USER_ONLY)
-#include "exec/softmmu_exec.h"
-
-#define MMUSUFFIX _mmu
-#define SHIFT 0
-#include "exec/softmmu_template.h"
-#define SHIFT 1
-#include "exec/softmmu_template.h"
-#define SHIFT 2
-#include "exec/softmmu_template.h"
-#define SHIFT 3
-#include "exec/softmmu_template.h"
 
 /* Try to fill the TLB and return an exception if error. If retaddr is
  * NULL, it means that the function was called in C code (i.e. not
@@ -49,14 +39,11 @@ void tlb_fill(CPUState *cs, target_ulong addr, int is_write, int mmu_idx,
 
     ret = mb_cpu_handle_mmu_fault(cs, addr, is_write, mmu_idx);
     if (unlikely(ret)) {
-        MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
-        CPUMBState *env = &cpu->env;
-
         if (retaddr) {
             /* now we have a real cpu fault */
-            cpu_restore_state(env, retaddr);
+            cpu_restore_state(cs, retaddr);
         }
-        cpu_loop_exit(env);
+        cpu_loop_exit(cs);
     }
 }
 #endif
@@ -101,7 +88,7 @@ void helper_raise_exception(CPUMBState *env, uint32_t index)
     CPUState *cs = CPU(mb_env_get_cpu(env));
 
     cs->exception_index = index;
-    cpu_loop_exit(env);
+    cpu_loop_exit(cs);
 }
 
 void helper_debug(CPUMBState *env)