Jump to content
  • Advertisement
Sign in to follow this  
lawnjelly

Disabling SSE for debugging

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

Just a quick one, I usually painstakingly go through SSE instructions I've written to find out the minimum requirements for a SIMD optimized routine, so I can switch to the reference implementation if the CPU doesn't support (and call __cpuid at startup).

 

Of course, there is always the chance I will make a mistake and the program will try and execute a non-existent instruction on a user's machine and crash. Does anyone know a way of disabling SSE etc on a development machine so as to check I'm not calling any naughty instructions? I know sometimes there is a BIOS switch but I'd prefer not to do that in case my windows install has a spaz out... :lol:

Share this post


Link to post
Share on other sites
Advertisement

Why don't you just disable the SSE versions that you don't want to support via compiler flags?

 

For example, if I tell GCC -mno-sse, then even an innocent _mm_setzero_si128() will fail to compile.

Share this post


Link to post
Share on other sites

 

Why don't you just disable the SSE versions that you don't want to support via compiler flags?

 

For example, if I tell GCC -mno-sse, then even an innocent _mm_setzero_si128() will fail to compile.

 

Hmm.. yeah I'm probably being dumb.

 

I am hot swapping the routines used, rather than compiling different versions of the executable, so the higher version SSE stuff needs to compile, I just need to make sure it doesn't run.

 

But I might be able to do some #ifdef jiggery pokery to use the compiler errors to show where I'm using a higher version when I didn't intend to, as you say.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!