From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] x86: Properly encode vmovd with 64-bit memeory
Date: Mon, 08 Jan 2018 11:57:00 -0000 [thread overview]
Message-ID: <CAMe9rOoobCTd-3DEX6JckH1E_bFdiunpdaWrkKzQu2BDYaCRUQ@mail.gmail.com> (raw)
In-Reply-To: <5A536A0E020000780019C242@prv-mh.provo.novell.com>
On Mon, Jan 8, 2018 at 3:54 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 08.01.18 at 12:48, <hjl.tools@gmail.com> wrote:
>> On Mon, Jan 8, 2018 at 3:35 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>>> On 08.01.18 at 12:22, <hjl.tools@gmail.com> wrote:
>>>> On Mon, Jan 8, 2018 at 3:14 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>> On Mon, Jan 8, 2018 at 12:48 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>>>>>> On 08.01.18 at 02:18, <hongjiu.lu@intel.com> wrote:
>>>>>>> For historical reason, we allow movd/vmovd with 64-bit register and
>>>>>>> memeory operands. But for vmovd, we failed to handle 64-bit memeory
>>>>>>> operand. This has been gone unnoticed since AT&T syntax always treats
>>>>>>> memory operand as 32-bit memory. This patch properly encodes vmovd
>>>>>>> with 64-bit memeory operands.
>>>>>>
>>>>>> Interesting coincidence - just over the weekend I've run into this
>>>>>> issue too. My intended solution is quite different, though: Since
>>>>>> VMOVD (other than MOVD) doesn't have a 64-bit operand variant
>>>>>> in either Intel's SDM nor AMD's PM, I'd rather remove memory
>>>>>> operand support from it:
>>>>>> - generate code was wrong so far, so anyone having used it would
>>>>>> have run buggy code anyway,
>>>>>> - old gcc only ever uses the 64-bit variants with register operands.
>>>>>
>>>>> Works for me. Can you submit a patch?
>>>
>>> Hopefully later this week.
>>>
>>>> If we do that, should we also remove MOVD with 64-bit memory?
>>>
>>> We can't, as even up-to-date AMD PM still specifies this name
>>> instead of MOVQ.
>>
>> I consider it is a defect in AMD manual.
>>
>>>> Otherwise, -msse2avx won't work on MOVD with 64-bit memory.
>>>
>>> Hmm, good point - perhaps the SSE2AVX pattern then needs the
>>> change that you've been doing, while the plain one could have its
>>> memory alternative removed?
>>
>> If we can't remove MOVD with 64-bit memory, I will go with my patch.
>
> Fine with me for the AVX variant, but please consider dropping
> the AVX512 one.
Did you mean dropping AVX512 vmovd with 64-bit memory operand?
--
H.J.
next prev parent reply other threads:[~2018-01-08 11:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 1:18 H.J. Lu
2018-01-08 8:48 ` Jan Beulich
2018-01-08 11:14 ` H.J. Lu
2018-01-08 11:22 ` H.J. Lu
2018-01-08 11:36 ` Jan Beulich
2018-01-08 11:49 ` H.J. Lu
2018-01-08 11:54 ` Jan Beulich
2018-01-08 11:57 ` H.J. Lu [this message]
2018-01-08 12:08 ` Jan Beulich
2018-01-08 11:39 ` Jan Beulich
2018-01-08 11:52 ` H.J. Lu
2018-01-08 12:13 ` Jan Beulich
2018-01-08 12:17 ` H.J. Lu
2018-01-08 12:34 ` H.J. Lu
2018-01-08 12:56 ` Jan Beulich
2018-01-08 13:08 ` 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=CAMe9rOoobCTd-3DEX6JckH1E_bFdiunpdaWrkKzQu2BDYaCRUQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=JBeulich@suse.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).