* i8086: added assembler implementation of fpc_round_real and removed remaining softfloat dependencies.

git-svn-id: trunk@27195 -
This commit is contained in:
sergei 2014-03-20 02:28:47 +00:00
parent 7ba4e67564
commit b89822d3e9
3 changed files with 14 additions and 3 deletions

View File

@ -457,7 +457,6 @@ Procedure SysInitFPU;
fldcw localfpucw
fwait
end;
softfloat_exception_mask:=float_flag_underflow or float_flag_inexact or float_flag_denormal;
end;
@ -474,7 +473,6 @@ Procedure SysResetFPU;
fwait
fldcw localfpucw
end;
softfloat_exception_flags:=0;
end;
{$I int32p.inc}

View File

@ -275,3 +275,17 @@
mov ax, [bp-2]
end;
{$define FPC_SYSTEM_HAS_ROUND}
function fpc_round_real(d : ValReal) : int64;assembler;compilerproc;
var
tmp: int64;
asm
fld tbyte [d]
fistp qword [tmp]
fwait
mov dx, [tmp]
mov cx, [tmp+2]
mov bx, [tmp+4]
mov ax, [tmp+6]
end;

View File

@ -185,7 +185,6 @@ begin
Set8087CW( (CtlWord and $FFC0) or Byte(Mask) );
{ if has_sse_support then
SetSSECSR((GetSSECSR and $ffffe07f) or (dword(Mask) shl 7));}
softfloat_exception_mask:=byte(Mask);
Result := TFPUExceptionMask(Byte(CtlWord and $3F));
end;