diff options
author | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-12-22 00:49:17 +0000 |
---|---|---|
committer | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-12-22 00:49:17 +0000 |
commit | 01d6ffd53e20d19b01c36e828ff324eb8fc3771e (patch) | |
tree | 95d909cb99aeffb6191429d64ad95dc574b57160 /rtl/arm | |
parent | ad8255d98102ccff058bed6d2839711c6e6bbd8b (diff) | |
download | fpc-01d6ffd53e20d19b01c36e828ff324eb8fc3771e.tar.gz |
* fixed SetPrecisionMode/GetPrecisionMode for wince.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@5673 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/arm')
-rw-r--r-- | rtl/arm/mathu.inc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/rtl/arm/mathu.inc b/rtl/arm/mathu.inc index c16c187f31..45eb17509f 100644 --- a/rtl/arm/mathu.inc +++ b/rtl/arm/mathu.inc @@ -67,7 +67,7 @@ var c: dword; begin c:=_controlfp(0, 0); - if c and _PC_64 <> 0 then + if c and _MCW_PC = _PC_64 then Result:=pmDouble else Result:=pmSingle; @@ -77,15 +77,12 @@ function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode var c: dword; begin + Result:=GetPrecisionMode; if Precision = pmSingle then - c:=_PC_53 + c:=_PC_24 else c:=_PC_64; - c:=_controlfp(c, _MCW_PC); - if c and _PC_64 <> 0 then - Result:=pmDouble - else - Result:=pmSingle; + _controlfp(c, _MCW_PC); end; function ConvertExceptionMask(em: dword): TFPUExceptionMask; |