瀏覽代碼

* commented our sse hacking

git-svn-id: trunk@5936 -
florian 18 年之前
父節點
當前提交
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
           if sse_check then
             begin
             begin
               os_supports_sse:=false;
               os_supports_sse:=false;
-              { if yes, then retry }
+              { skip the offending movq xmm0,xmm0 instruction }
               inc(excep^.ContextRecord^.Eip,4);
               inc(excep^.ContextRecord^.Eip,4);
               excep^.ExceptionRecord^.ExceptionCode := 0;
               excep^.ExceptionRecord^.ExceptionCode := 0;
               res:=EXCEPTION_CONTINUE_EXECUTION;
               res:=EXCEPTION_CONTINUE_EXECUTION;
@@ -899,12 +899,15 @@ end;
 
 
 { because of the brain dead sse detection on x86, this test is post poned }
 { because of the brain dead sse detection on x86, this test is post poned }
 procedure fpc_cpucodeinit;
 procedure fpc_cpucodeinit;
+  label
+    sse_resume_addr;
   begin
   begin
     os_supports_sse:=true;
     os_supports_sse:=true;
     sse_check:=true;
     sse_check:=true;
     asm
     asm
       { force an sse exception if no sse is supported, the exception handler sets
       { force an sse exception if no sse is supported, the exception handler sets
         os_supports_sse to false then }
         os_supports_sse to false then }
+      { don't change this instruction, the code above depends on its size }
       movq %xmm0,%xmm0
       movq %xmm0,%xmm0
     end;
     end;
     sse_check:=false;
     sse_check:=false;
@@ -915,8 +918,6 @@ procedure fpc_cpucodeinit;
   end;
   end;
 
 
 
 
-
-
 {****************************************************************************
 {****************************************************************************
                       OS dependend widestrings
                       OS dependend widestrings
 ****************************************************************************}
 ****************************************************************************}