Thread (3 messages) flat view 3 messages, 3 authors, 2008-06-06
  • cntlzw · Kevin Diggs <hidden> · 2008-06-03
  • Re: cntlzw · Scott Wood <hidden> · 2008-06-03
  • Re: cntlzw · Matt Sealey <hidden> · 2008-06-06

Re: cntlzw

From: Scott Wood <hidden>
Date: 2008-06-03 20:11:27

Kevin Diggs wrote:
Hi,

    x86 has bsf and bsr. PPC has cntlzw which I think is equivalent to 
bsr. Anyone know of a sneaky algorithm to do bsf?
wordsize - 1 - cntlzw(x & ~(x - 1));

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help