about summary refs log tree commit diff homepage
path: root/lib/Solver/STPBuilder.h
diff options
context:
space:
mode:
authorDan Liew <delcypher@gmail.com>2014-02-14 18:49:42 +0000
committerDan Liew <delcypher@gmail.com>2014-02-14 18:49:42 +0000
commit66c064d482160e6c31ccf8ecb0aa93a7529d3da1 (patch)
tree1ed4ba4cc639b178f16d8a56bd75799d5033904e /lib/Solver/STPBuilder.h
parentd2f1684355e9a99545aa864e3eac81b259712a6f (diff)
parent6e4e74b99a199ead458b0b919286d667bd8e8f28 (diff)
downloadklee-66c064d482160e6c31ccf8ecb0aa93a7529d3da1.tar.gz
Merge pull request #64 from delcypher/overshift-fix
Overshift fixes
Diffstat (limited to 'lib/Solver/STPBuilder.h')
-rw-r--r--lib/Solver/STPBuilder.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/Solver/STPBuilder.h b/lib/Solver/STPBuilder.h
index 0a99b753..ef1cd8b3 100644
--- a/lib/Solver/STPBuilder.h
+++ b/lib/Solver/STPBuilder.h
@@ -79,13 +79,6 @@ class STPBuilder {
   STPArrayExprHash _arr_hash;
 
 private:  
-  unsigned getShiftBits(unsigned amount) {
-    unsigned bits = 1;
-    amount--;
-    while (amount >>= 1)
-      bits++;
-    return bits;
-  }
 
   ExprHandle bvOne(unsigned width);
   ExprHandle bvZero(unsigned width);
@@ -100,14 +93,14 @@ private:
   ExprHandle eqExpr(ExprHandle a, ExprHandle b);
 
   //logical left and right shift (not arithmetic)
-  ExprHandle bvLeftShift(ExprHandle expr, unsigned shift, unsigned shiftBits);
-  ExprHandle bvRightShift(ExprHandle expr, unsigned amount, unsigned shiftBits);
-  ExprHandle bvVarLeftShift(ExprHandle expr, ExprHandle amount, unsigned width);
-  ExprHandle bvVarRightShift(ExprHandle expr, ExprHandle amount, unsigned width);
-  ExprHandle bvVarArithRightShift(ExprHandle expr, ExprHandle amount, unsigned width);
+  ExprHandle bvLeftShift(ExprHandle expr, unsigned shift);
+  ExprHandle bvRightShift(ExprHandle expr, unsigned shift);
+  ExprHandle bvVarLeftShift(ExprHandle expr, ExprHandle shift);
+  ExprHandle bvVarRightShift(ExprHandle expr, ExprHandle shift);
+  ExprHandle bvVarArithRightShift(ExprHandle expr, ExprHandle shift);
 
   ExprHandle constructAShrByConstant(ExprHandle expr, unsigned shift, 
-                                     ExprHandle isSigned, unsigned shiftBits);
+                                     ExprHandle isSigned);
   ExprHandle constructMulByConstant(ExprHandle expr, unsigned width, uint64_t x);
   ExprHandle constructUDivByConstant(ExprHandle expr_n, unsigned width, uint64_t d);
   ExprHandle constructSDivByConstant(ExprHandle expr_n, unsigned width, uint64_t d);