On 20.01.2012 12:00, Alexander von Gluck wrote:
On 20.01.2012 00:18, Fredrik Holmqvist wrote:2012/1/20 Ingo Weinhold <ingo_weinhold@xxxxxx>:Alexander von Gluck wrote:On 19.01.2012 17:26, Ingo Weinhold wrote: > Alexander von Gluck wrote: >> 1) You can download the following (simple) sse2 test c program: >> http://pub.haikufire.com/sse.c >> >> 2) compile it via: gcc sse.c -msse2 -o sse >> >> 3) run it to have it crash as soon as it attempts the sse code. >> Like on executing the first SSE instruction? And how does it crash (which> exception)? "General Protection Fault"If it happens when executing the first SSE instruction, then it's very likely something that we're not setting up (correctly). A look at the IA-32 specs should help find out what our setup is missing yet.I have the same issue with MMX. I havn't used MMX much before so I thought it was just me. I've tried w/o alignment, saving/restoring fpu, emms, sfence and so on. But just doing a 'movd %eax, %mm0' hangs.From the x86 docs i've read, fxsave has to be called before a task switch, and fxrstore has to be called after a taskswitch to keep the fpu in a valid state with sseI see references to us calling fxsave in kernel/arch/x86/arch_thread.cpp on arch_thread_init, however no calls tofxrstore.
nevermind.. the i386_fxsave_swap asm function actually does a fxsave and fxrstore
sorry for the spam.. getting close to just disabling sse instructions in Mesa until I can figure it out.
-- Alex