Where have I said something about how the OS handles SSE?
Where have I said that you can't compile inline assembly that uses SSE without -msse?
Nowhere!
The problem was that Mupen doesn't run when it's compiled without -msse. -msse says GCC that it should optimize the Code for SSE. This means that all those 64-bit variables are stored in SSE registers.
But if you now compile it without -msse, the base registers are used. So function calls that don't overwrite the base registers with SSE activated do so without SSE. And if you don't conform to the C Calling Convention and the GCC Convention, then it generates problems, because eax, ecx and edx needn't to be saved by the function - you have to save them by yourself. If you use SSE, it can be that nothing valuable is in the base registers. But now without SSE there are valuable informations in these registers! Always! But these registers are overwritten because somewhere code violates the C Calling Convention and/or GCC Convention. Do you understand know what I'm talking about? I was never talking about the OS because that's not the problem. The problem is somewhere in the code. Code, that is only thought for use with SSE - I think in the assembly part.
It seems so, since it compiles default with the -msse option and removing it breaks a lot of things I cannot figure out.
Have you tried it in interpreter mode? AFAIK the assembly part is only for the dynarec. And because I think that the bug is a violation against the C Calling Convention and/or GCC Convention it's very likely that it's in the assembly part. So try to use Mupen without that parts. AFAIK you do so if you don't use the dynarec.
blight: Because it seems that we don't understand very well in english I'll write it in german for you:
Ich rede nicht über das Problem, daß SSE Code nicht auf nicht-SSE fähigen Rechnern läuft. Das ist klar und weiß jeder, der ein bisschen Assembly kann. Das sollten sogar die meisten wissen, die kein Assembly können.
Das Problem ist vielmehr, daß der Assembly Code irgendwo die C Calling Convention verletzt oder die GCC Convention. Letztere besagt z.B., daß eax, ecx und edx einfach überschrieben werden dürfen, alle restlichen Register aber gesichert werden müssen.
So, nun verwenden wir _KEIN_ SSE. Also müssen wir die Base-Register nutzen. Aber diese werden vor unserem Call ziemlich sicher nicht gesichert - weil sie normalerweise nichts wichtiges enthalten, da die 64-bit Variablen normalerweise in den SSE Registern gespeichert werden. Nun werden sie aber im Stack (dort werden auch lokale Variablen abgelegt, lies am besten mal die C Calling Convention) und natürlich zum Bearbeiten auch in 2 Base-Registern pro Variable abgelegt. Da der Compiler aber optimiert, versucht er natürlich so lange wie möglich die Variablen in Registern zu halten. Diese werden jetzt aber nicht gesichert und daher beim nächsten call sehr wahrscheinlich überschrieben. Jetzt sollte Dir klar sein, warum es Probleme gibt, oder? Falls Dus immer noch nicht verstehst, erklär ichs Dir nochmal langsam.
Das mit dem SIGILL war was ganz anderes. Das war, als er es mit -msse compiliert hatte. Darum ging es aber gar nicht mehr, da das ein erledigtes Thema ist - dagegen kann er nix machen. Gegen die "Unsauberkeit" an einer oder mehrerer Stellen am Code schon, sodaß diese dann auch funktionieren, wenn der Rest ohne -msse compiliert ist.
Es geht hier die ganze Zeit eigentlich nur darum, wie der Rest compiliert ist. gas oder nasm oder was auch immer interessiert es kaum, ob ein -msse übergeben wird - ein Assembler generiert keinen Code, das macht der Compiler. Und eben dieser Code, der von diesem generiert wird, muss mit dem Assembly Code kompatibel sein. Und dafür gibt es eben die C Calling Convention und die GCC Convention.
Hoffe, Du hast es nun verstanden. Falls nicht, versuch ichs nochmal anders auszudrücken

.