mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 14:47:21 +01:00
* use generic first_int_to_real 64 bit values on sparc
* compile part of softfpu into the system unit as consequence of using the generic first_int_to_real git-svn-id: trunk@18961 -
This commit is contained in:
parent
1de4d16eea
commit
b17a9385e5
@ -77,18 +77,7 @@ implementation
|
||||
if is_64bitint(left.resultdef) or
|
||||
is_currency(left.resultdef) then
|
||||
begin
|
||||
{ hack to avoid double division by 10000, as it's
|
||||
already done by typecheckpass.resultdef_int_to_real }
|
||||
if is_currency(left.resultdef) then
|
||||
left.resultdef := s64inttype;
|
||||
if is_signed(left.resultdef) then
|
||||
fname := 'fpc_int64_to_double'
|
||||
else
|
||||
fname := 'fpc_qword_to_double';
|
||||
result := ccallnode.createintern(fname,ccallparanode.create(
|
||||
left,nil));
|
||||
left:=nil;
|
||||
firstpass(result);
|
||||
result:=inherited first_int_to_real;
|
||||
exit;
|
||||
end
|
||||
else
|
||||
|
||||
@ -36,13 +36,13 @@ Unit System;
|
||||
function get_cmdline:Pchar;
|
||||
property cmdline:Pchar read get_cmdline;
|
||||
|
||||
{$if defined(CPUARM) or defined(CPUM68K)}
|
||||
{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{$define fpc_softfpu_interface}
|
||||
{$i softfpu.pp}
|
||||
{$undef fpc_softfpu_interface}
|
||||
|
||||
{$endif defined(CPUARM) or defined(CPUM68K)}
|
||||
{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{*****************************************************************************}
|
||||
implementation
|
||||
@ -55,7 +55,7 @@ var
|
||||
|
||||
const calculated_cmdline:Pchar=nil;
|
||||
|
||||
{$if defined(CPUARM) or defined(CPUM68K)}
|
||||
{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{$define fpc_softfpu_implementation}
|
||||
{$i softfpu.pp}
|
||||
@ -73,7 +73,7 @@ const calculated_cmdline:Pchar=nil;
|
||||
{$define FPC_SYSTEM_HAS_extractFloat32Exp}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat32Sign}
|
||||
|
||||
{$endif defined(CPUARM) or defined(CPUM68K)}
|
||||
{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{$I system.inc}
|
||||
|
||||
|
||||
@ -28,9 +28,37 @@ var argc:longint;
|
||||
argv:PPchar;
|
||||
envp:PPchar;
|
||||
|
||||
{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{$define fpc_softfpu_interface}
|
||||
{$i softfpu.pp}
|
||||
{$undef fpc_softfpu_interface}
|
||||
|
||||
{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
{$if defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{$define fpc_softfpu_implementation}
|
||||
{$i softfpu.pp}
|
||||
{$undef fpc_softfpu_implementation}
|
||||
|
||||
{ we get these functions and types from the softfpu code }
|
||||
{$define FPC_SYSTEM_HAS_float64}
|
||||
{$define FPC_SYSTEM_HAS_float32}
|
||||
{$define FPC_SYSTEM_HAS_flag}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat64Frac0}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat64Frac1}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat64Exp}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat64Sign}
|
||||
{$define FPC_SYSTEM_HAS_ExtractFloat32Frac}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat32Exp}
|
||||
{$define FPC_SYSTEM_HAS_extractFloat32Sign}
|
||||
|
||||
{$endif defined(CPUARM) or defined(CPUM68K) or defined(CPUSPARC)}
|
||||
|
||||
{ OS independant parts}
|
||||
|
||||
{$I system.inc}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user