浏览代码

+ SysResetFPU for Aarch64

florian 10 月之前
父节点
当前提交
072f1bfb29
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      rtl/aarch64/aarch64.inc

+ 9 - 0
rtl/aarch64/aarch64.inc

@@ -157,6 +157,15 @@ procedure SysInitFPU;
   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
 ****************************************************************************}