Fixed handling of undef values in POS cells in ConstEval

This commit is contained in:
Clifford Wolf 2013-11-06 18:45:31 +01:00
parent 204572d926
commit f839b842a2
1 changed files with 1 additions and 3 deletions

View File

@ -418,9 +418,7 @@ RTLIL::Const RTLIL::const_pos(const RTLIL::Const &arg1, const RTLIL::Const&, boo
RTLIL::Const arg1_ext = arg1; RTLIL::Const arg1_ext = arg1;
while (int(arg1_ext.bits.size()) < result_len) while (int(arg1_ext.bits.size()) < result_len)
arg1_ext.bits.push_back(signed1 && arg1_ext.bits.size() ? arg1_ext.bits.back() : RTLIL::State::S0); arg1_ext.bits.push_back(signed1 && arg1_ext.bits.size() ? arg1_ext.bits.back() : RTLIL::State::S0);
return arg1_ext;
RTLIL::Const zero(RTLIL::State::S0, 1);
return RTLIL::const_add(zero, arg1_ext, false, signed1, result_len);
} }
RTLIL::Const RTLIL::const_neg(const RTLIL::Const &arg1, const RTLIL::Const&, bool signed1, bool, int result_len) RTLIL::Const RTLIL::const_neg(const RTLIL::Const &arg1, const RTLIL::Const&, bool signed1, bool, int result_len)