3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-27 20:36:31 +00:00
This commit is contained in:
nella 2026-05-12 17:06:21 +02:00 committed by nella
parent c6c44c5c9d
commit d55f4daae2
4 changed files with 14 additions and 21 deletions

View file

@ -41,13 +41,7 @@ struct setunset_t
if (!RTLIL::SigSpec::parse(sig_value, nullptr, set_value))
log_cmd_error("Can't decode value '%s'!\n", set_value);
value = sig_value.as_const();
if (!set_value.empty() && set_value.find('\'') == std::string::npos) {
size_t start = (set_value[0] == '-' || set_value[0] == '+') ? 1 : 0;
if (start < set_value.size() && std::all_of(set_value.begin() + start, set_value.end(), ::isdigit)) {
value.flags |= RTLIL::CONST_FLAG_SIGNED;
}
}
value.tag_bare_integer_const(set_value);
}
}
};