Author: Peter W. Gillgasch
Date: 19:47:57 01/10/00
Go up one level in this thread
try #define __trailz(x) __cntlzw((x) ^ ((x)-1ul)) The xor clears all but the LSB. If Bob´s code assumes that __leadz() counts bits from right to left try #define __trailz(x) (31 - <the thing above) Remember that __cntlzw(0) == 32. I can´t remember what Bob´s code assumes about that. For further details order the PowerPC Compiler Writer´s Guide @ your friendly IBM rep or via the web. It is free. -- Peter G.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.