From ccf596a53e16ea221a9bf8b3874a7d6afa71f1f4 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 7 Oct 2007 11:45:55 +0000 Subject: convertFromInteger, as originally written, expected sign-extended input. APInt unfortunately zero-extends signed integers, so Dale modified the function to expect zero-extended input. Make this assumption explicit in the function name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42732 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/ExecutionEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp') diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 61be35097b..96604f10bc 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -396,7 +396,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { else if (CE->getType() == Type::X86_FP80Ty) { const uint64_t zero[] = {0, 0}; APFloat apf = APFloat(APInt(80, 2, zero)); - (void)apf.convertFromInteger(GV.IntVal.getRawData(), + (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(), GV.IntVal.getBitWidth(), false, APFloat::rmNearestTiesToEven); GV.IntVal = apf.convertToAPInt(); @@ -412,7 +412,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { else if (CE->getType() == Type::X86_FP80Ty) { const uint64_t zero[] = { 0, 0}; APFloat apf = APFloat(APInt(80, 2, zero)); - (void)apf.convertFromInteger(GV.IntVal.getRawData(), + (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(), GV.IntVal.getBitWidth(), true, APFloat::rmNearestTiesToEven); GV.IntVal = apf.convertToAPInt(); -- cgit v1.2.3-18-g5258