浏览代码

m68k: set palmos to use 68000 and no FPU by default

git-svn-id: trunk@37916 -
Károly Balogh 7 年之前
父节点
当前提交
75158d02ca
共有 1 个文件被更改,包括 25 次插入8 次删除
  1. 25 8
      compiler/options.pas

+ 25 - 8
compiler/options.pas

@@ -4070,16 +4070,33 @@ begin
 {$endif mipsel}
 {$ifdef m68k}
   if init_settings.cputype in cpu_coldfire then
-    def_system_macro('CPUCOLDFIRE')
-  else
-    if (target_info.system in [system_m68k_linux,system_m68k_netbsd]) and
-       not (option.FPUSetExplicitly) then
+    def_system_macro('CPUCOLDFIRE');
+
+  case target_info.system of
+    system_m68k_linux,
+    system_m68k_netbsd:
+      begin
+        if not (option.FPUSetExplicitly) and
+           not (init_settings.cputype in cpu_coldfire) then
+          begin
+            { enable HW FPU for UNIX by default, but only for
+              original 68k, not Coldfire }
+            exclude(init_settings.moduleswitches,cs_fp_emulation);
+            init_settings.fputype:=fpu_68881;
+          end;
+      end;
+    system_m68k_palmos:
       begin
-        { enable HW FPU for UNIX by default, but only for
-          original 68k, not Coldfire }
-        exclude(init_settings.moduleswitches,cs_fp_emulation);
-        init_settings.fputype:=fpu_68881;
+        if not option.CPUSetExplicitly then
+          init_settings.cputype:=cpu_mc68000;
+        if not (option.FPUSetExplicitly) then
+          begin
+            { No FPU for PalmOS by default }
+            exclude(init_settings.moduleswitches,cs_fp_emulation);
+            init_settings.fputype:=fpu_none;
+          end;
       end;
+  end;
 {$endif m68k}
 
   { now we can define cpu and fpu type }