|Compiler support for Intel-MMX? firstname.lastname@example.org (1998-04-15)|
|Compiler support for MMX instructions email@example.com (1998-04-29)|
|From:||firstname.lastname@example.org (Jacob Navia)|
|Date:||29 Apr 1998 00:59:12 -0400|
> Yong-Ke YOUNG Kenneth wrote:
> > Is there compiler that supports dissembling into MMX instructions?
> > More precisely, if I have e.g. a vector dot product that I think will
> > reap significant benefit if I utilize the MMX instruction set, do I
> > have to code by hand or is there a compiler who will do it for me?
> From 1996, Intel tried to persuade compiler vendors to start using
> the "intrinsics" approach for MMX. The intrinsics are something
> between the direct C support and inlined assembly: you have a set of C
> "functions" that can be inlined into MMX (or other processor
> extravaganza) instructions. You can ask Koby Gottlieb from Intel
> Israel (email@example.com) what are the compilers that use
> intrinsics for MMX. As far as I know, the only compiler that uses MMX
> intrinsics is Intel's own icl (a plug-in for MSVC), look at
The lcc-win32 compiler will generate an inline dot product using 16 bit data.
This one, and all other MMX instructions are implemented in lcc-win32 as
intrinsics. Source code for the compiler and the intrinsics is available
in the lcc-win32 distribution:
The algorithm used for the MMX dot prod is the one recommended by Intel. The
_mmxDdotrPprodiuct(mmxdata *vect1,mmxdata *vect2,int n);
vect1 and vect2 point to 16 bit data. Both vectors should be of equal length.
n is the number of 64 bit numbers to process, i.e. length(vect1)/4
I have added recently, an MMX register display to the debugger, so that you
can follow the MMX instructions. As far as I know lcc-win32's debugger is
the only one to do this.
All other MMX instructions are implemented: padd, psub etc etc. The
documentation can be found at the same URL in the file mmx.doc.
lcc-win32 is a full blown C compiler system for windows 95/NT.
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel 01 220.127.116.11
93430 Villetaneuse Fax 01 18.104.22.168
Return to the
Search the comp.compilers archives again.