+
+ // #NM - Coprocessor unavaliable
+ if(Regs->int_num == 7)
+ {
+ tThread *thread = Proc_GetCurThread();
+ if(!thread->SavedState.bSSEModified)
+ {
+ Proc_EnableSSE();
+ if(!thread->SavedState.SSE)
+ thread->SavedState.SSE = malloc(sizeof(tSSEState) + 0xF);
+ else
+ Proc_RestoreSSE( ((Uint)thread->SavedState.SSE + 0xF) & ~0xF );
+ thread->SavedState.bSSEModified = 1;
+ __asm__ __volatile__ ("sti");
+ return ;
+ }
+ // oops, SSE enabled but a #NM, bad news
+ }