diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2007-10-07 11:45:55 +0000 |
---|---|---|
committer | Neil Booth <neil@daikokuya.co.uk> | 2007-10-07 11:45:55 +0000 |
commit | 4bdd45a1cdc1f329ce090b3dfd288b99db6c7fc6 (patch) | |
tree | 8323d17a395d8dbbb4d9c91239fc92e1ebb439fa /lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 8caf8257a3b599d746e7a0690e9a10c357b3da65 (diff) | |
download | external_llvm-4bdd45a1cdc1f329ce090b3dfd288b99db6c7fc6.zip external_llvm-4bdd45a1cdc1f329ce090b3dfd288b99db6c7fc6.tar.gz external_llvm-4bdd45a1cdc1f329ce090b3dfd288b99db6c7fc6.tar.bz2 |
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
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 61be350..96604f1 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(); |