[PATCH] powerpc: provide __bswapdi2

Segher Boessenkool segher at kernel.crashing.org
Tue May 14 02:55:27 EST 2013


> 	rlwinm 10,4,8,0xffffffff
> 	rlwinm 11,3,8,0xffffffff
> 	rlwimi 10,4,24,0,7
> 	rlwimi 11,3,24,0,7
> 	rlwimi 10,4,24,16,23
> 	rlwimi 11,3,24,16,23
> 	mr 4,11
> 	mr 3,10

>> Actually, I'd swap the two mr instructions to never
>> have an instruction that uses the result from the
>> previous one.
>
> Bad GCC. No biscuit.
>
> Should we file a PR?

This is scheduled just fine.  Every pair of instructions here can
execute together (on most CPUs, if not all); all instructions after
it are dependent on previous instructions.  There also is no issue
(group) restriction that makes this scheduling suboptimal afaics.


Segher



More information about the Linuxppc-dev mailing list