mirror of https://github.com/YosysHQ/yosys.git
cxxrtl: fix rzext().
This was a correctness issue, but one of the consequences is that it resulted in jumps in generated machine code where there should have been none. As a side effect of fixing the bug, Minerva SoC became 10% faster.
This commit is contained in:
parent
a5f0cb4eba
commit
6cf02ed94f
|
@ -165,8 +165,8 @@ struct value : public expr_base<value<Bits>> {
|
|||
carry = (shift_bits == 0) ? 0
|
||||
: data[n] >> (chunk::bits - shift_bits);
|
||||
}
|
||||
if (carry != 0)
|
||||
result.data[result.chunks - 1] = carry;
|
||||
if (shift_chunks + chunks < result.chunks)
|
||||
result.data[shift_chunks + chunks] = carry;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue