mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:29:14 +02:00
* fixed conversion from int64/qword to double errors
This commit is contained in:
parent
0ab6c37c31
commit
a28ee81ed6
@ -252,11 +252,19 @@ Procedure fpc_rewrite_typed(var f : TypedFile;Size : Longint); compilerproc;
|
|||||||
Procedure fpc_typed_write(TypeSize : Longint;var f : TypedFile;const Buf); compilerproc;
|
Procedure fpc_typed_write(TypeSize : Longint;var f : TypedFile;const Buf); compilerproc;
|
||||||
Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compilerproc;
|
Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compilerproc;
|
||||||
|
|
||||||
|
{$ifdef POWERPC}
|
||||||
|
function fpc_int64_to_double(i: int64): double; compilerproc;
|
||||||
|
function fpc_qword_to_double(q: qword): double; compilerproc;
|
||||||
|
{$endif POWERPC}
|
||||||
|
|
||||||
{$endif hascompilerproc}
|
{$endif hascompilerproc}
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.17 2002-07-28 20:43:47 florian
|
Revision 1.18 2002-07-31 16:58:12 jonas
|
||||||
|
* fixed conversion from int64/qword to double errors
|
||||||
|
|
||||||
|
Revision 1.17 2002/07/28 20:43:47 florian
|
||||||
* several fixes for linux/powerpc
|
* several fixes for linux/powerpc
|
||||||
* several fixes to MT
|
* several fixes to MT
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
runerror(207);
|
runerror(207);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||||
{$warning FIX ME}
|
{$warning FIX ME}
|
||||||
function trunc(d : extended) : int64;assembler;[internconst:in_const_trunc];
|
function trunc(d : extended) : int64;assembler;[internconst:in_const_trunc];
|
||||||
@ -205,6 +206,11 @@
|
|||||||
Int to real helpers
|
Int to real helpers
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
const
|
||||||
|
longint_to_real_helper: int64 = 0x4330000080000000;
|
||||||
|
cardinal_to_real_helper: int64 = 0x430000000000000;
|
||||||
|
int_to_real_factor: double = double(high(cardinal))+1.0;
|
||||||
|
|
||||||
function fpc_int64_to_double(i: int64): double; compilerproc;
|
function fpc_int64_to_double(i: int64): double; compilerproc;
|
||||||
assembler;
|
assembler;
|
||||||
{ input: high(i) in r3, low(i) in r4 }
|
{ input: high(i) in r3, low(i) in r4 }
|
||||||
@ -236,7 +242,7 @@ asm
|
|||||||
end ['r0','r3','r4','f0','f1','f2','f3'];
|
end ['r0','r3','r4','f0','f1','f2','f3'];
|
||||||
|
|
||||||
|
|
||||||
function fpc_qword_to_real(q: qword): double; compilerproc;
|
function fpc_qword_to_double(q: qword): double; compilerproc;
|
||||||
assembler;
|
assembler;
|
||||||
{ input: high(q) in r3, low(q) in r4 }
|
{ input: high(q) in r3, low(q) in r4 }
|
||||||
{ output: double(q) in f0 }
|
{ output: double(q) in f0 }
|
||||||
@ -267,7 +273,10 @@ end ['r0','r3','f0','f1','f2','f3'];
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2002-07-29 21:28:17 florian
|
Revision 1.7 2002-07-31 16:58:12 jonas
|
||||||
|
* fixed conversion from int64/qword to double errors
|
||||||
|
|
||||||
|
Revision 1.6 2002/07/29 21:28:17 florian
|
||||||
* several fixes to get further with linux/ppc system unit compilation
|
* several fixes to get further with linux/ppc system unit compilation
|
||||||
|
|
||||||
Revision 1.5 2002/07/28 21:39:29 florian
|
Revision 1.5 2002/07/28 21:39:29 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user