summaryrefslogtreecommitdiff
path: root/kernel/calc.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-11-08 11:40:36 +0100
committerClifford Wolf <clifford@clifford.at>2013-11-08 11:40:36 +0100
commit259cc1391e1e53455d9919af453b78198454e13a (patch)
tree6dd4a5c39c4f075228e145b3c5adeb152f724a84 /kernel/calc.cc
parent9f49d538e1e6bd59c848f19226c95949ba2f37b5 (diff)
More undef-propagation related fixes
Diffstat (limited to 'kernel/calc.cc')
-rw-r--r--kernel/calc.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/calc.cc b/kernel/calc.cc
index 68a382cc..61025104 100644
--- a/kernel/calc.cc
+++ b/kernel/calc.cc
@@ -69,6 +69,9 @@ static BigInteger const2big(const RTLIL::Const &val, bool as_signed, int &undef_
static RTLIL::Const big2const(const BigInteger &val, int result_len, int undef_bit_pos)
{
+ if (undef_bit_pos >= 0)
+ return RTLIL::Const(RTLIL::State::Sx, result_len);
+
BigUnsigned mag = val.getMagnitude();
RTLIL::Const result(0, result_len);
@@ -87,9 +90,11 @@ static RTLIL::Const big2const(const BigInteger &val, int result_len, int undef_b
}
}
+#if 0
if (undef_bit_pos >= 0)
for (int i = undef_bit_pos; i < result_len; i++)
result.bits[i] = RTLIL::State::Sx;
+#endif
return result;
}