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]
Other format: [Raw text]

RE: [PATCH - SH] trap_exit and sp_switch with interrupt_handler attribute


 --- "Asgari J. Jinia" <AsgariJ@KPITCummins.com> wrote: 
> In following patch I have tried to correct sp_switch insn. I have to add
> "global_regs[0] = 1;" in the sp_switch2 insn because with "-O2" option
> compiler removes popping of r0 register from the epilogue.

That doesn't look right.  Try to use EPILOGUE_USES instead.
> 
>
------------------------------------------------------------------------------
> gcc\ChangeLog:
> 2004-11-24  Asgari Jinia  <asgarij@kpitcummins.com>
> 
> 	* config/sh/sh.c (sh_cfun_sp_switch_handler_p): Added.
>       Returns true if current function has sp_switch attribute.

You still have the side effect of setting sp_switch in a 'predicate'
function.  Please make sp_switch_1 look up the attribute instead, and remove
the sp_switch variable.


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