From: Alan Modra <amodra@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: PR30308, infinite recursion in i386_intel_simplify
Date: Thu, 15 Feb 2024 21:20:42 +1030 [thread overview]
Message-ID: <Zc3sgv52AOtyJNmU@squeak.grove.modra.org> (raw)
In-Reply-To: <671bff39-485f-46b6-86d8-dcfd8568e98d@suse.com>
On Thu, Feb 15, 2024 at 10:23:16AM +0100, Jan Beulich wrote:
> On 15.02.2024 02:28, Alan Modra wrote:
> > This patch exposes the symbol "resolving" flag for use in
> > i386_intel_simplify, not only preventing infinite recursion on the
> > testcase in the PR but also more complicated cases like:
> >
> > .intel_syntax
> > b = a
> > a = b
> > mov eax, [a]
>
> Thanks for addressing this. I wonder though: Wouldn't such circular
> equates better be rejected when they're created?
I wouldn't be inclined to do that. If the symbols are unused then
they don't cause any problem.
> > +/* Return whether a symbol is being resolved. */
> > +
> > +int
> > +symbol_resolving_p (symbolS *s)
> > +{
> > + return s->flags.resolving;
> > +}
>
> Mind me asking that such predicate (and alike) functions, when introduced
> anew, take pointer-to-const right away?
Yes, that would have been a good idea.
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2024-02-15 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 1:28 Alan Modra
2024-02-15 9:23 ` Jan Beulich
2024-02-15 10:50 ` Alan Modra [this message]
2024-02-15 11:31 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zc3sgv52AOtyJNmU@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).