public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Cui,Lili" <lili.cui@intel.com>
Cc: binutils@sourceware.org, hjl.tools@gmail.com
Subject: Re: [PATCH] x86: Print {bad} on invalid broadcast in OP_E_memory
Date: Mon, 27 Sep 2021 12:12:13 +0200	[thread overview]
Message-ID: <b068787e-5ec6-9a0c-b6fa-c583125a42c1@suse.com> (raw)
In-Reply-To: <20210927093905.22496-1-lili.cui@intel.com>

On 27.09.2021 11:39, Cui,Lili wrote:
> Hi,
> 
> This patch is to fix PR 28381,
> 
> Make check-gas is ok.
> 
> Ok for master ?
> 
> 
> Don't print broadcast for scalar_mode, and print {bad} for invalid broadcast.
> 
> gas/
> 
> 	PR binutils/28381
> 	* testsuite/gas/i386/bad-bcast.s: Add a new testcase.
> 	* testsuite/gas/i386/bad-bcast.d: Likewise.
> 
> opcodes/
> 
> 	PR binutils/28381
> 	* i386-dis.c (static struct): Add no_broadcast.
> 	(OP_E_memory): Mark invalid broadcast with no_broadcast=1 and Print "{bad}"for it.
> 	(intel_operand_size): mark invalid broadcast with no_broadcast=1.
> 	(OP_XMM): Mark scalar_mode with no_broadcast=1.
> ---
>  gas/testsuite/gas/i386/bad-bcast.d |  10 +-
>  gas/testsuite/gas/i386/bad-bcast.s |   2 +
>  opcodes/i386-dis.c                 | 155 +++++++++++++++--------------
>  3 files changed, 88 insertions(+), 79 deletions(-)
> 
> diff --git a/gas/testsuite/gas/i386/bad-bcast.d b/gas/testsuite/gas/i386/bad-bcast.d
> index 9fc474a42f..2ebb16800a 100644
> --- a/gas/testsuite/gas/i386/bad-bcast.d
> +++ b/gas/testsuite/gas/i386/bad-bcast.d
> @@ -7,8 +7,8 @@
>  Disassembly of section .text:
>  
>  0+ <.text>:
> - +[a-f0-9]+:	62                   	.byte 0x62
> - +[a-f0-9]+:	c3                   	ret    
> - +[a-f0-9]+:	8c 1d 66 90 66 90    	mov    %ds,0x90669066
> - +[a-f0-9]+:	66 90                	xchg   %ax,%ax
> -#pass
> + +[a-f0-9]+:	62 c3 8c 1d 66\s+\(bad\)
> + +[a-f0-9]+:	90\s+nop
> + +[a-f0-9]+:	66 90\s+xchg   %ax,%ax
> + +[a-f0-9]+:	66 90\s+xchg   %ax,%ax
> + +[a-f0-9]+:	62 c1 ff 3f 2a 20\s+vcvtsi2sd \(%eax\){bad},%xmm0,%xmm4{%k7}

I've indicated so in the past already (perhaps not to you, but in
general): I consider it wrong to add test cases with bogus expectations.
In the case here it's not only the broadcast that's invalid, but also
the {%k7}. For your purpose you don't need the masking part, so I'd like
to ask that you drop it. If and when we properly mark such bad uses of
masking, a separate test case covering that aspect will want adding, but
the one you add now would then better not require adjusting.

Jan


  reply	other threads:[~2021-09-27 10:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  9:39 Cui,Lili
2021-09-27 10:12 ` Jan Beulich [this message]
2021-09-27 11:28   ` Cui, Lili
2021-09-27 11:32     ` Jan Beulich
2021-09-27 14:39     ` H.J. Lu
2021-09-28  2:40       ` Cui, Lili
2021-09-28  2:45         ` 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=b068787e-5ec6-9a0c-b6fa-c583125a42c1@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).