Author: Robert Hyatt
Date: 08:09:56 01/22/03
Go up one level in this thread
On January 22, 2003 at 02:48:59, Gerd Isenberg wrote:
>On January 21, 2003 at 19:18:34, Sean Mintz wrote:
>
>>>INLINE int FirstBit(const BitBoard bitboard)
>>>{
>>> __asm
>>> {
>>> bsf eax,[bitboard+4]
>>> xor eax, 32
>>> bsf eax,[bitboard]
>>> }
>>>}
>>>
>>>INLINE int LastBit(const BitBoard bitboard)
>>>{
>>> __asm
>>> {
>>> bsr eax,[bitboard]
>>> sub eax,32
>>> bsr eax,[bitboard+4]
>>> add eax,32
>>> }
>>>}
>>
>>I tried using these in crafty and crafty froze up or something. Any ideas why?
>
>Don't know crafty, but i guess crafties LSB is my MSB...
>
>Gerd
I did this because of the Cray. The machine has always had a "leadz"
instruction that counts
the number of leading zeros. Which makes it reasonable to number bit 0 as the
MSB and
bit 63 as the LSB.
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.