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 paramete
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 exe
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 ffs_test
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);
> }
>
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: 38