Author: Dieter Buerssner
Date: 23:19:34 01/05/03
Go up one level in this thread
On January 05, 2003 at 22:52:06, Robert Hyatt wrote:
>If you like cute code, here is Eugene's FirstOne() function for
>Crafty. It is cute, but has one drawback in that it can not be inlined
>due to the addressing computations he does which means that the value being
>checked for FirstOne() has to be in memory...
Did you try the "m" constraint for Gcc inline assembly? Perhaps, together with
using a local volatile variable:
__inline__ int FirstOne(Bitboard b)
{
volatile Bitboard lb = b;
int result; __asm__(" ... " : "=r&" (result) /* ... */ : "m" (lb));
return result;
}
Regards,
Dieter
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.