فهرست منبع

+ include softfpu in the ZX Spectrum system unit, when compiled with -dFULL_RTL (which still doesn't work)

git-svn-id: branches/z80@45008 -
nickysn 5 سال پیش
والد
کامیت
9c27227d3a
1فایلهای تغییر یافته به همراه36 افزوده شده و 0 حذف شده
  1. 36 0
      rtl/zxspectrum/system.pp

+ 36 - 0
rtl/zxspectrum/system.pp

@@ -8,6 +8,17 @@ interface
 
 {$I systemh.inc}
 
+{$ifndef FPUNONE}
+{$ifdef FPC_HAS_FEATURE_SOFTFPU}
+
+{$define fpc_softfpu_interface}
+{$i softfpu.pp}
+{$undef fpc_softfpu_interface}
+
+{$endif FPC_HAS_FEATURE_SOFTFPU}
+
+{$endif FPUNONE}
+
 {$else FULL_RTL}
 
 {$mode objfpc}
@@ -91,7 +102,32 @@ function KeyPressed: Boolean;
 implementation
 
 {$ifdef FULL_RTL}
+
 {$I system.inc}
+
+{$ifndef FPUNONE}
+{$ifdef FPC_HAS_FEATURE_SOFTFPU}
+
+{$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_extractFloat64Frac}
+{$define FPC_SYSTEM_HAS_extractFloat64Sign}
+{$define FPC_SYSTEM_HAS_ExtractFloat32Frac}
+{$define FPC_SYSTEM_HAS_extractFloat32Exp}
+{$define FPC_SYSTEM_HAS_extractFloat32Sign}
+
+{$endif FPC_HAS_FEATURE_SOFTFPU}
+{$endif FPUNONE}
+
 {$else FULL_RTL}
 {$I z80.inc}
 {$endif FULL_RTL}