[PATCH] MIPS gas: Fix macro expansions for .set noat

Maciej W. Rozycki macro@linux-mips.org
Thu Feb 17 02:02:00 GMT 2005


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



More information about the Binutils mailing list