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 | 5f00973393f24c093c5631b3a662cca54f777e49 (patch) | |
| tree | 23358596dcd3b0a1dff45ad642f1dc9a43de2616 /llvm/lib/ExecutionEngine | |
| parent | c330d008f48a3a7a396743f4cf4bdebbdafa8ba7 (diff) | |
| download | bcm5719-llvm-5f00973393f24c093c5631b3a662cca54f777e49.tar.gz bcm5719-llvm-5f00973393f24c093c5631b3a662cca54f777e49.zip | |
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.
llvm-svn: 42732
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 61be35097b9..96604f10bcc 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/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(); |

