Thread: Using MMX & XMM Registers

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    41

    Talking Using MMX & XMM Registers

    Hello, I was trying to look into using some of the new instruction sets for parallel processing and was wondering if anyone here has had any experience using these. I've looked into some documentation on MSDN and even played around with XMM registers a bit and was wondering if there is any downside to using these that I should be aware of. I'm assuming these instruction sets are supported on a Pentium III and upwards as well as AMD's hardware?

    I was considering trying XMM registers considering I am dealing with mathematical computations on large vectors, but am worried that for some reason unknown to me that I might have to go back through all my code and remove all this code for standard c code... any opinions would be greatly appreciated. Also, in the documentation it considers these instruction sets as "multimedia" enhancers of sorts.. wtf does that mean?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    How (or even if) you get to them depends entirely on your compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Doesn't look good . . . (MSVC)
    The other bad news is that the MMX instrinsics still produce awful code, although this is only pertinent to x86 since the AMD64 compiler doesn't support MMX instructions
    http://www.virtualdub.org/blog/pivot/entry.php?id=46
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Registered User
    Join Date
    Jun 2007
    Posts
    41
    Was going to go with intrinsics in MSVC 2005.. I read the link you posted and it more-or-less scared me away from intrinsics although I'm still intrigued. So whats the deal should I attempt to go with intrinsics? Bad idea?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accessing HW registers using bit fields and UINT32
    By samdomville in forum C Programming
    Replies: 4
    Last Post: 12-10-2008, 01:00 PM
  2. Replies: 10
    Last Post: 12-05-2008, 12:47 PM
  3. MMX and 3DNow
    By mike_g in forum C Programming
    Replies: 1
    Last Post: 08-26-2007, 02:46 PM
  4. memcpy with 128 bit registers
    By grady in forum Linux Programming
    Replies: 2
    Last Post: 01-19-2004, 06:25 AM
  5. Amd Mmx
    By Breach23 in forum Game Programming
    Replies: 15
    Last Post: 10-24-2001, 02:13 PM