@@ -277,6 +277,9 @@ Begin
StackBottom := Sptr - StackLength;
{ Set up signals handlers }
InstallSignals;
+{$if defined(cpui386) or defined(cpuarm)}
+ fpc_cpucodeinit;
+{$endif cpui386}
{ Setup heap }
InitHeap;
SysInitExceptions;
@@ -34,10 +34,19 @@ begin
End;
sysResetFPU;
- SIGILL,
- SIGBUS,
- SIGSEGV :
+ SIGILL:
+ if sse_check then
+ begin
+ os_supports_sse:=false;
+ res:=0;
+ inc(sigcontext^.sc_eip,3);
+ end
+ else
res:=216;
+ SIGBUS:
+ res:=214;
+ SIGSEGV :
+ res:=216;
end;
{$ifdef FPC_USE_SIGPROCMASK}
reenable_signal(sig);