From 8e62069f6298f517f97a333bdc3a7b1c50adad64 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 26 Jun 2009 06:17:51 +0000 Subject: More large integer support. - Allow constructing a ConstantExpr from an APInt, too painful otherwise. - Parser support for large integers. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@74278 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/Executor.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'lib/Core/Executor.cpp') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 1db9efe7..8f5b3daa 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -931,21 +931,7 @@ ref Executor::evalConstant(Constant *c) { return evalConstantExpr(ce); } else { if (const ConstantInt *ci = dyn_cast(c)) { - const APInt &Val = ci->getValue(); - unsigned W = Val.getBitWidth(); - - if (W <= 64) - return ConstantExpr::create(Val.getZExtValue(), W); - - assert(0 && "FIXME: Untested!"); - ref Res = ConstantExpr::create(0, W); - for (unsigned i = 0; i < Val.getNumWords(); ++i) { - ref Tmp = ConstantExpr::alloc(Val.getRawData()[i], W); - Tmp = Tmp->Shl(ConstantExpr::alloc(i * 64, W)); - Res = Res->Or(Tmp); - } - - return Res; + return ConstantExpr::alloc(ci->getValue()); } else if (const ConstantFP *cf = dyn_cast(c)) { switch(cf->getType()->getTypeID()) { case Type::FloatTyID: { -- cgit 1.4.1