3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-28 19:35:53 +00:00

Fixed even more ConstEval bugs found using xsthammer

This commit is contained in:
Clifford Wolf 2013-06-14 10:31:18 +02:00
parent 30db70b1ba
commit 6d7b5f9064
3 changed files with 59 additions and 30 deletions

View file

@ -190,8 +190,11 @@ struct CellTypes
if (type == "$sshl" && !signed1)
type = "$shl";
if (!signed1 || !signed2)
signed1 = false, signed2 = false;
if (type != "$sshr" && type != "$sshl" && type != "$shr" && type != "$shl" &&
type != "$pos" && type != "$neg" && type != "$not") {
if (!signed1 || !signed2)
signed1 = false, signed2 = false;
}
#define HANDLE_CELL_TYPE(_t) if (type == "$" #_t) return const_ ## _t(arg1, arg2, signed1, signed2, result_len);
HANDLE_CELL_TYPE(not)