This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ARM: Support for interrupt functions - mk II


>+     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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]