3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-15 05:11:51 +00:00
This commit is contained in:
Chris Hathhorn 2026-02-13 13:09:44 -06:00 committed by GitHub
commit eaaafa4a4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 50 additions and 1 deletions

View file

@ -291,7 +291,7 @@ static RTLIL::Const const_shift_worker(const RTLIL::Const &arg1, const RTLIL::Co
if (pos < 0)
result.set(i, vacant_bits);
else if (pos >= BigInteger(GetSize(arg1)))
result.set(i, sign_ext ? arg1.back() : vacant_bits);
result.set(i, sign_ext && !arg1.empty() ? arg1.back() : vacant_bits);
else
result.set(i, arg1[pos.toInt()]);
}