gcc question for inline assembly.
John Love-Jensen
eljay@adobe.com
Tue Sep 12 12:16:00 GMT 2006
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
More information about the Gcc-help
mailing list