Using MMX & XMM Registers

This is a discussion on Using MMX & XMM Registers within the C++ Programming forums, part of the General Programming Boards category; Hello, I was trying to look into using some of the new instruction sets for parallel processing and was wondering ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    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, 12:00 PM
  2. Replies: 10
    Last Post: 12-05-2008, 11:47 AM
  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, 05:25 AM
  5. Amd Mmx
    By Breach23 in forum Game Programming
    Replies: 15
    Last Post: 10-24-2001, 02:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21