Archived

This topic is now archived and is closed to further replies.

MMX assembly

This topic is 6036 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

MMX is for integer code, not floating point code, so unless you use fixedpoint math...

And no, to my knowledge, MSVC doens''t use mmx.

Share this post


Link to post
Share on other sites
You can use the new SIMD instructions of the Pentium III and IV which are similar to MMX except they use floating point numbers rather than integers. Have a look on www.intel.com - there is a lot of info on SIMD there.

Share this post


Link to post
Share on other sites
OOps, I forgot to say that - no VC++ does not compile SIMD instructions you need to use the latest version of the Macro assembler MASM which I think can also be used to generate SIMD code. With SIMD code you can execute a single instruction to operate on four floating point numbers at the same time - cool for homogeneous vector calculations which have four variables x,y,z,h.

Share this post


Link to post
Share on other sites
MS Visual C++ _CAN_ compile SIMD instructions -- you first need to download the Processor Pack from the VS website (http://www.microsoft.com/vstudio ?). It includes a set of intrinsics which define many operations which normally would require a whole pile of inline assembly (such as addition, subtration etc. of 128bit types). I think there''s also some other things like debugging and memory management stuff, but I could be wrong (I haven''t played arround with it much). It also includes the lastest MASM, so you can compile pure .asm files as well as inline assembly.

Like henryx was saying, there are also a lot of pre-definied types which fit into the 128 bit registers, as well as many operators for them (the Intrinsics). You can also define a variety of other types.

So now nobody can say they can''t use SIMD because they can''t compile for it.

Hope this helps,

Simon Wilson,
XEOS Digital Development

Share this post


Link to post
Share on other sites