summary refs log tree commit diff stats
path: root/target-unicore32/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-unicore32/helper.c')
-rw-r--r--target-unicore32/helper.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c
index e5ebbf4b18..b4654fa98a 100644
--- a/target-unicore32/helper.c
+++ b/target-unicore32/helper.c
@@ -250,3 +250,18 @@ int uc32_cpu_handle_mmu_fault(CPUState *cs, vaddr address,
     return 1;
 }
 #endif
+
+bool uc32_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
+{
+    if (interrupt_request & CPU_INTERRUPT_HARD) {
+        UniCore32CPU *cpu = UNICORE32_CPU(cs);
+        CPUUniCore32State *env = &cpu->env;
+
+        if (!(env->uncached_asr & ASR_I)) {
+            cs->exception_index = UC32_EXCP_INTR;
+            uc32_cpu_do_interrupt(cs);
+            return true;
+        }
+    }
+    return false;
+}