Computer Chess Club Archives


Search

Terms

Messages

Subject: MMX assembler for bitboards

Author: Gunnar Andersson

Date: 03:28:03 11/08/99


My impression is that many (most?) of the amateur programs use bitboards, and
several seem to contain Assembler code for basic operations.

Question to programmers: Do you use MMX operations?

To me they seem pretty useful because
(i)  there are 8 registers of 64 bits each, much better than the old
     x386 set of registers
(ii) e.g. shifting a 64-bit register takes only one clock cycle whereas this
     operation would take 5 (I think) operations when simulated using two
     32-bit registers

OTOH two 32-bit operations can be performed concurrently in the u- and v- pipes,
so there's probably no gain if e.g. only ANDs and ORs are performed in a small
number of 64-bit variables.

I guess it would be even better to use the two integer 32-bit pipes for one
64-bit operation and the MMX/FP pipe for another 64-bit operation, and in
loopfree code this might be realizable.

For programs that keep stuff in floating-point variables this might be a bad
idea - you will have to remember to insert the EMMS instruction before any
floating-point operation, and this operation takes some time (about 10 clock
cycles I think, but I haven't looked this up).

/ Gunnar



This page took 0.01 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.