Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-05-01 Thread 민찬호
>No, the link errors are for __ctzdi2, not __clzdi2. >__ctzdi2 can be implemented using __ffs(). >> How's about we stop using __builtin_ctz[ll]() altogether? Use N-fls()? > >That was my first suggestion ;-) > Do we remove existing __builtin_ct[l]z? Some architecture's __builtin_clz will be more

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-05-01 Thread Geert Uytterhoeven
On Tue, Apr 30, 2013 at 11:46 PM, Andrew Morton wrote: > On Mon, 29 Apr 2013 09:20:25 +0200 Geert Uytterhoeven > wrote: >> On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min wrote: >> > Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and >> > It causes build failure. They can be

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-05-01 Thread Geert Uytterhoeven
On Tue, Apr 30, 2013 at 11:46 PM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 29 Apr 2013 09:20:25 +0200 Geert Uytterhoeven ge...@linux-m68k.org wrote: On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min chanho@lge.com wrote: Some architectures need __clzsi2() or __clzdi2() for

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-05-01 Thread 민찬호
No, the link errors are for __ctzdi2, not __clzdi2. __ctzdi2 can be implemented using __ffs(). How's about we stop using __builtin_ctz[ll]() altogether? Use N-fls()? That was my first suggestion ;-) Do we remove existing __builtin_ct[l]z? Some architecture's __builtin_clz will be more

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-30 Thread Andrew Morton
On Mon, 29 Apr 2013 09:20:25 +0200 Geert Uytterhoeven wrote: > On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min wrote: > > Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and > > It causes build failure. They can be implemented using the fls() and > > overridden by linking

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-30 Thread Andrew Morton
On Mon, 29 Apr 2013 14:40:05 +0900 Chanho Min wrote: > Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and > It causes build failure. They can be implemented using the fls() and > overridden by linking arch-specific versions may not be implemented yet. > > Reference:

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-30 Thread Andrew Morton
On Mon, 29 Apr 2013 14:40:05 +0900 Chanho Min chanho@lge.com wrote: Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and It causes build failure. They can be implemented using the fls() and overridden by linking arch-specific versions may not be implemented yet.

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-30 Thread Andrew Morton
On Mon, 29 Apr 2013 09:20:25 +0200 Geert Uytterhoeven ge...@linux-m68k.org wrote: On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min chanho@lge.com wrote: Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and It causes build failure. They can be implemented using the fls() and

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-29 Thread Geert Uytterhoeven
On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min wrote: > Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and > It causes build failure. They can be implemented using the fls() and > overridden by linking arch-specific versions may not be implemented yet. > > Reference:

Re: [PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-29 Thread Geert Uytterhoeven
On Mon, Apr 29, 2013 at 7:40 AM, Chanho Min chanho@lge.com wrote: Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and It causes build failure. They can be implemented using the fls() and overridden by linking arch-specific versions may not be implemented yet. Reference:

[PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-28 Thread Chanho Min
Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and It causes build failure. They can be implemented using the fls() and overridden by linking arch-specific versions may not be implemented yet. Reference: https://lkml.org/lkml/2013/4/18/603 Reported-by: Geert Uytterhoeven

[PATCH] lib: add weak __clzsi2()/__clzdi2() functions

2013-04-28 Thread Chanho Min
Some architectures need __clzsi2() or __clzdi2() for __builtin_clz and It causes build failure. They can be implemented using the fls() and overridden by linking arch-specific versions may not be implemented yet. Reference: https://lkml.org/lkml/2013/4/18/603 Reported-by: Geert Uytterhoeven