This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 10/10] x86: correct VFPCLASSP{S,D} operand size handling
- From: Jan Beulich <JBeulich at suse dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 8 Aug 2019 07:45:58 +0000
- Subject: Re: [PATCH 10/10] x86: correct VFPCLASSP{S,D} operand size handling
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T8oherl6E2M/5lh6AxXVjWfQWqtHWyszKzs/cWJSFjE=; b=kGL4M1X/DgkZj/5rk4pGWcE6kgxAIuSqU9xx6es2lRz2r2DFQfl4pZpRFqcpPcpcD5d6G7Xb7MRksu5jYVorZeHghflCawaV6q6N0oHWEQ99LCDmTDxZAX6KvDSbt2URkIjz/e9M8VirF8fQVIBP95HM2h/UCgwD9Mc+/RlkfIaWGnAiGUo2IOSc4OPo7S3I9+62ztVzRMCWwlJFQTPLuGDyXmTGDzehaINY0GAm9V2MGGDGr0N+g+S1831yJJjO0lDeYZluSisO4H3nPdPRl8BJOilRWUCsJlw7OWbZG120KE6hXjfmCxhKvU0YtfPpGRXsAi7YiRyJH1JYdr/kQw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BVDseffXnSA1lGd5qRQSS25zGyhQBX/vPUIXzTJJ9Tubw1UVCBRkRcM1GbcRHTchperUsEps1sK659+jwyG0jY8Xk47ODWZBZ75hrwWmvFLxJhphAU0bnoIRHiKPfO6xZFlmc6LQzH/itE/SUJdDR4BrVSARzdc6z0qka6ygYjHdME5YkEjHSVwm+TiM8DSjFZu6a4MKwBxtu9lmVBjrWgIq2yxMe7ToERoxrsm1savafzpxqZ4by2saCnqN6+HRkm+cc4H2Y9J36/maqJ6Do4fb0t+1YNp01mQ2pQrUOOPfSDTT+PX9wX2vFmxb0yN1VJH3S6eDjs678mfDWq6o5g==
- References: <a10770b5-f659-6259-6054-c0603f816e70@suse.com> <9f42a228-02b5-ace4-fbb7-0898b3d973d3@suse.com> <CAMe9rOpUDKVtcZi-UmC97q9QoC-TcmXAbMQZi_mZEesQL8i=vw@mail.gmail.com> <3462b1a4-2273-5ac3-39fd-c0bc449e9149@suse.com> <CAMe9rOqqRVujNQTGafu2VHBBJz+t7gvV11RGCgy2TOKS+QsdNg@mail.gmail.com>
On 07.08.2019 20:00, H.J. Lu wrote:
> On Wed, Aug 7, 2019 at 1:29 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 06.08.2019 23:11, H.J. Lu wrote:
>>> On Tue, Aug 6, 2019 at 7:29 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> With AVX512VL disabled (e.g. when writing code for the Knights family
>>>> of processors) these insns aren't ambiguous when used with a memory
>>>> source, and hence should be accepted without suffix or operand size
>>>> specifier. When AVX512VL is enabled, to be consistent with this as
>>>> well as other ambiguous operand size handling it seems better to just
>>>> wanrn about the ambiguity in AT&T mode, and still default to 512-bit
>>>> operands (on the assumption that the code may have been written without
>>>> AVX512VL in mind yet).
>>>>
>>>> gas/
>>>> 2019-08-XX Jan Beulich <jbeulich@suse.com>
>>>>
>>>> * config/tc-i386.c (avx512): New (at file scope), moved from
>>>> (check_VecOperands): ... here.
>>>> (process_suffix): Add [XYZ]MMword operand size handling.
>>>> * testsuite/gas/i386/noavx512-2.s, testsuite/gas/i386/noreg16.s,
>>>> testsuite/gas/i386/noreg32.s, testsuite/gas/i386/noreg64.s: Add
>>>> VFPCLASS tests.
>>>> * testsuite/gas/i386/noavx512-2.l, testsuite/gas/i386/noreg16.d,
>>>> testsuite/gas/i386/noreg16.l, testsuite/gas/i386/noreg32.d,
>>>> testsuite/gas/i386/noreg32.l, testsuite/gas/i386/noreg64.d,
>>>> testsuite/gas/i386/noreg64.l: Adjust expectations.
>>>>
>>>> opcodes/
>>>> 2019-08-XX Jan Beulich <jbeulich@suse.com>
>>>>
>>>> * i386-opc.tbl (vfpclasspd, vfpclassps): Add Unspecified.
>>>> * i386-tbl.h: Re-generate.
>>>>
>>>
>>> We should keep the suffix even if AVX512VL isn't enabled so that
>>> we don't need to check if AVX512VL isn't enabled to interpret the
>>> instruction.
>>
>> But that's wrong (and fixing this is the whole point of this patch).
>> As you've said elsewhere, unambiguous (SIMD in particular) insns
>> should not require any use of suffixes.
>>
>
> When I look at such instruction, I should be able to tell what it is without
> checking if AVX512VL is enabled.
This entirely depends on the context: When all you think about is
Knights hardware (or AVX512F/AVX512DQ in more general terms), then
seeing (and in particular being _forced_ to use) the suffix is
confusing (wrong). No-one says that in this case the suffix won't
be allowed anymore. The problem here seems to be your use of "I",
when instead you should also be considering how other people may
view things.
As a general statement: The assembler should accept (without any
diagnostic) anything that's unambiguously mappable to a valid
encoding.
Jan