aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Zonenberg <azonenberg@drawersteak.com>2017-02-24 08:12:45 -0800
committerAndrew Zonenberg <azonenberg@drawersteak.com>2017-02-24 08:12:45 -0800
commit1f824fa6434fc15e17c2e28bb61c2405d983ec13 (patch)
tree9bd65b34bd20cee2c1d6c9e57bcceb075c32e1d6 /kernel
parent2eabe43efa59f7264fec9252a79f937c6bd58a31 (diff)
parenta9c3acf5a294537b5dbcfa790ac04d3f50bad522 (diff)
downloadyosys-1f824fa6434fc15e17c2e28bb61c2405d983ec13.tar.gz
yosys-1f824fa6434fc15e17c2e28bb61c2405d983ec13.tar.bz2
yosys-1f824fa6434fc15e17c2e28bb61c2405d983ec13.zip
Merge https://github.com/cliffordwolf/yosys
Diffstat (limited to 'kernel')
-rw-r--r--kernel/calc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/calc.cc b/kernel/calc.cc
index a24fa2abf..4a4840771 100644
--- a/kernel/calc.cc
+++ b/kernel/calc.cc
@@ -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(int(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(int(arg1.bits.size())))
result.bits[i] = other_bits;
else
result.bits[i] = arg1.bits[pos.toInt()];