From f706de00bb38837f4be5ac24a9a6719161e47e5f Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 3 Oct 2009 16:45:29 +0000 Subject: [PATCH] - _irq_dispatch(): IP masked by IM in software Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@493 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/bsp/examples/irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/CPUs/MIPS/bsp/examples/irq.c b/lib/CPUs/MIPS/bsp/examples/irq.c index bcd8d98..85e1320 100644 --- a/lib/CPUs/MIPS/bsp/examples/irq.c +++ b/lib/CPUs/MIPS/bsp/examples/irq.c @@ -12,9 +12,10 @@ static fp_irq_t g_irq_handler[MAX_NUM_IRQ] = {NULL}; int _irq_dispatch(struct xcptcontext * xcp) { - int i, ip; + int i, ip, cause; - ip = (xcp->cr >> 8) & 0xFF; + cause = xcp->cr & xcp->sr; + ip = (cause >> 8) & 0xFF; for (i=0; i < MAX_NUM_IRQ; i++) {