mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 06:29:38 +02:00
* Removed 'absolute'-style aliasing records to floating-point variables, because it causes internal compiler error on some targets.
git-svn-id: trunk@26122 -
This commit is contained in:
parent
43c96cd898
commit
472b82c09a
@ -142,8 +142,9 @@ type
|
|||||||
aExp, shiftCount : smallint;
|
aExp, shiftCount : smallint;
|
||||||
aSig : int64;
|
aSig : int64;
|
||||||
z : int64;
|
z : int64;
|
||||||
a: float64 absolute d;
|
a: float64;
|
||||||
begin
|
begin
|
||||||
|
a:=float64(d);
|
||||||
aSig:=(int64(a.high and $000fffff) shl 32) or longword(a.low);
|
aSig:=(int64(a.high and $000fffff) shl 32) or longword(a.low);
|
||||||
aExp:=(a.high shr 20) and $7FF;
|
aExp:=(a.high shr 20) and $7FF;
|
||||||
if aExp<>0 then
|
if aExp<>0 then
|
||||||
@ -190,11 +191,12 @@ type
|
|||||||
{ based on softfloat float32_to_int64_round_to_zero }
|
{ based on softfloat float32_to_int64_round_to_zero }
|
||||||
Function fpc_trunc_real( d: valreal ): int64; compilerproc;
|
Function fpc_trunc_real( d: valreal ): int64; compilerproc;
|
||||||
Var
|
Var
|
||||||
a : float32 absolute d;
|
a : float32;
|
||||||
aExp, shiftCount : smallint;
|
aExp, shiftCount : smallint;
|
||||||
aSig : longint;
|
aSig : longint;
|
||||||
aSig64, z : int64;
|
aSig64, z : int64;
|
||||||
Begin
|
Begin
|
||||||
|
a := float32(d);
|
||||||
aSig := a and $007FFFFF;
|
aSig := a and $007FFFFF;
|
||||||
aExp := (a shr 23) and $FF;
|
aExp := (a shr 23) and $FF;
|
||||||
shiftCount := aExp - $BE;
|
shiftCount := aExp - $BE;
|
||||||
|
Loading…
Reference in New Issue
Block a user