Re: powerpc/64: optimises from64to32()

2018-06-04 Thread Michael Ellerman
On Tue, 2018-04-10 at 06:34:35 UTC, Christophe Leroy wrote: > The current implementation of from64to32() gives a poor result: > > 0270 <.from64to32>: > 270: 38 00 ff ff li r0,-1 > 274: 78 69 00 22 rldicl r9,r3,32,32 > 278: 78 00 00 20 clrldi r0,r0,32 > 27c: 7c

[PATCH] powerpc/64: optimises from64to32()

2018-04-10 Thread Christophe Leroy
The current implementation of from64to32() gives a poor result: 0270 <.from64to32>: 270: 38 00 ff ff li r0,-1 274: 78 69 00 22 rldicl r9,r3,32,32 278: 78 00 00 20 clrldi r0,r0,32 27c: 7c 60 00 38 and r0,r3,r0 280: 7c 09 02 14 add