[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH] Faster generic_fls
On Wed 30 Apr 03 15:17, Falk Hueffner wrote:
> Daniel Phillips <> writes:
> > It's somewhat annoying that __builtin_clz leaves the all-ones case
> > dangling instead of returning -1.
> I assume you mean all-zero...


> Well, the semantics of the corresponding
> instructions simply differ too much. clz(0) is 31 on some, 32 on some
> others, and undefined on some more architectures. So nailing it down
> would incur some performance penalty.

It would only penalize stupidly broken architectures; it would help the ones
that got it right. It's hard to imagine how a sane person could think the
result of clz((u32)0) should be other than 32.




To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.071 / U:0.196 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site