Browse Source

+ Xtensa: mathu.inc using only the softfloat unit provided mechanisms

git-svn-id: trunk@44347 -
florian 5 years ago
parent
commit
e34a759659
2 changed files with 58 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 57 0
      rtl/xtensa/mathu.inc

+ 1 - 0
.gitattributes

@@ -12079,6 +12079,7 @@ rtl/xtensa/cpuh.inc svneol=native#text/plain
 rtl/xtensa/int64p.inc svneol=native#text/plain
 rtl/xtensa/makefile.cpu svneol=native#text/plain
 rtl/xtensa/math.inc svneol=native#text/plain
+rtl/xtensa/mathu.inc svneol=native#text/plain
 rtl/xtensa/set.inc svneol=native#text/plain
 rtl/xtensa/setjump.inc svneol=native#text/plain
 rtl/xtensa/setjumph.inc svneol=native#text/plain

+ 57 - 0
rtl/xtensa/mathu.inc

@@ -0,0 +1,57 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2004 by Florian Klaempfl
+    member of the Free Pascal development team
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+function GetRoundMode: TFPURoundingMode;
+  begin
+    Result:=softfloat_rounding_mode;
+  end;
+
+
+function SetRoundMode(const RoundMode: TFPURoundingMode): TFPURoundingMode;
+  begin
+    softfloat_rounding_mode:=RoundMode;
+  end;
+
+
+ function GetPrecisionMode: TFPUPrecisionMode;
+  begin
+    result := pmSingle;
+  end;
+
+
+function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;
+  begin
+    { nothing to do, not supported }
+    result := pmSingle;
+  end;
+
+
+function GetExceptionMask: TFPUExceptionMask;
+  begin
+    Result:=softfloat_exception_mask
+  end;
+
+
+function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
+  begin
+    softfloat_exception_mask:=Mask;
+  end;
+
+
+procedure ClearExceptions(RaisePending: Boolean = true);
+  begin
+    softfloat_exception_flags:=[];
+  end;
+
+