This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH - SH] trap_exit and sp_switch with interrupt_handler attribute
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: AsgariJ at KPITCummins dot com (Asgari J. Jinia)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Jul 2004 17:13:00 +0100 (BST)
- Subject: Re: [PATCH - SH] trap_exit and sp_switch with interrupt_handler attribute
> Hi,
>
> I had posted a patch for gcc3.3 regarding supporting 'trap_exit' and
> 'sp_switch' attributes with 'interrupt_handler attribute'. With gcc3.4=20
> onwards due to unit-at-a-time compilation scheme, it is not working with =
>
> optimization (-O2,-O3,-Os). I have modified it to work with gcc3.4 and=20
> regression tested it with gcc3.4-20040709. This patch also removes=20
> problem of pragma_interrupt with optimization which declares all =
> functions
> below function declared with #pragma_inetrrupt as interrupt handlers.
> Ok to apply to gcc3.4 and gcc3.5?
I would welcome a cleanup in this area, however, you have predicate
functions with side effects, including producing garbage.
Is there any good reason not get get rid of the variables trap_exit and
sp_switch altogether?
A patch for gcc 3.5 would have to be tested in 3.5 before it could be applied.
> + if (sh_cfun_trap_exit_p())
The GNU coding standard requires a blank between the function name and
the opening paranthesis.