]> git.proxmox.com Git - qemu.git/blobdiff - target-mips/op_helper.c
cpu: Turn cpu_unassigned_access() into a CPUState hook
[qemu.git] / target-mips / op_helper.c
index 3fa0d00cf924e3d568b72fdc2345e75115d4488c..f6838ecd5f4e37b46807087e1f031f2081c0e3f4 100644 (file)
@@ -2147,13 +2147,18 @@ void tlb_fill(CPUMIPSState *env, target_ulong addr, int is_write, int mmu_idx,
     }
 }
 
-void cpu_unassigned_access(CPUMIPSState *env, hwaddr addr,
-                           int is_write, int is_exec, int unused, int size)
+void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr,
+                                bool is_write, bool is_exec, int unused,
+                                unsigned size)
 {
-    if (is_exec)
+    MIPSCPU *cpu = MIPS_CPU(cs);
+    CPUMIPSState *env = &cpu->env;
+
+    if (is_exec) {
         helper_raise_exception(env, EXCP_IBE);
-    else
+    } else {
         helper_raise_exception(env, EXCP_DBE);
+    }
 }
 #endif /* !CONFIG_USER_ONLY */