瀏覽代碼

Fix default CPUs for riscv32

git-svn-id: trunk@39819 -
pierre 6 年之前
父節點
當前提交
578e60e6ef
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/options.pas

+ 7 - 0
compiler/options.pas

@@ -4156,10 +4156,17 @@ begin
   if (target_info.abi = abi_riscv_hf) then
     { set default cpu type to ARMv7a for ARMHF unless specified otherwise }
     begin
+      {$ifdef riscv32}
+      if not option.CPUSetExplicitly then
+        init_settings.cputype:=cpu_rv32imafd;
+      if not option.OptCPUSetExplicitly then
+        init_settings.optimizecputype:=cpu_rv32imafd;
+      {$else}
       if not option.CPUSetExplicitly then
         init_settings.cputype:=cpu_rv64imafdc;
       if not option.OptCPUSetExplicitly then
         init_settings.optimizecputype:=cpu_rv64imafdc;
+      {$endif}
 
       { Set FPU type }
       if not(option.FPUSetExplicitly) then