Re: powerpc: Discard ffs() function and use builtin_ffs instead

2016-09-16 Thread Christophe Leroy
Le 13/05/2016 à 08:53, Christophe Leroy a écrit : Le 13/05/2016 à 08:16, Michael Ellerman a écrit : On Thu, 2016-12-05 at 15:32:22 UTC, Christophe Leroy wrote: With the ffs() function as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant

Re: powerpc: Discard ffs() function and use builtin_ffs instead

2016-05-13 Thread Gabriel Paubert
On Fri, May 13, 2016 at 04:16:57PM +1000, Michael Ellerman wrote: > On Thu, 2016-12-05 at 15:32:22 UTC, Christophe Leroy wrote: > > With the ffs() function as defined in arch/powerpc/include/asm/bitops.h > > GCC will not optimise the code in case of constant parameter, as shown > > by the small

Re: powerpc: Discard ffs() function and use builtin_ffs instead

2016-05-13 Thread Christophe Leroy
Le 13/05/2016 à 08:16, Michael Ellerman a écrit : On Thu, 2016-12-05 at 15:32:22 UTC, Christophe Leroy wrote: With the ffs() function as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant parameter, as shown by the small exemple below. int

Re: powerpc: Discard ffs() function and use builtin_ffs instead

2016-05-13 Thread Michael Ellerman
On Thu, 2016-12-05 at 15:32:22 UTC, Christophe Leroy wrote: > With the ffs() function as defined in arch/powerpc/include/asm/bitops.h > GCC will not optimise the code in case of constant parameter, as shown > by the small exemple below. > > int ffs_test(void) > { > return 4 << ffs(31); > }

[PATCH] powerpc: Discard ffs() function and use builtin_ffs instead

2016-05-12 Thread Christophe Leroy
With the ffs() function as defined in arch/powerpc/include/asm/bitops.h GCC will not optimise the code in case of constant parameter, as shown by the small exemple below. int ffs_test(void) { return 4 << ffs(31); } c0012334 : c0012334: 39 20 00 01 li r9,1 c0012338: