浏览代码

m68k: fix no FPU support

git-svn-id: trunk@37227 -
Károly Balogh 7 年之前
父节点
当前提交
e1501c86bf
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 2 1
      compiler/m68k/cpuinfo.pas
  2. 3 3
      rtl/inc/systemh.inc
  3. 2 0
      rtl/m68k/m68k.inc

+ 2 - 1
compiler/m68k/cpuinfo.pas

@@ -117,7 +117,8 @@ Const
      'cfv4e'
    );
 
-   fputypestr : array[tfputype] of string[8] = ('',
+   fputypestr : array[tfputype] of string[8] = (
+     'NONE',
      'SOFT',
      'LIBGCC',
      '68881',

+ 3 - 3
rtl/inc/systemh.inc

@@ -218,10 +218,10 @@ Type
   { m68k int64 shl/shr uses soft helper for non constant values }
   {$define FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
 
-  {$define SUPPORT_SINGLE}
-  {$define SUPPORT_DOUBLE}
-
   {$ifndef FPUNONE}
+    {$define SUPPORT_SINGLE}
+    {$define SUPPORT_DOUBLE}
+
     ValReal = Real;
   {$endif}
 

+ 2 - 0
rtl/m68k/m68k.inc

@@ -75,9 +75,11 @@ procedure fpc_cpuinit;
 
 procedure fpc_cpuinit;
   begin
+{$IFNDEF FPUNONE}
     SysResetFPU;
     if (not IsLibrary) then
       SysInitFPU;
+{$ENDIF}
   end;
 
 {$ENDIF}