Просмотр исходного кода

* commented our sse hacking

git-svn-id: trunk@5936 -
florian 18 лет назад
Родитель
Сommit
e5dd51c95b
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      rtl/win32/system.pp

+ 4 - 3
rtl/win32/system.pp

@@ -796,7 +796,7 @@ function syswin32_i386_exception_handler(excep : PExceptionPointers) : Longint;s
           if sse_check then
             begin
               os_supports_sse:=false;
-              { if yes, then retry }
+              { skip the offending movq xmm0,xmm0 instruction }
               inc(excep^.ContextRecord^.Eip,4);
               excep^.ExceptionRecord^.ExceptionCode := 0;
               res:=EXCEPTION_CONTINUE_EXECUTION;
@@ -899,12 +899,15 @@ end;
 
 { because of the brain dead sse detection on x86, this test is post poned }
 procedure fpc_cpucodeinit;
+  label
+    sse_resume_addr;
   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 }
       movq %xmm0,%xmm0
     end;
     sse_check:=false;
@@ -915,8 +918,6 @@ procedure fpc_cpucodeinit;
   end;
 
 
-
-
 {****************************************************************************
                       OS dependend widestrings
 ****************************************************************************}