summaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-01-18 04:07:48 +0000
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-02-03 14:03:59 +0000
commitd66433ffdced6537ab7e6c423a8f14091c51e3e2 (patch)
tree6fcf7c4d5544937ee39a8b559e3760a13ae4e5fd /target-cris
parentfd5d5afad8e7b92181ddfccd5639be9775456bec (diff)
cris: Abort when a v10 takes interrupts while in a delayslot
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 <edgar.iglesias@xilinx.com>
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c
index d274b388b8..c940582132 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: