Skip to main content
GameDev.net gamedev.net
🔒 Locked

SSE issue

Started by irreversible Sep 2, 2008 at 2:08 AM 2 replies 1.2k views
Original Post
irreversible
irreversible
I'm using some SSE code off the net and my debugger's bugging out trying to access 0xffffffff in the middle of a _mm_load_ps call. The variable I'm passing it is valid and a couple of other _mm_load_ps calls have also already passed. I've enabled the SSE switch for the project (using VC8) and there's no problem compiling/linking the program. I'm wondering (being distant to SSE) if this might be due to another missing compiler switch or do I need to initialize something separately beforehand (?), or it's somehow got something to do with my code (although I've tested the routine separately and it still crashes). I'll post some code if this superficial description isn't enough. PS - although I'm passing 3 floating point values to _mm_load_ps, I have padded the argument, like this: vec a; float sseArgA[4] = { a.x, a.y, a.z, 0 }; _mm_load_ps(sseArgA); Any ideas? :)
RDragon1
RDragon1
Is the address you're loading from 16-byte aligned? Check the disassembly in the debugger to see exactly what's going on.
kratolp
kratolp
That's the point. You should try _mm_loadu_ps instead of _mm_load_ps or to align sseArgA on a 16-bytes boudary.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.