mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* i8086 implementation of fpc_int_real
git-svn-id: branches/i8086@23832 -
This commit is contained in:
parent
47ff0a520d
commit
6757fe5752
@ -3,7 +3,7 @@
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2003 by the Free Pascal development team.
|
||||
|
||||
Implementation of mathematical Routines (only for real)
|
||||
Implementation of mathematical Routines (for extended type)
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
@ -13,3 +13,23 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$asmmode intel}
|
||||
|
||||
{$define FPC_SYSTEM_HAS_INT}
|
||||
function fpc_int_real(d : ValReal) : ValReal;assembler;compilerproc;
|
||||
asm
|
||||
sub sp, 2
|
||||
fnstcw [bp-2]
|
||||
fwait
|
||||
mov cx, word [bp-2]
|
||||
or word [bp-2], $0f00
|
||||
fldcw [bp-2]
|
||||
fwait
|
||||
fld tbyte [d]
|
||||
frndint
|
||||
fwait
|
||||
mov word [bp-2], cx
|
||||
fldcw [bp-2]
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user