This is the mail archive of the gcc@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: decl_conflicts_with_clobbers_p problem


> Date: Fri, 14 Mar 2003 12:21:18 +0100
> From: Gunther Nikl <gni at gecko dot de>

> > Or without code changes elsewhere than
> > the macro definition, use a trick like
> >  #define LP1NR(offs, name, t1, v1, r1, bt, bn) LP1NR_##r1 (offs, name, t1, v1, bt, bn)
> > and define different
> >  #define LP1NR_a1(offs, name, t1, v1, r1, bt, bn) ...
> >  #define LP1NR_d0(offs, name, t1, v1, r1, bt, bn) ...
> > with contents where each different "r1" is listed as output and
> > not in the clobber list?  Or just parametrize the clobber list?
> 
>   This would result in a lot of macros because the arguments are in a
>   "random" order and unpredictable.

So there's not just *one* register, as was in your example?
That information was missing from your email.  Sorry, then I'm
all out of suggestions.

> > You *have* to list the register that is changed as output.  This
> > is not really a change; your asm was in error before too, GCC
> > just didn't notice; it'd silently generated wrong code instead.
> 
>   Yes, according the (3.x?) documentation the asm is wrong.

As I said, the documentation also said that before the error
message was implemented.

> However, I have
>   never seen incorrect code beeing generated (which doesn't prove anything,
>   granted) and I have used GCC alot on the system in question where these
>   asm statements are required.

Well, a programmer here saw it happen.  See the URL I quoted.
That's really enough, isn't it?  Having GCC corrected to work
according to the documentation saves *you* the trouble to trip
over a code-generation compiler bug.  I can't really understand
your argument.

>   I guess creating an appropriate macro for every function is the only
>   viable solution.

Well, good, you found a solution.

brgds, H-P


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