]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - target-mips/helper.c
qemu-common: push cpu.h inclusion out of qemu-common.h
[thirdparty/qemu.git] / target-mips / helper.c
index cfea177ee55eb295e67de5d12e03df25195b5369..1f35e7ff87a21786b93eb80b0c450586794d99cd 100644 (file)
@@ -840,3 +840,20 @@ void r4k_invalidate_tlb (CPUMIPSState *env, int idx, int use_extra)
     }
 }
 #endif
+
+void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
+                                          uint32_t exception,
+                                          int error_code,
+                                          uintptr_t pc)
+{
+    CPUState *cs = CPU(mips_env_get_cpu(env));
+
+    if (exception < EXCP_SC) {
+        qemu_log_mask(CPU_LOG_INT, "%s: %d %d\n",
+                      __func__, exception, error_code);
+    }
+    cs->exception_index = exception;
+    env->error_code = error_code;
+
+    cpu_loop_exit_restore(cs, pc);
+}