Fix mingw compile issue (maybe.. I can't test it)
authorClifford Wolf <clifford@clifford.at>
Thu, 23 Feb 2017 12:59:02 +0000 (13:59 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 23 Feb 2017 12:59:02 +0000 (13:59 +0100)
kernel/calc.cc

index a24fa2abf85fab0893afcc96ec2d0c088e52ef9c..93d592f35fb05ab5754e2b012a1d71aefb6d86c1 100644 (file)
@@ -291,7 +291,7 @@ static RTLIL::Const const_shift_worker(const RTLIL::Const &arg1, const RTLIL::Co
                BigInteger pos = BigInteger(i) + offset;
                if (pos < 0)
                        result.bits[i] = RTLIL::State::S0;
-               else if (pos >= arg1.bits.size())
+               else if (pos >= BigInteger(arg1.bits.size()))
                        result.bits[i] = sign_ext ? arg1.bits.back() : RTLIL::State::S0;
                else
                        result.bits[i] = arg1.bits[pos.toInt()];
@@ -342,7 +342,7 @@ static RTLIL::Const const_shift_shiftx(const RTLIL::Const &arg1, const RTLIL::Co
 
        for (int i = 0; i < result_len; i++) {
                BigInteger pos = BigInteger(i) + offset;
-               if (pos < 0 || pos >= arg1.bits.size())
+               if (pos < 0 || pos >= BigInteger(arg1.bits.size()))
                        result.bits[i] = other_bits;
                else
                        result.bits[i] = arg1.bits[pos.toInt()];