]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Signed division now returns what is should. Signed division is defined by unsigned...
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 7 May 2011 12:02:20 +0000 (12:02 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 7 May 2011 12:02:20 +0000 (12:02 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1313 e59a4935-1847-0410-ae03-e826735625c1

src/simplifier/consteval.cpp

index 1bdafbb1a1bb9294950aac3349a06ad8edc7e0c6..e9acd557fe04036063dbbcc129edfa9ee72a5212 100644 (file)
@@ -307,7 +307,12 @@ namespace BEEV
                  if (k==SBVREM)
                          OutputNode = children[0];
                  else
-                         OutputNode = _bm->CreateOneConst(outputwidth);
+                         {
+                             if (CONSTANTBV::BitVector_bit_test(tmp0, inputwidth-1))
+                               OutputNode = _bm->CreateMaxConst(inputwidth);
+                             else
+                               OutputNode = _bm->CreateOneConst(inputwidth);
+                         }
 
                  CONSTANTBV::BitVector_Destroy(remainder);
               CONSTANTBV::BitVector_Destroy(quotient);