aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core
diff options
context:
space:
mode:
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;
}