ARM: Support for interrupt functions - mk II

Philip Blundell philb@gnu.org
Tue Sep 19 23:16:00 GMT 2000


>+     case FT_ISR:
>+     case FT_EXCEPTION:
>+       /* Interrupt and exception handlers work with their own set of
>+ 	 banked registers, so there is no need to save any of them
>+ 	 onto the stack upon function entry.  */
>+       break;
>+ 
>+     case FT_FIQ:
>+       /* FIQ handlers only have registers r0 - r7 banked, so
>+ 	 if they corrupt any others, they must save them.  */
>+       for (reg = 8; reg <= 12; reg++)
>+ 	if (regs_ever_live[reg])
>+ 	  save_reg_mask |= (1 << reg);
>+       break;

Hi Nick,

This is exactly backwards.  FIQ mode has R8..R14 banked, it's R0-R7 that must 
be saved.  IRQ and exception modes only bank R13 and R14 so everything must be 
saved.

p.




More information about the Gcc-patches mailing list