Code review fix, bail out on integers above 64 bits

This commit is contained in:
Alain Dargelas 2024-12-18 11:28:32 -08:00
parent 7b70ba4fd6
commit 0f8356d485
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@ code
int c_const_int = c_const.as_int(c_const_signed);
int b_const_int_shifted = b_const_int << offset;
if (mul->getParam(ID::B_WIDTH).size() > 64)
reject;
if (b_const.size() > 64)
reject;
if (c_const.size() > 64)
reject;
// Check that there are only zeros before offset
if (offset < 0 || !div_a.extract(0, offset).is_fully_zero())
reject;