linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@vnet.ibm.com>
To: Jimi Xenidis <jimix@pobox.com>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org,
	Kumar Gala <kumar.gala@gmail.com>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch
Date: Tue, 18 Dec 2012 10:31:09 -0600	[thread overview]
Message-ID: <1355848269.5180.41.camel@otta> (raw)
In-Reply-To: <16080DCD-0E42-43E9-93E3-D3076637DCB1@pobox.com>

On Tue, 2012-12-18 at 07:28 -0600, Jimi Xenidis wrote:
> On Dec 17, 2012, at 6:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> > Jimi, are you using an "old" binutils from before my patch that
> > changed the operand order for these types of instructions?
> > 
> >    http://sourceware.org/ml/binutils/2009-02/msg00044.html
> 
> Actually, this confused me as well, that embedded has the same instruction
> encoding but different mnemonic.

The mnemonic is the same (ie, dcbtst), and yes, the encoding is the same.
All that is different is the accepted operand ordering...and yes, it is
very unfortunate the operand ordering is different between embedded and
server. :(


> I was under the impression that the assembler made no instruction decisions
> based on CPU.  So your only hint would be that '0b' prefix.
> Does AS even see that?

GAS definitely makes decisions based on CPU (ie, -m<cpu> option).  Below is
the GAS code used in recognizing the dcbtst instruction.  This shows that
the "server" operand ordering is enabled for POWER4 and later cpus while
the "embedded" operand ordering is enabled for pre POWER4 cpus (yes, not
exactly a server versus embedded trigger, but that's we agreed on to
mitigate breaking any old asm code out there).

{"dcbtst",	X(31,246),	X_MASK,      POWER4,	PPCNONE,	{RA0, RB, CT}},
{"dcbtst",	X(31,246),	X_MASK,      PPC|PPCVLE, POWER4,	{CT, RA0, RB}},

GAS doesn't look at how the operands are written to try and guess what
operand ordering you are attempting to use.  Rather, it knows what ordering
it expects and the values had better match that ordering.


Peter

  parent reply	other threads:[~2012-12-18 16:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31  6:22 [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch Anton Blanchard
2012-12-07 23:20 ` Jimi Xenidis
2012-12-17 11:33   ` Anton Blanchard
2012-12-18  0:26     ` Peter Bergner
2012-12-18 13:28       ` Jimi Xenidis
2012-12-18 14:14         ` David Laight
2012-12-18 16:31         ` Peter Bergner [this message]
2013-01-09 22:19           ` Jimi Xenidis
2013-01-09 23:06             ` Peter Bergner
2012-12-18 13:21     ` Jimi Xenidis

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=1355848269.5180.41.camel@otta \
    --to=bergner@vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=jimix@pobox.com \
    --cc=kumar.gala@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.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).