mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
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
|
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 a new issue