Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move generation question for the big boys

Author: Dominic C. Marcello

Date: 11:40:37 09/19/01

Go up one level in this thread


>
>    I've found most of the extra work in terms of assembly to be pretty small
>compared to the benefits. If you're compiler supports inline functions in C and
>inline assembly (I use MSVC++, and I specifiy __forceinline), it's really pretty
>easy to implement. The inline inline assembly functions only have to do a few
>really simple things. Like And( sint64 b, sint64 bb ) just ands the two
>bitboards, the function for this is simply
>__forceinline( sint64 b1, sint64 b2 ) {
>   sint64 ret;

accidently submitted before i was done anyway its just
__forceinline And( long long b1, long long b2 ) {
   long long ret;
   __asm {
      movq mm0, b1
      pand b1, b2
      movq ret, mm0
   }
   return ret;
}

 only three instructions. More complicated things are obviously longer - for
instance I have one inline function in assembly that sets a bit on all of the
rotated bitboards. But most of my inline inline assembly functions are about 5
or 6 unstructions long on average.



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.