qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/6] cris: Abort when a v10 takes interrupts while i


From: edgar . iglesias
Subject: [Qemu-devel] [PATCH 2/6] cris: Abort when a v10 takes interrupts while in a delayslot
Date: Sun, 2 Feb 2014 03:04:48 +0000

From: "Edgar E. Iglesias" <address@hidden>

This is an internal error as the CRISv10 should mask interrupts
while executing delay slots. Bail out sooner rather than later.

Signed-off-by: Edgar E. Iglesias <address@hidden>
---
 target-cris/helper.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target-cris/helper.c b/target-cris/helper.c
index d274b38..c940582 100644
--- a/target-cris/helper.c
+++ b/target-cris/helper.c
@@ -126,6 +126,11 @@ void crisv10_cpu_do_interrupt(CPUState *cs)
           env->exception_index,
           cs->interrupt_request);
 
+    if (env->dslot) {
+        /* CRISv10 never takes interrupts while in a delay-slot.  */
+        cpu_abort(env, "CRIS: Interrupt on delay-slot\n");
+    }
+
     assert(!(env->pregs[PR_CCS] & PFIX_FLAG));
     switch (env->exception_index) {
     case EXCP_BREAK:
-- 
1.8.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]