linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-tip-commits@vger.kernel.org, Borislav Petkov <bp@suse.de>,
	"H. Peter Anvin (Intel)" <hpa@zytor.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	x86 <x86@kernel.org>
Subject: Re: [tip: x86/cpu] x86/cpu: Use INVPCID mnemonic in invpcid.h
Date: Tue, 12 May 2020 16:26:37 +0200	[thread overview]
Message-ID: <CAFULd4bZLkME4kn9bmbOBMtd+ZpNnsH-w8a6tPdtmpV57WSHtw@mail.gmail.com> (raw)
In-Reply-To: <158929264101.390.18239205970315804831.tip-bot2@tip-bot2>

On Tue, May 12, 2020 at 4:10 PM tip-bot2 for Uros Bizjak
<tip-bot2@linutronix.de> wrote:
>
> The following commit has been merged into the x86/cpu branch of tip:
>
> Commit-ID:     7e32a9dac9926241d56851e1517c9391d39fb48e
> Gitweb:        https://git.kernel.org/tip/7e32a9dac9926241d56851e1517c9391d39fb48e
> Author:        Uros Bizjak <ubizjak@gmail.com>
> AuthorDate:    Fri, 08 May 2020 11:22:47 +02:00
> Committer:     Borislav Petkov <bp@suse.de>
> CommitterDate: Tue, 12 May 2020 16:05:30 +02:00
>
> x86/cpu: Use INVPCID mnemonic in invpcid.h
>
> The current minimum required version of binutils is 2.23, which supports
> the INVPCID instruction mnemonic. Replace the byte-wise specification of
> INVPCID with the proper mnemonic.
>
>  [ bp: Add symbolic operand names for increased readability and flip
>    their order like the insn expects them for the AT&T syntax. ]

Actually, the order was correct for AT&T syntax in the original patch.

The insn template for AT&T syntax goes:

insn arg2, arg1, arg0

where rightmost arguments are output operands.

The operands in asm template go

asm ("insn template" : output0, output1 : input0, input1 : clobbers)

so, in effect:

asm ("insn template" : arg0, arg1 : arg2, arg3: clobbers)

As you can see, the operand order in insn tempate is reversed for AT&T
syntax. I didn't notice the reversal of operands in your improvement.

Uros.


Uros.

  reply	other threads:[~2020-05-12 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  9:22 [PATCH] x86: Use INVPCID mnemonic in invpcid.h Uros Bizjak
2020-05-08 11:34 ` Peter Zijlstra
2020-05-08 17:32 ` H. Peter Anvin
2020-05-09 11:33 ` Borislav Petkov
2020-05-12 14:10 ` [tip: x86/cpu] x86/cpu: " tip-bot2 for Uros Bizjak
2020-05-12 14:26   ` Uros Bizjak [this message]
2020-05-12 15:15     ` Borislav Petkov
2020-05-12 15:54       ` Uros Bizjak
2020-05-12 16:28         ` Borislav Petkov

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=CAFULd4bZLkME4kn9bmbOBMtd+ZpNnsH-w8a6tPdtmpV57WSHtw@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.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 NNTP newsgroup(s).