public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: PR30308, infinite recursion in i386_intel_simplify
Date: Thu, 15 Feb 2024 10:23:16 +0100	[thread overview]
Message-ID: <671bff39-485f-46b6-86d8-dcfd8568e98d@suse.com> (raw)
In-Reply-To: <Zc1osM8Uw97ZVfni@squeak.grove.modra.org>

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?

> +/* 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?

Jan

  reply	other threads:[~2024-02-15  9:23 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 [this message]
2024-02-15 10:50   ` Alan Modra
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=671bff39-485f-46b6-86d8-dcfd8568e98d@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /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).