From: Michel Pollet Date: Tue, 7 Mar 2017 18:37:42 +0000 (+0000) Subject: IRQs: Trace the pending vectors X-Git-Tag: v1.6~48^2~4 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=2a7aa7d853046e7b17779f4a558ddf8ef5343570;p=sx%2Fsimavr.git IRQs: Trace the pending vectors Trace pending vectors, and use the new 'float' option when nothing is pending Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/sim_interrupts.c b/simavr/sim/sim_interrupts.c index 8cd0dd1..ab5fd9f 100644 --- a/simavr/sim/sim_interrupts.c +++ b/simavr/sim/sim_interrupts.c @@ -164,8 +164,11 @@ avr_clear_interrupt( vector->pending = 0; avr_raise_irq(vector->irq + AVR_INT_IRQ_PENDING, 0); - avr_raise_irq(avr->interrupts.irq + AVR_INT_IRQ_PENDING, - avr_has_pending_interrupts(avr)); + avr_raise_irq_float(avr->interrupts.irq + AVR_INT_IRQ_PENDING, + avr_has_pending_interrupts(avr) ? + avr_int_pending_read_at( + &avr->interrupts.pending, 0)->vector : 0, + !avr_has_pending_interrupts(avr)); if (vector->raised.reg && !vector->raise_sticky) avr_regbit_clear(avr, vector->raised);