Re: gcc question for inline assembly.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stuart,

Your question is off-topic for this forum.

The routine looks for the lowest bit set in the bb variable, a 64-bit
number.  It then sets the bb variable to that number.  It also returns the
bit position of that lowest bit (1-based: starting at 1 for the "least
significant bit", to 64 for the "most significant bit").

If the number passed in is 0 (i.e., bb == 0ULL), it poor behavior.  Don't
call this routine with 0ULL.

I recommend rewriting the routine in pure C, and avoid assembly language.

If you need help on how to do that, get this book:  Hacker's Delight
http://www.amazon.com/Hackers-Delight-Henry-Warren-Jr/dp/0201914654

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux