Kaynağa Gözat

+ PS1 system unit: include the softfpu code, in case the softfpu is enabled in
the compiler (it is still disabled by default)

Nikolay Nikolov 10 ay önce
ebeveyn
işleme
fc039aab28
1 değiştirilmiş dosya ile 33 ekleme ve 0 silme
  1. 33 0
      rtl/ps1/system.pp

+ 33 - 0
rtl/ps1/system.pp

@@ -5,6 +5,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}
+
 var
   argc:longint=0;
   argv:PPAnsiChar;
@@ -38,6 +49,28 @@ const
 {I ../mips/setjump.inc}
 {$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}
 
 procedure Randomize;
 begin