* fixed exp to be pic safe

git-svn-id: trunk@1573 -
This commit is contained in:
florian 2005-10-23 13:37:08 +00:00
parent 1b97e2cffd
commit 8711adb9d1

View File

@ -125,18 +125,19 @@ FPC_ABSMASK_DOUBLE:
{$define FPC_SYSTEM_HAS_EXP} {$define FPC_SYSTEM_HAS_EXP}
function fpc_exp_real(d : ValReal) : ValReal;assembler;compilerproc; function fpc_exp_real(d : ValReal) : ValReal;assembler;compilerproc;
asm asm
subq $16,%rsp
// comes from DJ GPP // comes from DJ GPP
fldt d fldt d
fldl2e fldl2e
fmulp %st,%st(1) fmulp %st,%st(1)
fstcw .LCW1 fstcw -2(%rbp)
fstcw .LCW2 fstcw -4(%rbp)
andw $0xf3ff,.LCW2 andw $0xf3ff,-4(%rbp)
orw $0x0400,.LCW2 orw $0x0400,-4(%rbp)
fldcw .LCW2 fldcw -4(%rbp)
fld %st(0) fld %st(0)
frndint frndint
fldcw .LCW1 fldcw -2(%rbp)
fxch %st(1) fxch %st(1)
fsub %st(1),%st fsub %st(1),%st
f2xm1 f2xm1
@ -144,15 +145,6 @@ FPC_ABSMASK_DOUBLE:
faddp %st,%st(1) faddp %st,%st(1)
fscale fscale
fstp %st(1) fstp %st(1)
jmp .LCW3
// store some help data in the data segment
.data
.LCW1:
.word 0
.LCW2:
.word 0
.text
.LCW3:
end; end;