public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: wwwhhhyyy333@gmail.com, binutils@sourceware.org
Subject: Re: [PATCH] x86: Disallow APX instruction with length > 15 bytes
Date: Fri, 2 Feb 2024 08:23:42 +0100	[thread overview]
Message-ID: <dd7d585a-fd8c-433a-b00b-48420bf706a6@suse.com> (raw)
In-Reply-To: <20240201224749.214439-1-hjl.tools@gmail.com>

On 01.02.2024 23:47, H.J. Lu wrote:
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -11772,8 +11772,14 @@ output_insn (const struct last_insn *last_insn)
>  	{
>  	  j = encoding_length (insn_start_frag, insn_start_off, frag_more (0));
>  	  if (j > 15)
> -	    as_warn (_("instruction length of %u bytes exceeds the limit of 15"),
> -		     j);
> +	    {
> +	      if (i.tm.cpu.bitfield.cpuapx_f)
> +		as_bad (_("instruction length of %u bytes exceeds the limit of 15"),
> +			j);
> +	      else
> +		as_warn (_("instruction length of %u bytes exceeds the limit of 15"),
> +			 j);
> +	    }

Why would APX insns be different from others? IOW I continue to think that
having a warning here is good enough, uniformly. And it's quite sad that
with introducing APX the limit isn't raised, to accommodate all valid insn
forms (not considering ones with redundant prefixes, of course). _That_
would then permit special casing APX here, in _not_ warning anymore.

Jan

  reply	other threads:[~2024-02-02  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 22:47 H.J. Lu
2024-02-02  7:23 ` Jan Beulich [this message]
2024-02-02 11:36   ` H.J. Lu

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=dd7d585a-fd8c-433a-b00b-48420bf706a6@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=wwwhhhyyy333@gmail.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).