Browse Source

+ SysResetFPU for Aarch64

florian 8 months ago
parent
commit
072f1bfb29
1 changed files with 9 additions and 0 deletions
  1. 9 0
      rtl/aarch64/aarch64.inc

+ 9 - 0
rtl/aarch64/aarch64.inc

@@ -157,6 +157,15 @@ procedure SysInitFPU;
   end;
   end;
 
 
 
 
+{$define FPC_SYSTEM_HAS_SYSRESETFPU}
+Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  softfloat_exception_flags:=[];
+  { clear all "exception happened" flags we care about}
+  setfpsr(getfpsr and not(fpu_exception_mask shr fpu_exception_mask_to_status_mask_shift));
+end;
+
+
 {****************************************************************************
 {****************************************************************************
                                 Move / Fill
                                 Move / Fill
 ****************************************************************************}
 ****************************************************************************}