Author: Dieter Buerssner
Date: 15:28:42 06/26/02
Go up one level in this thread
On June 26, 2002 at 16:54:09, Bo Persson wrote: >On June 25, 2002 at 20:00:47, Dieter Buerssner wrote: > >>On June 25, 2002 at 19:46:20, Robert Hyatt wrote: >> >>>The issue is this: how many instructions to do task x? For bitboards, the >>>instruction count on a 32 bit machine jumps by a factor of two unless shifts >>>are being done where it goes up even further. >> >>Why should it go up further for shifts? > >Because it is difficult to shift over the 32 bit boundary between two registers. For constant shift count (I would guess the usual case in a chess programm on a bitboard), a pair of shrd and shr should take care of this. Of course, when the shift count is variable, some branch would be needed (is the shift >= 32?). I did not check on the allowed operands of the "long shift" opcodes, and it may be possible, that more moves from some memory to registers are needed. From my assembler coding (for long precision arithmethic) I seem to remember that just one shrd was needed per 32 bit word for shifting long datastructures. 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.