Merged revisions 1373 via svnmerge from

svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/trunk

r1373 (florian)
* synched with i386

git-svn-id: branches/fixes_2_0@1435 -
This commit is contained in:
peter 2005-10-16 20:46:55 +00:00
parent 09028306e3
commit 04ca9513ac

View File

@ -168,7 +168,7 @@
fwait
fldt d
frndint
fnclex
fwait
fldcw -4(%rbp)
end;
@ -181,39 +181,29 @@
newcw : word;
res : int64;
asm
fnstcw oldcw
fwait
movw oldcw,%cx
orw $0x0c3f,%cx
movw %cx,newcw
fldcw newcw
fwait
fldt d
fistpq res
movq res,%rax
fnclex
fldcw oldcw
fnstcw oldcw
fwait
movw oldcw,%cx
orw $0x0c3f,%cx
movw %cx,newcw
fldcw newcw
fldt d
fistpq res
fwait
movq res,%rax
fldcw oldcw
end;
{$define FPC_SYSTEM_HAS_ROUND}
function fpc_round_real(d : ValReal) : int64;assembler;compilerproc;
var
oldcw,
newcw : word;
res : int64;
asm
fnstcw oldcw
fwait
movw $0x1372,newcw
fnclex
fldcw newcw
fwait
fldt d
fistpq res
movq res,%rax
fnclex
fldcw oldcw
fldt d
fistpq res
fwait
movq res,%rax
end;