about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-06-15 07:51:10 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-07-12 23:25:49 +0100
commit7ff20e3da8b6d3384157d24282d510eb8e4d2f10 (patch)
tree7e0bc60c8de83939f0c30f9169481b989522a478 /lib/Core
parent3eece12c6c5832dce7148a4c8a9c0d4e5ac37f38 (diff)
downloadklee-7ff20e3da8b6d3384157d24282d510eb8e4d2f10.tar.gz
llvm38: no rounding in APFloat
The rounding was removed because it was never needed:
llvm-mirror/llvm@ff278be

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 3d7eb21d..b053d488 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2242,8 +2242,13 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) {
         !fpWidthToSemantics(right->getWidth()))
       return terminateStateOnExecError(state, "Unsupported FRem operation");
     llvm::APFloat Res(*fpWidthToSemantics(left->getWidth()), left->getAPValue());
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 8)
+    Res.mod(
+        APFloat(*fpWidthToSemantics(right->getWidth()), right->getAPValue()));
+#else
     Res.mod(APFloat(*fpWidthToSemantics(right->getWidth()),right->getAPValue()),
             APFloat::rmNearestTiesToEven);
+#endif
     bindLocal(ki, state, ConstantExpr::alloc(Res.bitcastToAPInt()));
     break;
   }