* improved SSE check by Martin Schreiber

git-svn-id: trunk@8040 -
This commit is contained in:
florian 2007-07-13 21:16:48 +00:00
parent 7d7080394d
commit 6f6e60b723

View File

@ -1236,15 +1236,19 @@ Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
procedure fpc_cpucodeinit;
begin
os_supports_sse:=true;
sse_check:=true;
asm
{ force an sse exception if no sse is supported, the exception handler sets
os_supports_sse to false then }
{ don't change this instruction, the code above depends on its size }
movaps %xmm7, %xmm6
end;
sse_check:=false;
has_sse_support:=sse_support;
os_supports_sse:=sse_support;
if os_supports_sse then
begin
sse_check:=true;
asm
{ force an sse exception if no sse is supported, the exception handler sets
os_supports_sse to false then }
{ don't change this instruction, the code above depends on its size }
movaps %xmm7, %xmm6
end;
sse_check:=false;
end;
has_sse_support:=os_supports_sse;
has_mmx_support:=mmx_support;
SysResetFPU;
{$ifdef USE_FASTMOVE}