mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 23:09:28 +02:00
+ i8086 asm implementation of fpc_frac_real, based on the i386 version
git-svn-id: trunk@26131 -
This commit is contained in:
parent
1bf55d3086
commit
bb0a3a7374
@ -117,6 +117,24 @@
|
|||||||
fstp st(1)
|
fstp st(1)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$define FPC_SYSTEM_HAS_FRAC}
|
||||||
|
function fpc_frac_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||||
|
asm
|
||||||
|
sub sp, 2
|
||||||
|
fnstcw [bp-2]
|
||||||
|
fwait
|
||||||
|
mov cx, [bp-2]
|
||||||
|
or word [bp-2], $0f00
|
||||||
|
fldcw [bp-2]
|
||||||
|
fld tbyte [d]
|
||||||
|
frndint
|
||||||
|
fld tbyte [d]
|
||||||
|
fsub st, st(1)
|
||||||
|
fstp st(1)
|
||||||
|
mov [bp-2], cx
|
||||||
|
fldcw [bp-2]
|
||||||
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_INT}
|
{$define FPC_SYSTEM_HAS_INT}
|
||||||
function fpc_int_real(d : ValReal) : ValReal;assembler;compilerproc;
|
function fpc_int_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||||
asm
|
asm
|
||||||
|
Loading…
Reference in New Issue
Block a user