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

Jimi Xenidis jimix at pobox.com
Wed Dec 19 00:28:11 EST 2012

On Dec 17, 2012, at 6:26 PM, Peter Bergner <bergner at vnet.ibm.com> wrote:

> On Mon, 2012-12-17 at 22:33 +1100, Anton Blanchard wrote:
>> Hi Jimi,
>>> I know this is a little late, but shouldn't these power7 specific
>>> thingies be in "obj-$(CONFIG_PPC_BOOK3S_64)". The reason I ask is
>>> that my compiler pukes on "dcbtst" and as I deal with that I wanted
>>> to point this out.
>> I guess we could do that. It's a bit strange your assembler is
>> complaining about the dcbtst instructions since we wrap them with
>> power4:
>> .machine push
>> .machine "power4"
>>        dcbt    r0,r4,0b01000
>>        dcbt    r0,r7,0b01010
>>        dcbtst  r0,r9,0b01000
>>        dcbtst  r0,r10,0b01010
>>        eieio
>>        dcbt    r0,r8,0b01010   /* GO */
>> .machine pop
> 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.
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?

If not, then without a _normalizing_ macro, I think will need that obj-$(CONFIG_PPC_BOOK3S_64) and .S files with the two can never be shared.


> Peter

More information about the Linuxppc-dev mailing list