Skip to content

Commit

Permalink
cris: Abort when a v10 takes interrupts while in a delayslot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
edgarigl committed Feb 3, 2014
1 parent fd5d5af commit d66433f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions target-cris/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d66433f

Please sign in to comment.