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


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


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