Re: RFA: RL78: Improve interrupt function generation

2013-05-08 Thread DJ Delorie
> Yes - in fact this appears to be a general problem with RL78 interrupt > handlers. There are no instructions to push/pop the current bank > selection, so in order for nested interrupt handlers to work they would > have to do something like: The bank select bits are in PSW, which is automati

Re: RFA: RL78: Improve interrupt function generation

2013-05-08 Thread nick clifton
Hi DJ, * Uses register bank 3 instead of register bank 0 inside the handler. I wonder if nested interrupts will cause problems, since the second interrupt will occur with RB3 already selected. Yes - in fact this appears to be a general problem with RL78 interrupt handlers. Ther

Re: RFA: RL78: Improve interrupt function generation

2013-05-06 Thread DJ Delorie
> * Uses register bank 3 instead of register bank 0 inside the > handler. I wonder if nested interrupts will cause problems, since the second interrupt will occur with RB3 already selected. Also, there are some hand-coded routines in libgloss/libgcc that manually swap banks, they'd hav

RFA: RL78: Improve interrupt function generation

2013-05-01 Thread Nick Clifton
Hi DJ, The patch below makes some changes to the way the RL78 backend handles the generation of interrupt functions. Specifically it: * Uses register bank 3 instead of register bank 0 inside the handler. * Tweaks the need_to_save() function so only those registers that w