* some floating point routines improved

This commit is contained in:
florian 2005-03-13 17:14:46 +00:00
parent 454fefefbc
commit f94047b703

View File

@ -128,6 +128,7 @@
fmulp %st,%st(1)
fstcw .LCW1
fstcw .LCW2
fwait
andw $0xf3ff,.LCW2
orw $0x0400,.LCW2
fldcw .LCW2
@ -141,6 +142,7 @@
faddp %st,%st(1)
fscale
fstp %st(1)
fclex
jmp .LCW3
// store some help data in the data segment
.data
@ -164,16 +166,14 @@
fnstcw -4(%ebp)
fwait
movw -4(%ebp),%cx
orw $0x0c3f,%cx
orw $0x0f00,%cx
movw %cx,-8(%ebp)
fldcw -8(%ebp)
fwait
fldt d
frndint
fldt d
fsub %st(1),%st
fstp %st(1)
fclex
fldcw -4(%ebp)
end;
@ -189,13 +189,13 @@
fnstcw -4(%ebp)
fwait
movw -4(%ebp),%cx
orw $0x0c3f,%cx
orw $0x0f00,%cx
movw %cx,-8(%ebp)
fldcw -8(%ebp)
fwait
fldt d
frndint
fclex
fwait
fldcw -4(%ebp)
end;
@ -215,15 +215,14 @@
fnstcw oldcw
fwait
movw oldcw,%cx
orw $0x0c3f,%cx
orw $0x0f00,%cx
movw %cx,newcw
fldcw newcw
fwait
fldt d
fistpq res
fwait
movl res,%eax
movl res+4,%edx
fclex
fldcw oldcw
end;
@ -240,22 +239,13 @@
{$endif hascompilerproc}
{$endif}
var
oldcw,
newcw : word;
res : int64;
asm
fnstcw oldcw
fwait
movw $0x1372,newcw
fclex
fldcw newcw
fwait
fldt d
fistpq res
fwait
movl res,%eax
movl res+4,%edx
fclex
fldcw oldcw
end;
@ -288,7 +278,10 @@
{
$Log$
Revision 1.23 2005-03-09 20:50:11 florian
Revision 1.24 2005-03-13 17:14:46 florian
* some floating point routines improved
Revision 1.23 2005/03/09 20:50:11 florian
* C. Western: utf-8 reading from resource files
Revision 1.22 2005/02/14 17:13:22 peter