summaryrefslogtreecommitdiff
path: root/libs/minisat/00_PATCH_no_fpu_control.patch
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-08-30 20:46:20 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-08-30 20:46:20 +0200
commit5033b51947a6ef02cb785b5622e993335efa750a (patch)
tree7bed18c526bd94917fa2f08e3df12209863698a1 /libs/minisat/00_PATCH_no_fpu_control.patch
parentfefe0fc0430f4f173a25e674708aa0f4f0854b31 (diff)
New upstream version 0.7+20180830git0b7a184
Diffstat (limited to 'libs/minisat/00_PATCH_no_fpu_control.patch')
-rw-r--r--libs/minisat/00_PATCH_no_fpu_control.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/libs/minisat/00_PATCH_no_fpu_control.patch b/libs/minisat/00_PATCH_no_fpu_control.patch
new file mode 100644
index 00000000..6c754b1e
--- /dev/null
+++ b/libs/minisat/00_PATCH_no_fpu_control.patch
@@ -0,0 +1,43 @@
+--- System.cc
++++ System.cc
+@@ -97,17 +97,6 @@ double Minisat::memUsedPeak(bool) { return 0; }
+ #endif
+
+
+-void Minisat::setX86FPUPrecision()
+-{
+-#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
+- // Only correct FPU precision on Linux architectures that needs and supports it:
+- fpu_control_t oldcw, newcw;
+- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
+- printf("WARNING: for repeatability, setting FPU to use double precision\n");
+-#endif
+-}
+-
+-
+ #if !defined(_MSC_VER) && !defined(__MINGW32__)
+ void Minisat::limitMemory(uint64_t max_mem_mb)
+ {
+--- System.h
++++ System.h
+@@ -21,10 +21,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+ #ifndef Minisat_System_h
+ #define Minisat_System_h
+
+-#if defined(__linux__)
+-#include <fpu_control.h>
+-#endif
+-
+ #include "IntTypes.h"
+
+ //-------------------------------------------------------------------------------------------------
+@@ -36,9 +32,6 @@ static inline double cpuTime(void); // CPU-time in seconds.
+ extern double memUsed(); // Memory in mega bytes (returns 0 for unsupported architectures).
+ extern double memUsedPeak(bool strictlyPeak = false); // Peak-memory in mega bytes (returns 0 for unsupported architectures).
+
+-extern void setX86FPUPrecision(); // Make sure double's are represented with the same precision
+- // in memory and registers.
+-
+ extern void limitMemory(uint64_t max_mem_mb); // Set a limit on total memory usage. The exact
+ // semantics varies depending on architecture.
+