mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #2151 from whitequark/cxxrtl-fix-rzext
cxxrtl: fix rzext()
This commit is contained in:
commit
971a765155
|
@ -185,8 +185,8 @@ struct value : public expr_base<value<Bits>> {
|
||||||
carry = (shift_bits == 0) ? 0
|
carry = (shift_bits == 0) ? 0
|
||||||
: data[n] >> (chunk::bits - shift_bits);
|
: data[n] >> (chunk::bits - shift_bits);
|
||||||
}
|
}
|
||||||
if (carry != 0)
|
if (shift_chunks + chunks < result.chunks)
|
||||||
result.data[result.chunks - 1] = carry;
|
result.data[shift_chunks + chunks] = carry;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue