From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9nMp-0006ef-EG for qemu-devel@nongnu.org; Sat, 01 Feb 2014 22:05:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9nMj-00034F-KM for qemu-devel@nongnu.org; Sat, 01 Feb 2014 22:05:07 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:53464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9nMj-00033g-B1 for qemu-devel@nongnu.org; Sat, 01 Feb 2014 22:05:01 -0500 Received: by mail-pa0-f50.google.com with SMTP id kp14so5870271pab.37 for ; Sat, 01 Feb 2014 19:05:00 -0800 (PST) Received: from localhost (ec2-54-206-39-244.ap-southeast-2.compute.amazonaws.com. [54.206.39.244]) by mx.google.com with ESMTPSA id ac5sm12800461pbc.37.2014.02.01.19.04.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 01 Feb 2014 19:05:00 -0800 (PST) From: edgar.iglesias@gmail.com Date: Sun, 2 Feb 2014 03:04:48 +0000 Message-Id: <1391310292-18008-3-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1391310292-18008-1-git-send-email-edgar.iglesias@gmail.com> References: <1391310292-18008-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH 2/6] cris: Abort when a v10 takes interrupts while in a delayslot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: "Edgar E. Iglesias" 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 --- 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