On 29.07.2015 23:29, Alan Cox wrote:
>> The information might be useful in improving a workaround for a hardware
>> division issue (see bug #2401, RFE #448 / 449).
> 
> As a ps to this, I think the question is a bit wider
> (although I note you
> fixed the bug anyway).

Currently the bugfix / hardware bug workaround adds a preamble of
instructions costing 6 bytes / 5 cycles to every interrupt handler.
It might be worth to analyze the interrupt handler, and if we find that
there can be no divisions, we could omit the preamble. So if in the
iCode, there are no function calls, no divisions, no inline asm, etc, we
omit the preamble.

> An interrupt in a divison which causes a context
> switch with any kind of taskswitcher/threader will also break when there
> is a divide in another thread that is scheduled.

I am not familiar with context switches. I guess they would have to be
implemented in asm or relying on behviour that is undefined in C.

Philipp


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to