buserror-uk/simavr — pull request #48 by bsekisser (2014-02-26 13:23:18+00:00)
Title: sim_interupts: simplification of interrupt handling

changes interrupt handling use of fifo to a more simple and less
complex bitmap approach. for interrupt intensive simulations this
can save hundres of cycles per interrupt.

the fifo approach touches memory to sort and check the queue,
dependent on number of interrupts in queue... using bitmaps
setting and clearing interupts is more alu dependant ie. in
register/processor and relatively independant of number of
interrupts... the ffs() function, or find first set, is used
since this may be tailored to use processor features available
relative to a native build.

modified: simavr/sim/run_avr.c
modified: simavr/sim/sim_interrupts.c
modified: simavr/sim/sim_interrupts.h