diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-03-06 11:53:37 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-03-06 11:53:37 +0100 |
commit | a1bfde8c5ea0d5c9778579bf78165637ac6c9b25 (patch) | |
tree | 142aebf2bf592445bc9a3f272f160969fc49230c /kernel/calc.cc | |
parent | b1b8fe3a566099e5fd29e6d8c60e8f8b4feb0f34 (diff) | |
download | yosys-a1bfde8c5ea0d5c9778579bf78165637ac6c9b25.tar.gz yosys-a1bfde8c5ea0d5c9778579bf78165637ac6c9b25.tar.bz2 yosys-a1bfde8c5ea0d5c9778579bf78165637ac6c9b25.zip |
Strictly zero-extend unsigned A-inputs of shift operations
Diffstat (limited to 'kernel/calc.cc')
-rw-r--r-- | kernel/calc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/calc.cc b/kernel/calc.cc index a56db93aa..749589f20 100644 --- a/kernel/calc.cc +++ b/kernel/calc.cc @@ -305,14 +305,14 @@ static RTLIL::Const const_shift(const RTLIL::Const &arg1, const RTLIL::Const &ar RTLIL::Const RTLIL::const_shl(const RTLIL::Const &arg1, const RTLIL::Const &arg2, bool signed1, bool, int result_len) { RTLIL::Const arg1_ext = arg1; - extend(arg1_ext, result_len, signed1); + extend_u0(arg1_ext, result_len, signed1); return const_shift(arg1_ext, arg2, false, -1, result_len); } RTLIL::Const RTLIL::const_shr(const RTLIL::Const &arg1, const RTLIL::Const &arg2, bool signed1, bool, int result_len) { RTLIL::Const arg1_ext = arg1; - extend(arg1_ext, result_len, signed1); + extend_u0(arg1_ext, result_len, signed1); return const_shift(arg1_ext, arg2, false, +1, result_len); } |