diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-11-08 00:45:29 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-11-08 00:45:29 +0000 |
commit | 439fb6fb0ee7473c8f5854525d0a5489c92bcff2 (patch) | |
tree | 4ae7934d603ad46a113f9a1d26980eb0efb1e32a /llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | 3908a4047ec7ec875c8ee15fddf400b193a3774b (diff) | |
download | bcm5719-llvm-439fb6fb0ee7473c8f5854525d0a5489c92bcff2.tar.gz bcm5719-llvm-439fb6fb0ee7473c8f5854525d0a5489c92bcff2.zip |
Fix the interpreter to not crash due to zeroext/signext
llvm-svn: 86428
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index 01bd2c7f899..b59cfd162f9 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -882,16 +882,6 @@ void Interpreter::visitCallSite(CallSite CS) { e = SF.Caller.arg_end(); i != e; ++i, ++pNum) { Value *V = *i; ArgVals.push_back(getOperandValue(V, SF)); - // Promote all integral types whose size is < sizeof(i32) into i32. - // We do this by zero or sign extending the value as appropriate - // according to the parameter attributes - const Type *Ty = V->getType(); - if (Ty->isInteger() && (ArgVals.back().IntVal.getBitWidth() < 32)) { - if (CS.paramHasAttr(pNum, Attribute::ZExt)) - ArgVals.back().IntVal = ArgVals.back().IntVal.zext(32); - else if (CS.paramHasAttr(pNum, Attribute::SExt)) - ArgVals.back().IntVal = ArgVals.back().IntVal.sext(32); - } } // To handle indirect calls, we must get the pointer value from the argument |