From 8dcf4e62b753d35569f4e5d815ae45bb4f02c20d Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 17 Aug 2024 18:23:16 +0200 Subject: [PATCH] * FCVT.W.D returns only a 32 bit int --- compiler/riscv/nrvinl.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compiler/riscv/nrvinl.pas b/compiler/riscv/nrvinl.pas index 98064c1834..ebf2899c63 100644 --- a/compiler/riscv/nrvinl.pas +++ b/compiler/riscv/nrvinl.pas @@ -117,7 +117,11 @@ implementation function trvinlinenode.first_round_real: tnode; begin - if (current_settings.fputype >= fpu_fd) then + if +{$ifdef RISCV32} + is_32bitint(resultdef) and +{$endif RISCV32} + (current_settings.fputype >= fpu_fd) then begin expectloc:=LOC_FPUREGISTER; first_round_real := nil; @@ -131,7 +135,11 @@ implementation function trvinlinenode.first_trunc_real: tnode; begin - if (current_settings.fputype >= fpu_fd) then + if +{$ifdef RISCV32} + is_32bitint(resultdef) and +{$endif RISCV32} + (current_settings.fputype >= fpu_fd) then begin expectloc:=LOC_FPUREGISTER; first_trunc_real := nil;