This is the mail archive of the
mailing list for the binutils project.
Re: Fix sim fallout from arm assembler complaining about symbols named as insns
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: Nicholas Clifton <nickc at redhat dot com>
- Cc: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 6 May 2015 14:49:23 +0100
- Subject: Re: Fix sim fallout from arm assembler complaining about symbols named as insns
- Authentication-results: sourceware.org; auth=none
- References: <201505020017 dot t420Hn09026225 at ignucius dot se dot axis dot com> <5549EEDC dot 7040707 at redhat dot com>
On Wed, May 06, 2015 at 11:37:16AM +0100, Nicholas Clifton wrote:
> Hi Hans-Peter,
> > I'm not completely sure this new gas warning is a good thing.
> > I mean, symbols such as those below don't really interfere with
> > the insn namespace, do they?
> No, but they can be a little bit confusing and the problem I was trying
> to solve, of an instruction name being mistakenly treated as a symbol,
> is genuine. It would be better I agree to restrict this check to just
> the case where the "=" assignment operator is being used, but I did not
> want to modify generic code. Maybe I should have done that. :-(
Yes. I think the warning should just restrict to cases where it can possibly
go wrong. There can be too many false positives with the current solution as
it warns if a symbol name merely matches a mnemonic.
For example, simply having a global variable called "str" in a C program (which
is perfectly valid) can trigger this warning. In fact quite a few gcc tests
fail at the moment because of this.
> > To wit, right now, the new symbol "sanity-check" causes failures
> > for --target arm-eabi check-sim:
> So it does. I should have checked that before committing the patch. Sorry.
> > +2015-05-02 Hans-Peter Nilsson <firstname.lastname@example.org>
> > +
> > + * bl.cgs (bl0): Rename from symbol colliding with insn name bl.
> > + * iwmmxt/tmia.cgs (tmia0): Similar.
> > + * iwmmxt/tmiaph.cgs (tmiaph0): Similar.
> > + * iwmmxt/waligni.cgs (waligni0): Similar.
> > + * iwmmxt/wand.cgs (wand0): Similar.
> > + * iwmmxt/wandn.cgs (wandn0): Similar.
> > + * iwmmxt/wmov.cgs (wmov0): Similar.
> > + * iwmmxt/wor.cgs (wor0): Similar.
> > + * iwmmxt/wshufh.cgs (wshuf0): Similar.
> > + * iwmmxt/wxor.cgs (wxor0): Similar.
> > + * iwmmxt/wzero.cgs (wzero0): Similar.
> > + * xscale/mia.cgs (mia0): Similar.
> > + * xscale/miaph.cgs (miaph0): Similar.
> I think that this is a good solution - please apply.