From 2da48488d7075d84f0022cbaf0be8084482d4749 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 24 Dec 2024 16:36:55 +0100 Subject: [PATCH] * RiscV: emit an error if fpu_fd is used on a cpu without f and d extensions --- compiler/options.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/options.pas b/compiler/options.pas index 3d4ebc3308..9f263b842a 100644 --- a/compiler/options.pas +++ b/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}