Jump to content
  • Advertisement
Sign in to follow this  
Eckos

SSE3 Optimization

This topic is 3668 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

I was wondering if anyone knew where to find tutorials and be able to do SSE3 optimization for C/C++ in gcc-4.2.4? I've only found it for SSE and MMX.

Share this post


Link to post
Share on other sites
Advertisement
Some example code using intrinsics on gcc. Just look up the intrinsics for the SSE3 calls you want to make.

Use intrinsics rather than direct call. Coding to it directly in asm can prevent the optimizer from doing its job well.

Also, be aware that these operations cause CPU/FPU state changes, so the "optimization" may give an overall performance penalty rather than a performance boost. Be sure to profile your release builds before and after the changes, just to make sure you had a net improvement.

Share this post


Link to post
Share on other sites
Unless I'm mistaken, full SSE3/SSE4 support is available after gcc 4.3 only.

Yep:
Quote:
http://gcc.gnu.org/gcc-4.3/changes.html
New Targets and Target Specific Improvements
# Support for SSSE3 built-in functions and code generation are available via -mssse3.
# Support for SSE4.1 built-in functions and code generation are available via -msse4.1.
# Support for SSE4.2 built-in functions and code generation are available via -msse4.2.
# Both SSE4.1 and SSE4.2 support can be enabled via -msse4.


My gcc 4.2.1 does accept the -msse3 switch, unsure what effect it has, though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!