Author: Sander de Zoete
Date: 10:07:53 01/16/03
Go up one level in this thread
On January 15, 2003 at 02:41:38, Matt Taylor wrote: >On January 14, 2003 at 19:23:38, Sander de Zoete wrote: > >>Thanks Gerd, >> >>I also did some searching myself on the web. I ended up with a website where >>SIMD was explained together with MMX,SSE,MAJC, etc. Then I also managed to >>download the instruction sets from all these processor technologies. Can I use >>these like this in Cplusplus (Borland) >> >>I really see a lot of potential here. >> >>// Put BITBOARD a into MMX >>void SetBitboardIntoMMX(BITBOARD a, unsigned int b) >>{ >> asm >> { >> movq a >> >> } >> // Shift a with value b to the right >> asm >> { >> psrlw a, b >> >> } >>} >>Will something like this work? >> >>In an example a was represented by mm5 (probably the 6th memory space in MMX >>(mm0 - mm7 if I recall correctly). How do I know what is in mm5? >> >>Sander. > >mm5 works exactly like a variable. How do you know what a and b are until you >set them? Same thing for mm5 -- you have to initialize it with a movd or movq >instruction. As for the significance of mm5, its significance is defined by you. >If you put a in mm5, mm5 becomes a. If you put b in mm5, it becomes b. > >Note that you probably want to coalesce your statements like this: > >asm >{ > movq a > psrlw a, b >} > >The syntax of the instructions is always going to look like this: > >operation dest, src > >By the way, Intel manual 245471-6 makes a very good reference. > Thank you Matt Where on the web can I find this manual? Sander.
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.