From: Jan Beulich <jbeulich@suse.com>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: hjl.tools@gmail.com, binutils@sourceware.org
Subject: Re: [PATCH 2/3] Add check for 8-bit old registers in EVEX format
Date: Tue, 21 May 2024 14:24:45 +0200 [thread overview]
Message-ID: <d11158f8-3dce-45c0-9de3-b03f15c9097f@suse.com> (raw)
In-Reply-To: <20240520062202.1297234-3-lili.cui@intel.com>
On 20.05.2024 08:22, Cui, Lili wrote:
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -4311,10 +4311,10 @@ static void establish_rex (void)
> && !is_apx_rex2_encoding () && !is_any_vex_encoding (&i.tm) && !i.rex)
> i.rex |= REX_OPCODE;
>
> - /* For REX/REX2 prefix instructions, we need to convert old registers
> + /* For REX/REX2/EVEX prefix instructions, we need to convert old registers
> (AL, CL, DL and BL) to new ones (AXL, CXL, DXL and BXL) and report bad
> for AH, CH, DH and BH. */
> - if (i.rex || i.rex2)
> + if (i.rex || i.rex2 || i.tm.opcode_modifier.evex)
> {
> for (unsigned int x = first; x <= last; x++)
> {
> @@ -4326,7 +4326,7 @@ static void establish_rex (void)
> /* In case it is "hi" register, give up. */
> if (i.op[x].regs->reg_num > 3)
> as_bad (_("can't encode register '%s%s' in an "
> - "instruction requiring REX/REX2 prefix"),
> + "instruction requiring REX/REX2/EVEX prefix"),
> register_prefix, i.op[x].regs->reg_name);
>
> /* Otherwise it is equivalent to the extended register.
> --- a/gas/testsuite/gas/i386/rex-bad.l
> +++ b/gas/testsuite/gas/i386/rex-bad.l
> @@ -3,8 +3,8 @@
> .*:5: Error: same .*
> .*:6: Error: same .*
> .*:7: Error: same .*
> -.*:9: Error: .* REX/REX2 .*
> -.*:10: Error: .* REX/REX2 .*
> -.*:12: Error: .* REX/REX2 .*
> -.*:13: Error: .* REX/REX2 .*
> +.*:9: Error: .* REX/REX2/EVEX .*
> +.*:10: Error: .* REX/REX2/EVEX .*
> +.*:12: Error: .* REX/REX2/EVEX .*
> +.*:13: Error: .* REX/REX2/EVEX .*
To avoid these diagnostics getting yet more diffuse, can you please switch
to
as_bad (_("can't encode register '%s%s' in an "
"instruction requiring %s prefix"),
register_prefix, i.op[x].regs->reg_name,
i.tm.opcode_modifier.evex ? "EVEX" : "REX/REX2");
Okay with that (or a substantially similar; I didn't test the above, after
all) adjustment.
Jan
next prev parent reply other threads:[~2024-05-21 12:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 6:21 [PATCH 0/3] Support APX zero-upper Cui, Lili
2024-05-20 6:22 ` [PATCH 1/3] x86: Split REX/REX2 old registers judgment Cui, Lili
2024-05-21 12:18 ` Jan Beulich
2024-05-22 1:33 ` Cui, Lili
2024-05-22 5:49 ` Jan Beulich
2024-05-22 6:11 ` Cui, Lili
2024-05-22 6:22 ` Jan Beulich
2024-05-20 6:22 ` [PATCH 2/3] Add check for 8-bit old registers in EVEX format Cui, Lili
2024-05-21 12:24 ` Jan Beulich [this message]
2024-05-22 2:20 ` Cui, Lili
2024-05-20 6:22 ` [PATCH 3/3] Support APX zero-upper Cui, Lili
2024-05-22 6:21 ` Jan Beulich
2024-05-22 8:05 ` Cui, Lili
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=d11158f8-3dce-45c0-9de3-b03f15c9097f@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=lili.cui@intel.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).