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


problem with SSE

Recommended Posts

I upgraded my VC with Processor Pack and used intrinsics to utilize SSE extension but get a problem: when I used MOVAPS (with inline asm or intrinsics) program (running on Windows2000) crashed with exception PRIVILEGED INSTRUCTION, but with MOVUPS all is OK... Variable what I used is aligned to 16 (as requred) OS support for SSE is on also tried to compile some Intel sample code - same result... when whats happend ???

Share this post

Link to post
Share on other sites
Privelaged Instruction usually is what you get when you access memory which isn''t properly aligned. so although you say you''ve aligned it, for whatever reason the result is behaving like it isn''t (the fact the the [slower] UPS version runs and the [fast] APS doesn''t is another indication of this.

Did you remember to install Service Pack 4 (or 5) for VC _before_ you installed the Processor Pack ??

How are you aligning the memory ??

Any automatic variables should be aligned with: __declspec(align(16))

Memory should be dynamically allocated with: _mm_malloc(size, 16)

Also try using special F32vec4 (etc) data types

Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites