diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index 61c14ce0c6..0bc011d21a 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -805,10 +805,8 @@ begin if IsConsole then writeln(stderr,'In JumpToHandleErrorFrame error=',error); {$endif SYSTEMEXCEPTIONDEBUG} - if resetFPU[exceptLevel] then asm - fninit - fldcw fpucw - end; + if resetFPU[exceptLevel] then + SysResetFPU; { build a fake stack } asm {$ifdef REGCALL} @@ -1002,11 +1000,7 @@ procedure fpc_cpucodeinit; sse_check:=false; has_sse_support:=sse_support; has_mmx_support:=mmx_support; - { reset FPU } - asm - fninit - fldcw fpucw - end; + SysResetFPU; setup_fastmove; end;