Browse Source

* RiscV: emit an error if fpu_fd is used on a cpu without f and d extensions

florian 7 months ago
parent
commit
2da48488d7
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/options.pas

+ 4 - 0
compiler/options.pas

@@ -5515,6 +5515,10 @@ begin
             end;
         end;
     end;
+
+  { check if the fpu type requires the F and D extension }
+  if (init_settings.fputype in [fpu_fd]) and not((cpu_capabilities[init_settings.cputype]*[CPURV_HAS_F,CPURV_HAS_D])=[CPURV_HAS_F,CPURV_HAS_D]) then
+    Message2(option_unsupported_fpu,fputypestr[init_settings.fputype],cputypestr[init_settings.cputype]);
 {$endif defined(riscv32) or defined(riscv64)}
 
 {$ifdef jvm}