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: joern dot rennecke at superh dot com (Joern Rennecke), gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Aug 2004 13:16:17 +0100 (BST)
- Subject: Re: [PATCH - SH] trap_exit and sp_switch with interrupt_handler attribute
> > I would welcome a cleanup in this area, however, you have predicate
> > functions with side effects, including producing garbage.
>
> Yes that is right but how can I do away with garbage?
>
> > Is there any good reason not get get rid of the variables=20
> > trap_exit and
> > sp_switch altogether?
>
> I have kept them to hold values of trap_exit and sp_switch attributes =
> and use them outside the function. Also sp_switch is used to get symbol =
> reference in sp_switch_1 insn.
I don't see anywhere where they are used where it would make any noticable
difference to performance to use the attributes consistently.
Make your predicates return a boolean, or just have a function that returns
the string from the attribute, to get rid of the garbage.