summaryrefslogtreecommitdiff
path: root/target-mips/helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-09-13 09:45:29 -0700
committerPeter Maydell <peter.maydell@linaro.org>2014-09-25 18:54:22 +0100
commitfa4faba448046574c8c820098ed46c9a0b5589a6 (patch)
tree53d5c020e1f981c3aafb4eb01fcee4a6527cebbb /target-mips/helper.c
parentdfdb483454f8fcaab5ba55a0342cd5e3aec8815a (diff)
downloadqemu-fa4faba448046574c8c820098ed46c9a0b5589a6.tar.gz
target-mips: Use cpu_exec_interrupt qom hook
Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Tested-by: Leon Alrae <leon.alrae@imgtec.com> Message-id: 1410626734-3804-19-git-send-email-rth@twiddle.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-mips/helper.c')
-rw-r--r--target-mips/helper.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/target-mips/helper.c b/target-mips/helper.c
index 8a997e44e5..fe16820885 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -675,6 +675,23 @@ void mips_cpu_do_interrupt(CPUState *cs)
cs->exception_index = EXCP_NONE;
}
+bool mips_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
+{
+ if (interrupt_request & CPU_INTERRUPT_HARD) {
+ MIPSCPU *cpu = MIPS_CPU(cs);
+ CPUMIPSState *env = &cpu->env;
+
+ if (cpu_mips_hw_interrupts_pending(env)) {
+ /* Raise it */
+ cs->exception_index = EXCP_EXT_INTERRUPT;
+ env->error_code = 0;
+ mips_cpu_do_interrupt(cs);
+ return true;
+ }
+ }
+ return false;
+}
+
#if !defined(CONFIG_USER_ONLY)
void r4k_invalidate_tlb (CPUMIPSState *env, int idx, int use_extra)
{