Author: William Bryant
Date: 16:24:09 06/30/04
Go up one level in this thread
On June 30, 2004 at 04:48:38, Andreas Guettinger wrote: >To compile crafty-19.14 on my PowerMac G4 I had to change the following line >back in the file boolean.c: > >#if defined(ALPHA) && !defined(PopCnt) > >into > >#if (!defined(INLINE_ASM) && !defined(ALPHA)) || (defined(ALPHA) && >!defined(PopCnt)) > >or else there is no popcnt, firstone, lastone. >Because obvioulsy Macs do not read INLINE_ASM and are not ALPHAs. > >OR > >Maybe somebody cares to write G4 and G5 versions of popcnt, firstone, lastone (I >think magic bitscan runs quite good on the powerpc), makes an #if defined >powerpc and sends the file to Hyatt. >:) > >regards >Andy Andreas, Last time I looked there were specific code for the PPC processor in Crafty. If not, there used to be. The PPC processor has a built in instruction to help with the FirstOne, LastOne function calls called cntlzw. The counts the number of leading zero bits, I think, form the low bit number end. It turns most of the bit manipulation routines (except popcnt) into almost a single instruction call. In metrowerks, it can be called with the compiler function __cntlzw(32bitvalue). In XCode you have to call it from assembly. The source was posted a week or so ago for the assembly language functions. William
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.