mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 17:20:30 +02:00
* fixed generic system.int(...)
This commit is contained in:
parent
ecfbbeffc3
commit
9e6f48750a
@ -249,7 +249,7 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
|
|||||||
l:=f64.low;
|
l:=f64.low;
|
||||||
f64.low:=f64.high;
|
f64.low:=f64.high;
|
||||||
f64.high:=l;
|
f64.high:=l;
|
||||||
{$endif arm}
|
{$endif arm}
|
||||||
trunc:=float64_to_int32_round_to_zero(f64);
|
trunc:=float64_to_int32_round_to_zero(f64);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -276,13 +276,13 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
|
|||||||
sx: longint;
|
sx: longint;
|
||||||
f64 : float64;
|
f64 : float64;
|
||||||
begin
|
begin
|
||||||
move(d,f64,sizeof(f64));
|
f64:=float64(d);
|
||||||
{$ifdef arm}
|
{$ifdef arm}
|
||||||
{ the arm fpu has a strange opinion how a double has to be stored }
|
{ the arm fpu has a strange opinion how a double has to be stored }
|
||||||
i0:=f64.low;
|
i0:=f64.low;
|
||||||
f64.low:=f64.high;
|
f64.low:=f64.high;
|
||||||
f64.high:=i0;
|
f64.high:=i0;
|
||||||
{$endif arm}
|
{$endif arm}
|
||||||
i0 := f64.high;
|
i0 := f64.high;
|
||||||
i1 := cardinal(f64.low);
|
i1 := cardinal(f64.low);
|
||||||
sx := i0 and $80000000;
|
sx := i0 and $80000000;
|
||||||
@ -312,7 +312,7 @@ Function float32_to_int32_round_to_zero( a: Float32 ): longint;
|
|||||||
f64.high := i0;
|
f64.high := i0;
|
||||||
f64.low := longint(i1 and not(cardinal($ffffffff) shr (j0 - 20)));
|
f64.low := longint(i1 and not(cardinal($ffffffff) shr (j0 - 20)));
|
||||||
end;
|
end;
|
||||||
result := d;
|
result:=double(f64);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$else SUPPORT_DOUBLE}
|
{$else SUPPORT_DOUBLE}
|
||||||
@ -1189,7 +1189,10 @@ function fpc_int64_to_double(i : int64): double; compilerproc;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.20 2004-01-24 18:15:58 florian
|
Revision 1.21 2004-02-04 14:15:57 florian
|
||||||
|
* fixed generic system.int(...)
|
||||||
|
|
||||||
|
Revision 1.20 2004/01/24 18:15:58 florian
|
||||||
* fixed small bugs
|
* fixed small bugs
|
||||||
* fixed some arm issues
|
* fixed some arm issues
|
||||||
|
|
||||||
@ -1254,4 +1257,4 @@ function fpc_int64_to_double(i : int64): double; compilerproc;
|
|||||||
* several fixes for linux/powerpc
|
* several fixes for linux/powerpc
|
||||||
* several fixes to MT
|
* several fixes to MT
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user