linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "David Laight" <David.Laight@ACULAB.COM>
Cc: "Borislav Petkov" <bp@alien8.de>, <brgerst@gmail.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Andrew Lutomirski" <luto@kernel.org>,
	"Ingo Molnar" <mingo@kernel.org>, <tglx@linutronix.de>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Denys Vlasenko" <dvlasenk@redhat.com>,
	"Josh Poimboeuf" <jpoimboe@redhat.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-tip-commits@vger.kernel.org>, <hpa@zytor.com>
Subject: RE: [tip:x86/asm] x86/entry/64: Add two more instruction suffixes
Date: Tue, 03 Jul 2018 04:06:48 -0600	[thread overview]
Message-ID: <5B3B4AB802000078001D0216@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <dd366701851f48e4897ebe0f62f0fd94@AcuMS.aculab.com>

>>> On 03.07.18 at 10:46, <David.Laight@ACULAB.COM> wrote:
> From: Jan Beulich
>> Sent: 03 July 2018 09:36
> ...
>> As said there, omitting suffixes from instructions in AT&T mode is bad
>> practice when operand size cannot be determined by the assembler from
>> register operands, and is likely going to be warned about by upstream
>> gas in the future (mine does already).
> ...
>> -	bt	$9, EFLAGS(%rsp)		/* interrupts off? */
>> +	btl	$9, EFLAGS(%rsp)		/* interrupts off? */
> 
> Hmmm....
> Does the operand size make any difference at all for the bit instructions?
> I'm pretty sure that the cpus (386 onwards) have always done aligned 32bit
> transfers (the docs never actually said aligned).
> I can't remember whether 64bit mode allows immediates above 31.
> 
> So gas accepting 'btb $n,memory' is giving a false impression of
> what actually happens.

BTB does not exist at all. BTW and (on 64-bit) BTQ do exist though,
and they have behavior differing from BTL. The only AT&T syntax doc
I have says that L is the default suffix to be used, but there are cases
where this wasn't (and maybe still isn't) the case, so omitting a suffix
when register operands aren't available to size instructions has always
been a risky game.

Jan



  reply	other threads:[~2018-07-03 10:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 10:47 [PATCH] x86/entry/64: add two more instruction suffixes Jan Beulich
2018-07-03  8:35 ` [tip:x86/asm] x86/entry/64: Add " tip-bot for Jan Beulich
2018-07-03  8:46   ` David Laight
2018-07-03 10:06     ` Jan Beulich [this message]
2018-07-03 10:29       ` David Laight
2018-07-03 11:59     ` Denys Vlasenko
2018-07-03 12:25       ` David Laight

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=5B3B4AB802000078001D0216@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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).