This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] MIPS gas: Fix macro expansions for .set noat
On Wed, 16 Feb 2005, Thiemo Seufer wrote:
> > More comments about that change -- as I understand our policy wrt $at
> > being used with ".set noat" in effect is to go for it regardless and only
> > issue a warning (that can be converted to an error with --fatal-warnings).
> > Therefore we shouldn't use as_bad() in this case.
>
> IMHO it should be an error if the result can't work at all. I don't
> see a case where overwriting the base register before its use could
> be the programmers intention.
I do agree it's of questionable use and I proposed changing it a few
years ago, but I got a response as I expressed above. Then if it's to be
done, it should be done consistently for all cases -- replacing respective
as_warn() calls with as_bad() ones should be the right way.
Note that the Alpha port has always treated using $at with ".set noat" in
effect as an error.
> > Moreover, the situation
> > is actually already handled in general -- see the bottom exit point from
> > macro() -- so we should really only track down the failing execution path
> > within that function and check whether its epilogue correctly executes a
> > functional equivalent of this code:
> >
> > if (used_at)
> > break;
> > else
> > return;
>
> This causes "used $at in .set noat" warnings. That's a rather confusing
> message, given that no use of $at was specified in the source.
It's actually 'Macro used $at after ".set noat"' and I think it's
perfectly clear.
Maciej