Thread (10 messages) flat view 10 messages, 4 authors, 2013-01-09

Re: [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch

From: Jimi Xenidis <hidden>
Date: 2013-01-09 22:19:53

On Dec 18, 2012, at 10:31 AM, Peter Bergner [off-list ref] =
wrote:
On Tue, 2012-12-18 at 07:28 -0600, Jimi Xenidis wrote:
quoted
On Dec 17, 2012, at 6:26 PM, Peter Bergner [off-list ref] =
wrote:
quoted
quoted
Jimi, are you using an "old" binutils from before my patch that
changed the operand order for these types of instructions?
=20
  http://sourceware.org/ml/binutils/2009-02/msg00044.html
=20
Actually, this confused me as well, that embedded has the same =
instruction
quoted
encoding but different mnemonic.
=20
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. :(
=20
=20
quoted
I was under the impression that the assembler made no instruction =
decisions
quoted
based on CPU.  So your only hint would be that '0b' prefix.
Does AS even see that?
=20
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).
=20
{"dcbtst",	X(31,246),	X_MASK,      POWER4,	PPCNONE,	=
{RA0, RB, CT}},
{"dcbtst",	X(31,246),	X_MASK,      PPC|PPCVLE, POWER4,	=
{CT, RA0, RB}},
=20
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.
=20
I agree, but that means it is impossible for the same .S file can be =
compiled but -mcpu=3De500mc and -mcpu=3Dpowerpc?
So either these files have to be Book3S versus Book3E --or-- we use a =
CPP macro to get them right.
FWIW, I prefer the latter which allows more code reuse.

-jx

=20
Peter
=20
=20
=20
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help