mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 04:39:38 +02:00
* i8086: added assembler implementation of fpc_round_real and removed remaining softfloat dependencies.
git-svn-id: trunk@27195 -
This commit is contained in:
parent
7ba4e67564
commit
b89822d3e9
@ -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}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user